View Full Version : Basic 2d Programming Concepts
JoshG
05-12-2002, 02:38 PM
I have some questions on 2d programming concepts. A sprite is a tile where a certain color is not drawn, so it has a transparent background, right? What file formats are usualy used for 2d rpg style games, bitmaps? Should tiles be stored in one large file? What about sprite animation, how does that work? Does the word blit just mean copy to? What is back buffering? page flipping? I am sorry, I just do not understand some concepts.
:confused:
GodLike
05-12-2002, 02:55 PM
hmm
i cant answer you becouse i whant to know all this things too
but one thing i know that it can be bitmamp and it can be any size
Uraldor
05-12-2002, 09:11 PM
almost any 2d game programming FAQ will answer those questions, have you searched the web at all? If not, try googl.com and search for things yourself.. you'll be amazed at what you find.
In a nutshell:
A sprite is a tile where a certain color is not drawn, so it has a transparent background, right?
A sprite can be one image, it can be many images. They dont have to have a transparency value if you dont want them to, that's up to you, and it depends on the kind of sprite you are using.
What file formats are usualy used for 2d rpg style games, bitmaps?
There aren't any predefined types that SHOULD be used, you can use any types that you like. PCX, BMP, TGA, and stuff like that are quite common.
Should tiles be stored in one large file?
That's totally up to you. Personally, i keep all the tiles for a single sprite in one file... but it depends on what you are doing.
What about sprite animation, how does that work?
Sprites are animated in various ways. You may have a sprite with just one image that moves around the screen (ie. blit to different parts of the screen during your program). You may have a sprite that doesn't move but has a collection of pictures associated with it, and over time you blit a different sprite tile (ie. a representation of the sprite in a particular position or state), and therefore make it look like it's doing things. Or you may have a combination of the two.
Does the word blit just mean copy to?
In a nutshell yes. copy and/or draw are common ways of interpreting it
What is back buffering?
Rather than drawing your scene directly to the screen each time, you can draw the scene to an area offscreen (in memory) and then blit the fully drawn scene to the screen. the offscreen area that you draw to is a back buffer.
page flipping?
when you are using back buffering, you flip the back buffer (or page) to the front buffer/screen buffer (or page). Basically you tell the computer to draw your scene from a different page. so you are flipping between buffers or pages...
hope that helps.
U.
Telenosis
05-15-2002, 10:06 PM
So backBuffering is synonymous with double bufering?
-----
a Game programming newbie
Sang-drax
05-17-2002, 05:54 AM
If I'm correct:
Double buffering is back buffering, but back buffering isn't necessarily double buffering.
Back buffering can mean triple buffering (3 buffers) or an arbitary number of buffers.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.