Jump to content
  • Advertisement
Sign in to follow this  

Layers of a Scroller/Platform game

This topic is 5101 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm planning out a 2D side scroller/platform game. Something I'd like to know is how many graphical layers should I setup in the game engine? So far I've come up with 4: - Background layer - Non-Action layer - Action layer (player is here) - Foreground layer

Share this post

Link to post
Share on other sites
Minimum is:


And from there you can add multiple layers, I know a few old DOS games had from 3 layers to about 7 on one level :D

As the last poster said, just make it configurable in your level data, that way you could also make a setting in your game pref's for complexity low - high, with low having the minimum levels on to high with alpha belded layers etc.

Loow at Tyrian (or Tyrian 2000) for idea's on what the old DOS game developers did. On Tyrian you could set your processor type from 286 (with 3 layers IIRC) to Pentium ( 5 layers with Alphablended clouds)

Share this post

Link to post
Share on other sites
My OpenGL engine is currently working to have (from back to front):

* The Sky
A background image (or several background images overlayed) that tile and scroll at different rates to the main world to create parralax.

* The tiles behind the player
The images for most of the ground/walls and so-on in the world. These will be able to be animated.

* The invisible collision layer
Just a simple enum for each tile storing whether a tile is solid, passable, or a platform that can be jumped up onto, as well as the slope. Will also store a "group" ID for each tile so that certain areas of collision can be turned on and off at will, this may not seem significant, but play a game like sonic and it REGUALLY becomes apparent that some tiles are solid one second and passable the next (think when you're going down ramps or around loops).

* That where all the objects and the player is drawn
All the objects in the game are drawn in front of the background and behind the foreground, kinda obvious when you think about it.

* The tiles in front of the player
Occasionally you will have pillars, grass, or whatever, in front of the player, this is the images for that. These will also be able to be animated.

* Part of the sky in front of the world
Occasionally a sky will have images that should be drawn in FRONT of the world, for example a scrolling image of rain or snow, or parralaxing foilage, this will be done here.

* The lightmap
An offscreen buffer is created as the world objects are drawn storeing all the on-screen light objects, this is blended with the world rather cleverly to make the lighting system.

* The hud/menus/whatever
Fairly self explanatory

So far I have about half of these fully implemented and editable, it's going to be so cool

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!