How to make the 'environment' for a space shooter?

Started by
4 comments, last by Aardvajk 17 years, 6 months ago
Hey, I'm currently busy creating a small 2D networked space shooter, which will mostly take place in an arena where you fight just one opponent. The idea is that the game requires a lot of skill, especially when playing against a human opponent. However, although the 'playground' is only a small arena, I figured it might still be bigger than the 800x600 resolution the game runs at. Therefore I am unsure about how to make the 'playground'. How does one generally go about this? Do you just create one huge bitmap with a lot of stars or should it be something tilebased? Thanks in advance for any information.
Advertisement
It doesn't really matter as long as the approach works for your game. If you don't expect a lot of obstacles in your "playground" a single, large bitmap works just fine.

However, in my 2d RPG, I had to use a tileset for the complicated dungeon-y environments. It made placing things like trees, treasure chests, etc. much easier, because I only had to store it as a value on a tile.

In any case, I think tiling is a neat effect, so that's what I would go with, but you could get away without it.

EDIT:
I'm not sure I answered your question, because I'm not sure what your question is! Did you have any questions more specific than just one-bitmap vs. tile-based?
XBox 360 gamertag: templewulf feel free to add me!
Thanks for your reply templewulf! So tile-based could be the way to go. I should probably tell that my spaceships are of 'arbitrary' size so maybe that complicates matters. I was thinking of creating larger 'blocks' of 'terrain' and use the alpha component to determine if the object is passable or not per pixel. However, how to add that together? Perhaps create a big surface at the beginning and blit those blocks to it? I would imagine this looks a bit too much like a big bitmap, but it might make it easier to offer diversity in maps...
That all depends on exactly what you're doing.

You could use a single backdrop for your background scenery, but then you can't really do things such as background animations, or interaction between the player and background objects. You'll also be limited to the single background image, and will have to design another one if you want to add some variation.

You could use tiles, and then you can have different tilesets, animated tiles, tile interaction, and tile maps, which will allow you to create various scenes and levels quickly without having to create new graphics.
http://blog.protonovus.com/
Or you can go for a single background image and various objects placed on top of it... or a tileset for the background and objects on top of it... or multiple tilesets... and so on. Tilesets are so usefull because they're so generic to handle: every tile is aligned to a defined grid. That doesn't mean placing a sprite and adding a collision shape to your list of objects is a worse method - it depends on the situation.

For example, for a game I'll be working on, we're choosing a layered tilemap approach, so the player can walk behind some tiles and in front of most others. For my own game, I use several tilemaps as well, but I'm adding a sprite-system that allows images to be placed at any location, to hopefully combine the advantages of both: an easy-to handle, natural looking environment. A tilebased approach tends to make levels look square, you see, and that's not something I like too much... ;)
Create-ivity - a game development blog Mouseover for more information.
And of course the other advantage of using tiles is that your level will take a fraction of the memory to store than one huge bitmap would, plus checking for collisions with a tile-based map generally requires far less comparisions than running through a list of objects.

I tend to use a combination of a grid-based tile-map for the static background and a std::list or whatever of free-moving objects drawn over the top.

This topic is closed to new replies.

Advertisement