Sign in to follow this  
D6Gamer

Level creations (XNA)

Recommended Posts

D6Gamer    100
Hi everyone I'm having real problems and after an hour doing google searches I'm no closer to my goal. The problem I having is this: I'm trying to make a basic 2d platformer using XNA. I've looked at the "Platformer Game" that is shipped with XNA but I can't really make heads or tails of it. And the last thing I want to do is use that game with just my sprites over the top of it. What I want is to create a .txt file that contains all my levels information (platform positions/enemy positions etc) and take that data and load the corresponding sprite and data about it on my screen. I also want it so when a player reaches the end "goal" the next level is loaded up from the following next text file. The last thing I want to do is hard code this into the game. That's just inefficient and too time consuming. I was wondering if anyone out there would know how I could/should go about this? [Edited by - D6Gamer on February 13, 2010 6:57:41 AM]

Share this post


Link to post
Share on other sites
matthughson    588
Hi,

Sounds like a great use for XML. There are tons of sites with information on the subject, but one thing in particular would be this:

http://creators.xna.com/en-US/tutorial/particlexml

It uses the XNA's ContentManager.Load and XML files to load in all the data needed to define a particle system. You could do almost the exact same thing for you levels.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this