-
Notifications
You must be signed in to change notification settings - Fork 0
Database
Ryex edited this page Mar 5, 2013
·
1 revision
WIP SQL Database design for storing the various information for the game.
| coord | tile | attrs | seed |
|---|---|---|---|
| mediumint unsigned | tinyint unsigned | text | tinyint unsigned |
| primary key |
- coord: Combination of the X and Y coordinates of the tile on the world map. Calculated via
X + (Y<<11)for 1500x1500 map. (Note that for 50x50 test map, useX + (Y<<6)) - tile: The numeric ID of the tile.
- attrs: Any attributes we need to store to modify the tile, such as any buildings on it.
- seed: The randomly generated seed for the tile, for use with generating skirmish maps. Currently in range 0-255, but might want to extend to a mediumint unsigned depending on how it looks.
| coord | tiles | last_turn |
|---|---|---|
| mediumint unsigned | text | tinyint unsigned |
| primary key |
- coord: Combination of the X and Y coordinates of the tile on the world map. Calculated via
X + (Y<<11)for 1500x1500 map. (Note that for 50x50 test map, useX + (Y<<6)) - tiles: JSON encoded array of of the skirmish map for the given world map tile.
- last_turn: Number of turns since entry last accessed. (Re)set to zero when accessed, incremented by turn script, and removed by turn script if greater than 2 turns since last access.
Contact Us at: Contact@equestrainwars.com
Visit us at: www.equestrianwars.com