Jump to content
  • Advertisement
Sign in to follow this  
tont

question about level design for 2d shooter

This topic is 4672 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

Im in the middle of the design process for a 2d side scrolling shooter and had a question about level/map design. I had thought about making 1 large bitmap and make the character move around a set path. but i changed to more of a tile based map, where the map would look something like this 2d array: 0000000000000 0000011100000 0011222211000 1122222222211 where 0 = no texture, use background bitmap 1 = ground texture 2 = underground texture. it seemed like a good idea because i could also lock the player to the texture number 1 to keep him on the path. also if i created the array to be of type Tile or something like that, i could also have a value for the slope incase its going up at an angle. my only concern is that it looks too... amature to set it up like this. or maybe that its 'too easy'. so i was wondering are there any other ways to setup the level. and if this is the best way to do it, would it be smart for me to change the way the values are saved? i dont want a user to go into the files and just switch numbers around. what would your recommendations be? thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
Ahh, I remember this idea.... from the time I made ASCII games. If you can do something better than ASCII graphics, that's not a good idea. It will make your game monotonous.

I suggest using several layers with different textures and transparent parts. You can use a background layer and a action layer(The layer you will make collision detections with). The action layer will have transparent parts, so you can see the background layer. You can even make a foreground layer if you want.

The advantage of this method is that you can move the different layers at different speeds when the game scrolls, so it will look better.

Share this post


Link to post
Share on other sites
i wasnt planning on having an ascii map (if that is what you were thinking), i think im thinking along your lines though. just having an array to map everything out. and then upon reading it, map the texture that corresponds to that number. quick question though, if a texture has a transparent background on it, will an image behind it show through?


Share this post


Link to post
Share on other sites
What I did for our tile-based 3D RPG engine, is convert pixels in a standard 8-bit BMP file to tile data. This allows you to use any bitmap editor (Windows Paint, Paintshop Pro, etc) to assign color values to the palette (read up on palettized pixel modes if you're unfamiliar), then 'draw' your levels using the paint tools.

In our project's case, this is extremely handy, as when we design our game maps, tools like Lasso, Color Replacement, Selection Expand/Contract, cut&paste, become indispensible.

Share this post


Link to post
Share on other sites
yes it will. It will be better from the aspect of performance, memory usage and programing to use transparent images.

Better performance: most graphical functions in any language knows how to deal transparent images. You won't have to check in the array for every pixel. Also, you make one call to the draw function for the entire image instead of one for every pixel in each draw.

Better memory usage: you don't need to store a giantic array.

Better programing: easier coding - you don't have to make extra checks on drawing.

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!