Saturday, September 06, 2008

[XML Parsing]03: Creating the level tiles

03: Creating the level tiles

 

For my game, I want a way of displaying tiles that look different depending on the number which appears in between each <tilecol> tag.

 

To achieve this I will need a for loop, which will will loop through every row, and within that loop, have a second loop which will loop through every column.

 

Within the second loop there shall be some code which creates each individual tile, putting it into the correct location based on its row and column position and change its frame number to the number grabbed from the xml information.

 

The below images show what I am aiming to do: (note: upload images)

 

(needs finishing)

No comments: