Basic 2d Programming Concepts

This is a discussion on Basic 2d Programming Concepts within the Game Programming forums, part of the General Programming Boards category; I have some questions on 2d programming concepts. A sprite is a tile where a certain color is not drawn, ...

  1. #1
    Registered User JoshG's Avatar
    Join Date
    Mar 2002
    Posts
    326

    Basic 2d Programming Concepts

    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.


  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    88
    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

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    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.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    2

    Question

    So backBuffering is synonymous with double bufering?
    -----
    a Game programming newbie

  5. #5
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 09-22-2006, 04:39 PM
  2. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 10:28 AM
  3. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 05:28 AM
  4. basic Mathmatics and Algebraic concepts
    By incubusnb in forum C++ Programming
    Replies: 8
    Last Post: 05-22-2005, 07:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21