Map building effeciency in Flash/AS3

I realize that the answer to this question is probably applicable to everything, not just Actionscript.

What i am doing is trying to make a pokemon from scratch just for fun. What i did so far was made my own set of classes that built the map for me, using my own grid system. (as the pokemon games are all tile/grid based). For each section of the ‘world map’ i would add a class with the image, values, etc (such as if the tile was passable or impassable). It would look something like this as far as just building the map:
var t:T=new T(values here);
var g:G=new G(values here);

and i would make a nested array:
[t,t,t,t,t,
g,g,g,t,g,
g,g,t,t,g]

From there i would use another script to map out the array into what would be my map, tile by tile.

This was tedious, as it was hard to see exactly how it would look and turn out. lots of going back and forth. Since i am self taught and learning as i go, I was wondering if it would take less space on a device to actually build the map in the Flash GUI, as opposed to it being built entirely though the code itself. What would be the more efficient method of doing this?

Hope all of that makes sense, as i have been away from this project for some time, and am rusty on my coding jargon.

Building the map in code like you are doing seems like a fine approach. At least, that is how a lot of tile-based games I’ve read about over the years tend to work. You can certainly build using the GUI as well, for a lot of these historic games didn’t have Flash-like GUIs to think of. If you have the time, try out both approaches. For the GUI based approach, my assumption would be that your map will live as a movie clip in the library. Your app will dynamically load it from there. The end result will be nearly identical as to what you have in code with the same classes used to enumerate over each map object and so on. The only difference is that your GUI-based movie clip is easier to visualize :slight_smile: