I am trying to understand the best technique for this.
My game is like a side scroller.
A new “Tile” or piece of game would contain one of each display objects.
-terrain
-slide (like a playground slide)
-other stuff…
pseudo example:
the first tile set would be pieces terrain1 and slide3
var terrainPieces:Array = new Array(1,2,6,3,16,2,3,5,7,2);
var slidePieces:Array = new Array (3,0,1,2,00,4,2,1,4,0);
One of my issues is readability and ease of level layout.
i want to keep the code stacked in a way i can read pieces easily, which is why slidePiece 0 or 00 == no slide (just to keep the array in line)
I can look at this and say to myself the 6th set would look like terrain2,slide4. (which are both pooled display objects)
How would anyone else lay this out. Would it be better if each “tile” is a class containing references to each asset? If so, i cant see how to assign each tile in a readable form while setting up the level layout on my end.
It almost seems like i should just create a gui level editor, Which i will probably do in the future anyway.
Hopefully i have explained myself.