The ingame map is 2d with x = 0 to 25 and y = 0 to 17.
Each map tile will have one of 5 or 6 background colors on it.
Some of the tiles will have buildings on them.
Each building will have a building ID.
My array skills are rusty and I am needing help with how to pull the data from MySQL and output the map in HTML.
The non-interactive map is located here:
http://www.thebluesuncorporation.com/pa ... akrab.html
I want to recreate this on my own server but with interactivity. The map on the above link is hardcoded using a huge table.
After some scribblings, I came up with this...
Code: Select all
$ZEmap = array (
array ("$PosX","$PosY","$BGID","$ImID","$BID"))$PosY = Y position on the grid.
$BGID = Type of tile (X=impassable, E=energy, N=nebula, F=fuel, A=asteroid). This is the background color.
$ImID = ID number associated to images in the database. This is the building image.
$BID = Building ID. Associated in a buildings table.
So basically, my question...
Where do I go from here to actually build the map based on the info in the 'buildings' table?