Anim!

This is a discussion on Anim! within the Windows Programming forums, part of the Platform Specific Boards category; Hi all! Question: Whats the best way to add animation to a VC++ Windows program? eg. You click a button ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    7

    Talking Anim!

    Hi all!

    Question: Whats the best way to add animation to a VC++ Windows program? eg. You click a button and a person walks across the screen?

    Thankyou all!!!

    Weever~

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    88
    mhm.. the bestway?
    maybe a video! you load a video file and display it...

    or you can animate a few images yourself with a timer...

    depends on what do you want to do
    Hope you don't mind my bad english, I'm Austrian!

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    7
    Sorry, I better give a bit more info . Basically I want to write an interactive program that teaches people how to play cards using animation and images rather than just writhing a plain old Word document or power point presentation. eg. I want a card to move to the middle of the screen when the user presses next or if a computer player looses, there would be an animated squence of the player falling off their seat.

    I want to make it clear I am not programming a game, just a teaching aid, so all events will happen in an ordered sequence.

    I hope I've made it a little clearer now.

    Thankyou all,

    Weever~

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,641
    Sadly, animation in windows is no trivial affair. It demands a lot of work and development. Right now I am working on a C++ class which will automate most of it and I will post it in a couple of weeks. Until then, though(and I'm away from my compiler so I cannot be too specific), basically, you must create one HBITMAP for each 'frame' in the animation, plus an HBITMAP for the corresponding 'mask' of each frame. You must perform I think 6 BitBlt operations that AND/OR/INVERT, etc, each frame and it's mask onto the background. A very yucky process indeed!
    Check back for that C++ class, though...
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    animation in windows...

    I have a sample of code.... if you would like it.... I wrote a black jack game which displays some cards and chips... and has some primitive sound effects.... email me if you want a copy....
    zMan

  6. #6
    Registered User
    Join Date
    Aug 2001
    Posts
    223

    black jack sample copy

    by the way enter www.cprogramming.com on the subject line.... I get a lot of junk email....
    zMan

  7. #7
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Post Nah!

    Its not that hard to do, if you just want to get started, using GDI you can just load a sequence of images and play them back a a sample rate by timechecking (SYSTEMTIME == SYSTEMTIME) or w/e formula, or just slwo ur prog down w/ 'Sleep'.

    However you choose to do it, its not "that" hard to get going, its once you start doing professional grade in anything thats hard... also I dont think (not that its a bad thing) that you could'ent have thoguth of how to do with w/o this board.... I mean theres only one way I know of movies work...

    Have fun! SPH

  8. #8
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Hey!

    I have wirtten you a little program, it will play 'simple' Bitmap based animations, and not all of the meath if "perfect", feal free to touchb it up and intergrate it all into anything u need... this is just an example (It should be attached to this message).

    SPH

    P.S. If you have any "extensive" questions... IM or Email Me: (Adresses / SN's are in my profile).
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    Jan 2002
    Posts
    7
    I've got a couple of ideas now so thank you for all your help, but I've used both OpenGL and DirectX to produce various forms of animation before. Am I best just sticking with one of these and integrating it into the rest of the Windows program?

    Thanx,

    weever~

  10. #10
    Registered User
    Join Date
    Jan 2002
    Posts
    7
    So am I best just using one of the graphical API's I mentioned above or is there some way of importing animated clips created in something like Director?

    Thanx,

    Weever~

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. undeclared identifier problem
    By jjj93421 in forum C++ Programming
    Replies: 13
    Last Post: 04-24-2004, 09:22 AM
  2. Level Editor
    By jdinger in forum Game Programming
    Replies: 14
    Last Post: 04-03-2003, 05:46 PM
  3. New art/idel anim question...
    By jdinger in forum Game Programming
    Replies: 9
    Last Post: 09-06-2002, 12:17 PM

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