0

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 suggestions for both tile-based and art-based backgrounds.

Anubhav Sharma
  • 388
  • 1
  • 5
  • 14

2 Answers2

3

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

Community
  • 1
  • 1
Bakapii
  • 1,014
  • 1
  • 7
  • 12
  • That's a really interesting way to do it! Never heard of it! For tile-based games, arrays, xml and this sprite sheet method would be great. What about art-based games? Is there anything obvious I'm missing? – Anubhav Sharma Jul 30 '11 at 05:21
  • Not sure what you mean by art-based, but I updated my answer with a few more links. Take a look and see if that helps. – Bakapii Jul 30 '11 at 09:20
0

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.

Shawn
  • 2,406
  • 1
  • 26
  • 31