Take a Look at the 4th XNA Tile Engine Tutorial! |
The XNA Game Studio Express may still be in beta phase, but that sure isn't stopping people from checking it out. And thank goodness we have people who go ahead and test the waters, because we get free XNA tutorials (yippee)!Kurt Jaegers is one of those guys, and he has been giving out some XNA tile engine how-to's for quite some time already. You've probably followed it really closely, so we're going to breeze through the rest and head on to part 4, the latest in the series.
Wait, you haven't yet? We'll give you a really quick lowdown. Basically, this guide is on simple tile-based map engine creation, so if you're wondering how to create character sprites and avatars, then this one isn't for you. Now that it's clarified, go whip out your XNA Game Studio Express Beta and create a new project, and give it a name. According to Jaegers, the code contains three methods:
- Game1 - Named the same as the class, this is the class' constructor. In the project template it contains a single line (InitializeComponent();)
- Update - This routine is run in a continuous loop and is intended to be the place where your game logic is run. Here you can accept player input, update locations of game objects, etc
- Draw - Finally, the Draw method is responsible to rendering the current game state to the screen. It is called by the class as rapidly as the system can handle.
After that, get the tiles that you're going to use for the screen. You can use texture images available online, or make them yourself. When you're done, add the resources that you need in the game, then declare variables.
Okay, since we're going over the previous tutorials really quickly, we're missing quite a lot of details. To get the whole thing, go check out our source for the previous tutorials. Now that it's out of the way, we can get to the blow by blow account of Kurt's fourth tutorial. The fourth tutorial is about creating a simple map editor for loading and saving maps, instead of keeping all of the map code in the game code itself.
Kurt says that you'll learn a couple of new stuff in this part, such as using the mouse pointer to select and edit maps as well as paint tiles; loading and saving streams, as well as tracking a program state.
To toggle between "Play Mode" and "Edit Mode," press E. In "Edit Mode," Kurt says that you guys have to add a box to the lower portion of the screen that displays which tile are you currently painting, and three buttons so that you can choose any layer that you're currently working on. The "W," "A," "S," and "D" keys will be used for scrolling the tileset for current drawing title selection, while arrow keys will be used to move around the map.
And that's a wrap, folks. To access the whole thing, click on "Read." Do keep yourselves creative, and who knows, maybe we'll get to feature your Xbox 360 homebrew game in the near future!
The QJ.net Network |
|
| Site | Feed |
| QJ.NET | RSS |
| Nintendo DS | RSS |
| PlayStation 3 | RSS |
| PSP Updates | RSS |
| Wii | RSS |
| Xbox 360 | RSS |
| MMORPG | RSS |
| Personal Computer Games | RSS |
| iPhone - iPod Touch | RSS |
| QJ.NET Forums | RSS |
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
Comments
keep the map editor out and leave that for idiot games like far cry. a map editor will just kill the game off halo 3 alltogether leave that crap out
Add New Comment