• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Question about 2D games

RESmonkey

Diamond Member
I learning XNA right now, and I have a small question about games:

In 2D racing games or games where player travels a lot (in one direction), is the background image of the game usually just one big image file, or is it somehow a pattern of small images?

I am designing a game where I want a long and continuous background that changes as player travels in one direction.


Thanks
 
Imo it depends primarily on what views you wish to provide. If the player will always be looking at the playing surface from the same angle then tiling is probably suitable. If they will be allowed to pan and view the scene from different angles then a textured 3D surface is going to be needed.

I would almost say 3D is easier to implement something like this in, these days, given the tools and support available. Systems that render using tiles have some unique problems to solve that a rendered 3D image avoids. Z-clipping is one. Another is creating a good-looking world from a limited set of reused tiles. Tiles are also much bulkier to store than meshes and textures, and overall much less flexible.
 
It really depends on the game. Some space games, for example, are just points of light (stars) floating past the player with little to no new textures other then for the ship and the attackers. Others get away with a big long level texture. Others still will have a library of tiles and arrange them at each level.

Unless every level you do will be the same, I suggest going with either a tiled or a 3d tiled sort of design.

However, if it is a space game where you don't have to worry too much about the background, then just randomly generate white particles.
 
These days even 2D games are rendered as 3D polygons. The 'tiles' are actually polygons rendered by the 3D hardware in your GPU.

The only way it would make sense to store the entire level's background as one image file is if you're going to uniquely hand draw the entire level, without using any repeating textures/tiles.
 
Back
Top