Store Levels - Side scrolling racing game
I'm making a top-view side-scrolling racing game in Flash AS3. I'm unsure about the best way to store levels in the game.
Please provide s开发者_运维问答uggestions for both tile-based and art-based backgrounds.
You can use "Sprite Sheets" to store your tiles in one big image and then use copyPixels
to get the individual tiles.
There's a question here on SO about it:
AS3 Sprite Sheets
Edit:
Just found out that Lee Brimelow has a made a video series about Sprite Sheets in three parts. He uses the Chrome version of Angry Birds as reference. He'll walk through the creation of the sheets, how to get them into flash and also animation of the sprites. The series is called 'Sprite Sheets and Blitting', check it out here:
Part 1: http://gotoandlearn.com/play.php?id=140
Part 2: http://gotoandlearn.com/play.php?id=141
Part 3: http://gotoandlearn.com/play.php?id=142
For tile-based levels, you can try "Tiled" which stores its levels as xml. You can find it at http://www.mapeditor.org/
If you are using Flash Professional, you can simply create different movie clips as levels.
精彩评论