Suggestions for implementing a dynamic 2D level
Posted
by
Wouter
on Game Development
See other posts from Game Development
or by Wouter
Published on 2011-06-29T08:53:22Z
Indexed on
2011/06/29
16:32 UTC
Read the original article
Hit count: 471
I am working on a game that needs a level that is completely generated. Currently my approach is to draw textures for the levels pixel by pixel during the game (in XNA with SpriteBatch). This is too intensive unfortunately. The game has frame drops even when I only draw 1 level texture each draw cycle.
Here is an example of the current prototype. It is a simple sidescroller with the avatar swimming through a cave. The shape of this cave will alter throughout the level (textures and physics collision shapes). You can clearly see the boundaries of the level tiles in the screenshot below. These are generated just before they move into camera view.
For inspiration I looked at PixelJunk Shooter 2. These levels are obviously not generated, but some of the levels have movement. How do you guys think they implemented it? My guess is that the level and other objects in the game are actually flat 3d models, but I am not sure..
© Game Development or respective owner