Question about 2D games

RESmonkey

Diamond Member
May 6, 2007
4,818
2
0
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
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
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.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
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.
 

Sureshot324

Diamond Member
Feb 4, 2003
3,370
0
71
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.