Results 1 to 7 of 7

Thread: Single Bitmap Animations (NEED HELP)

  1. #1

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    I am making a game that is sort of like Command and Conquer Red Alert. But with a different concept in mind. But right now, I need to know how I'm supposed to do this: Play an animation using a single bitmap. I have the bitmap here:

    http://www.geocities.com/warmaster2000us/FPower.bmp

    It's a bitmap with 29 Frames or sections each are 17 Pixels wide and 23 Pixels high. It is supposed to be about 2-3 seconds long. Just download the bitmap and save it to disk. Then work with it from there. As soon as you see this bitmap, you will figure out exactly what I'm talking about here.

    Note: The animation is of the Fire-Power upgrade for Command and Conquer Red Alert. How I extracted these animations from Red Alert is from a utility called Ramix. http://come.to/tesla Thanks for any help.
    Designer/Programmer of the Comtech Operating System(CTOS)

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Warmaster199,
    Here is how u can create amimation from a single bmp. Add a Microsoft Clip Control to your form. Also add a imagebox and a timer. Set the Picture Property of the PictureClip1 to your picture(Fpower.bmp).

    Code:
    Dim y As Integer
    
    Private Sub Form_Load()
    PictureClip1.Cols = 5
    PictureClip1.Rows = 6
    Timer1.Enabled = True
    Timer1.Interval = 100
    End Sub
    
    Private Sub Timer1_Timer()
    y = y + 1
    If y = 29 Then y = 0
      
    Image1.Picture = PictureClip1.GraphicCell(y)
    End Sub
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    The most wonderful thing for
    making games is DirectX and
    if you take some time to learn
    it now, it will save you ALOT
    of time and effort that will
    just make you want to quit.

    I would go to http://www.planet-source-code.com
    and look up DirectX in the VB section
    and then see what you can find.

  4. #4

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    Danial, that code is VERY helpful and good. It works like a charm. Also, I looked into the bitmap I posted here and found that it is 24 pixels high, not 23. all the other dimensions are fine. But your code didn't even need those dimensions. Thanks alot.

    One thing, how do you make it so it doesn't loop?
    Designer/Programmer of the Comtech Operating System(CTOS)

  5. #5

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306
    OK. I found how to stop it from looping, but, Isn't there a more efficient way than using a timer, PictureClip, and Image control for each one? I know I can change the PictureClip and Image to another thing, but what about the Timer? DirectX is very fast and I know a bit of things in it, but how would I do this stuff using DirectX?
    Designer/Programmer of the Comtech Operating System(CTOS)

  6. #6
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    If you want to do the same thing in directx, then I think www.themasoft.cjb.net is one of the best sites to start. It has some excellent examples.
    Oetje
    [email protected]
    93606776
    Visual Basic 6, Windows 2000

    Never pet a burning dog

  7. #7

    Thread Starter
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 2000
    Location
    Canada
    Posts
    306

    Unhappy

    I didn't find that much on that site. Do you have another site?

    Oh, is anyone interested in this game?
    Designer/Programmer of the Comtech Operating System(CTOS)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width