We've got a map viewer ready and working now and if you want to look you can see it here:
http://www.ben-hope.com/map_viewer_v5.php
Don't worry about the domain name, it's just a spare one I had, the game won't be called "Ben Hope"!
As you can see from the URL this is version 5 and I am quite pleased with it as it is a very clean piece of code. Version 1 used CSS divs to position each piece of terrain and that alone was over 100 divs plus a MySQL call for each "square" - not very efficient.
I then realised you don't need a div for each location so there's only one database call for each "row" and the rows are placed using much simpler CSS and so it's quicker and smoother.
At the moment the graphics are only prototypes but the idea will be to inverse any graphics for terrain you don't own and at the moment just cities are "clickable" - these are actually graphical submit buttons on forms, was quite a pain removing all the extra padding some browsers give these items but I did it in the end.
Now on to the cron for production, should be fairly simple he says!
No comments:
Post a Comment