Sprite Sheets

This is a discussion on Sprite Sheets within the Game Programming forums, part of the General Programming Boards category; I don't get how you could use one image of a bunch of different sprites with a black background, and ...

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Question Sprite Sheets

    I don't get how you could use one image of a bunch of different sprites with a black background, and use that one image of all the sprites to incorporate each sprite into a game individually. How does that work?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Usually you have a vertical strip of sprites for animation. If you have a bunch of 64x64 images for animation you just offset downwards into the image depending on which frame you are drawing. Basically you are just drawing different portions of that original image.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    Originally posted by MrWizard
    Usually you have a vertical strip of sprites for animation. If you have a bunch of 64x64 images for animation you just offset downwards into the image depending on which frame you are drawing. Basically you are just drawing different portions of that original image.
    Is there any particular function I'd use for this?

  4. #4
    Registered User KurtSurge's Avatar
    Join Date
    Aug 2003
    Posts
    25
    BitBlt() is a useful function for this.
    It's too bad that stupidity isn't painful
    --Anton Szandor LaVey

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX 9 sprite issue
    By maxthecat in forum Game Programming
    Replies: 9
    Last Post: 05-18-2006, 04:04 AM
  2. SDL question (long)
    By yahn in forum C++ Programming
    Replies: 0
    Last Post: 04-16-2006, 08:46 PM
  3. GDI sprite (Win32 API)
    By fiff in forum Game Programming
    Replies: 4
    Last Post: 06-24-2005, 09:09 AM
  4. Replies: 3
    Last Post: 05-12-2003, 05:49 PM
  5. Unable to copy sheets in Excel from VC++
    By mp30 in forum Windows Programming
    Replies: 0
    Last Post: 04-03-2002, 10:58 PM

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