Game Development Community

Making a background?

by Alan Velasco · in Artist Corner · 07/09/2009 (9:40 am) · 2 replies

I'm attempting to make an iphone game as to not let my summer completely go to waste. This will be my first game ever. I plan on making a side scrolling fighter, similar to streets of rage.

My question is how exactly does the background work? Do I make the background for the entire level one single image? Or something else?

I know it's probably a really silly question, but I'd appreciate any help. Thank you.

About the author

Recent Threads


#1
07/16/2009 (1:33 am)
Although you could use a single big image and then move the viewport to display only a portion of it, this isn't the best way of doing this kind of thing.
Usually the background is done using tiles, that is, you have an image made of "boxes" for example 64x64 pixels, so a 640x640 image has 10x10 tiles, that is 100 tiles, then, your background is built using these 100 tiles by disposing them in the appropriate way. So you can create levels of "unlimited" length by reusing these tiles.
The background is stored in a bidimensional matrix which contains the index of the tiles in the image, then you have to draw only the tiles that are visible.
I've seen that in the new OS3.0 there should be some API specifically designed for games, but still, I haven't looked them.

But, if you have some money to invest, I suggest you to buy iTGB if you plan to do 2D game, or iTGE for 3D. If you start from zero, well, you'll learn a lot, but I don't think your game will be ready in a month.
#2
07/16/2009 (7:31 am)
Thank you for your response.

I didn't think I'd have it up and running in a month, so no worries there.

I also have my friend helping me, since it's something we've always wanted to do.

I definitely appreciate the input.

As for iTGB, I may look into it. For now, we just plan on doing things from scratch and see how it goes.