130 likes | 267 Views
Map Tables. By David Isenberg. Tables involving the Map. Map_Table The map of the “world” User_Location_Table A user’s location at a particular instant in time Building_Table A table with building names and descriptions . Building Table.
E N D
Map Tables By David Isenberg
Tables involving the Map • Map_Table The map of the “world” • User_Location_Table A user’s location at a particular instant in time • Building_Table A table with building names and descriptions
Building Table This table is a list of all the buildings in the world Fields • Building_id – integer given to building (primary key) • BuildingName – string “Engineering Building” • Building description – string describing each building
The primary key is composed of these four fields: X - an integer representing the x coordinate Y - an integer representing the y coordinate Floor - an integer representing the floor BuildingID – an integer; the ID of the building Room - string e.g “Classroom” Description – a string a description of the room Map Table - Fields
Map Table – Fields Cont… • East • West • North • South Values 0 – no door 1 – closed door 2 – open door 3 - corridor • Up • Down 0 – cannot go 1 – can go
More Map Fields • TA_ID - ID of the TA in room • Teacher_ID - ID of the Teacher in room • NPC_ID - ID of NPC in room • Item1_ID - ID of items in room… • Item2_ID • Item3_ID Note: Given value of 0 if not in the room
Location Table This table matches a player with a particular location Fields • Userid - player number (primary key) • buildingID - location of that user… • Floor • X • Y
Decisions • Normalization of Buildings into a building table • Map_Table does not include filename of picture – algorithm done by client. • Location_Table is separate from player table. This is because it will be queried very often and only relevant information needs to be returned.
ITEM & CLASS TABLES • By Bryan Chasanoff
The Item Table • REQUIRED • ID :The Item ID is a label imposed on the item to link it to other tables (such as the map) • Name: The Name of item to diaply to the player
The Item Table (Cont’d) • OPTIONAL • WEIGHT: Weight of the object • SIZE: Size of the Object • HITPOINTS: damage item does • 0 for a non-weapons • X for a weapon
Item Bag Table • Will be created during character creation
Class Table • ID: Course number ie. Level: 210 = Level 2 • Class Name: Relay back to user • TeacherID: Who teaches the class, different teachers have different attributes • Prereqs: Which class does a student have to fulfill before passing this class