Hi All,
First of all, sorry for all the questions and thanks to those who make it to the end :o)
I’m in the planning stages of a scrolling isometric tile engine which will eventually be integrated with smartfox/electroserver to create a multiuser online world. I’ve read about a few different approaches to iso tile engines, but would appreciate some advice from anyone who has experience with this sort of thing.
Alot of articles suggest creating a movieclip with each tile on a seperate frame, the same tile is duplicated multiple times and then just set to the relevant frame number. Is this a good approach? or would it be better to just attach the required movieclip to an empty tile?
I need to store the tile data externally so I can load in new maps, so the first question is which format? XML seems to be quite a large filesize (for a 1000x1000 grid it’s approx 20mb, i know this is a huge map but thinking beyond my requirements). A text file with rows seperated by a *, and columns seperated by, takes alot less space (1.8mb for a 1000x1000 grid). For these tests I stored an integer for each tile to represent the tile type. What would be the best way to handle external data for potentially large maps?
Once the data is loaded I need to display only tiles within a specified view window. I’m thinking if I load the whole map in to a 2d array, i could select, for example, a 10x10 section of the array which is used to draw the tiles. As the character moves around the world, the 10x10 array is updated and the map is redrawn. I’ve just done a quick test, and a 1000x1000 array of integers in flash uses 75mb RAM, so i don’t think that’s a good idea. Any suggestions how to handle this? Maybe I seperate the map into areas and load a portion of the map based on the area the character’s in?
What is a good overall structure? In ‘flash game design demystified’ the tile based world has the objects in the tiles themselves, this seems to limit me to objects that fit within the tile. I’ve seen another example which suggests having the tiles on one layer, the objects on another layer, and the collisions/triggers on a final layer. I like the idea of a multi layer approach, as this appear to be more flexible and would work better with having large objects on the map, such as buildings. This overall design is the bit I’d would really appreciate some experienced advice with, I can figure the rest out myself if i can get a good design together.
Once I’ve got the tile engine idea sorted, i need to incorporate the multiuser functionality, like how to show other users that should be visible in the viewable window. Should I worry about this after? or is it something that should be built in from the beginning?
Any help with the initial planning of a multiuser scrolling iso engine, or tips and best practices would be greatly appreciated. Thanks for taking the time to read this.