Saturday, September 06, 2008

[XML] Loading level layouts into tile based Flash Game

Introduction


I am starting the XML stuff for my wizards game from scratch. Yesterday after trying several methods of getting multiple levels to load, I found out about using XML to load in data to a flash file.  I used several websites to help me understand the concept (Emanuel Feronato,8 Bit Rocket and by far the most useful and easy to understand, Kirupa).

 

Anyway, thinking I had learnt completely how to use it, I dived straight in to adding the code into my project.  This sort of worked.  I am still unsure why it DIDN'T work completely.  I managed to load in the level and display it on the screen, but I couldn't work out why it wasn't showing properly (the tiles were all the same, as oposed to showing the correct tile based on the number in the XML file). 

 

So, this is my blog of doing all the XML walkthrough stuff in a blank project, without any of the other code or anything else confusing me.  It's also sort of a tutorial, so follow it if you like.  It may not be the best way of doing the thing I am trying to acheive, but I will try and explain what I am doing as I go along. 

 

 

No comments: