Tile Types
March 1, 2009 on 9:24 pm | In Game Environment | No CommentsThis post is going to be pretty much my musings on what data is needed for the travel map and as such I hope that at the end of it I’ll work out the best way of coding the ‘database’.
Each tile needs to be related to a target graphic. Target graphics will belong to a grouping (e.g. grass) and then a sub item within that group, this would allow variation within these groups.
Groupings will have a inate passability/difficulty rating that effects how difficult that tile is to cross and in fact if it can be crossed. I don’t think that there is any need to overwrite this on induvidual tiles as the graphic should provide visual recognition on how difficult that particular tile is.
The difficulty of the tiles around the character will effect what directions they are able to move in.
The above items indicate that all of the stats can be held on a tile grouping basis, rather than induvidually per tile. This does make life a lot easier in certain respects. Now the potential issue will come from how to store what could be thousands of tiles worth of stats. I’m still thinking flat file that would contain serialized objects and use the fgets function (breaks on chr10). If all of the required tile id’s are placed into an array then we need to only read up to the relevant line. This way we don’t risk the chance of bloating ram with reading the whole file. One thing that is worth investigating however is to see if its possible to pre-populate a variable across the whole website
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Entries and comments feeds. Valid XHTML and CSS. ^Top^ Powered by WordPress with jd-nebula-3c theme design by John Doe.