Animated Bitmaps

This is a discussion on Animated Bitmaps within the Game Programming forums, part of the General Programming Boards category; I'm using SDL, and I need to have animated objects on the screen. I know how to move them about, ...

  1. #1
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913

    Animated Bitmaps

    I'm using SDL, and I need to have animated objects on the screen. I know how to move them about, but I also need to get the objects to change. Do I need to do different bitmaps for each action and display them in sequence over and over, or is it possible to make animated BMPs?

  2. #2
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    Usually a template, or a series of animations .bmp file is required. Lemme look... Here's one (bottom). You'd put code in that says "read in every 40 pixels etc" Then play a selection of bmps when you hit a certain button etc.

    I'm sure everyone knows what book this pic is from. Pulled it off the shelf for ya sean
    Attached Images Attached Images  
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  3. #3
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Oh, so I make one BMP that has all the frames in, then only read in the coordinates corresponding to the frame I want? So it's kinda like Bitmapped fonts.

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    I find it's easier if you use vertical strips (1 frame wide) to keep your animations in. This way indexing them is very very easy.
    "...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

  5. #5
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Good idea. Having downloaded the files to Bubba's (I think it was Bubba - I could be wrong) Skyroads 2004 (and I'm loving using the graphics as desktops), and noticed that the bitmap for his explosion was done in frames like this.

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by sean_mackrory
    Good idea. Having downloaded the files to Bubba's (I think it was Bubba - I could be wrong) Skyroads 2004 (and I'm loving using the graphics as desktops), and noticed that the bitmap for his explosion was done in frames like this.
    it was Magos' baby...
    SkyRoads 2004

  7. #7
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Yes I found that out... Although I'm having troubles running - I'd really like to play right now...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing bitmaps efficiently
    By scwizzo in forum Windows Programming
    Replies: 28
    Last Post: 06-30-2009, 08:25 PM
  2. Animated GIF Encoding Library
    By Tonto in forum C++ Programming
    Replies: 3
    Last Post: 01-08-2008, 12:57 PM
  3. DX9 Not Displaying Bitmaps
    By Sentral in forum Game Programming
    Replies: 9
    Last Post: 01-31-2006, 04:35 AM
  4. MFC: Multiple clicks shows multiple bitmaps - how?
    By BrianK in forum Windows Programming
    Replies: 0
    Last Post: 06-20-2004, 07:25 PM
  5. using standard bitmaps in the toolbar editor
    By Kibble in forum Windows Programming
    Replies: 0
    Last Post: 12-23-2002, 07:43 PM

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