|
-
Nov 5th, 2001, 05:23 PM
#1
Thread Starter
Junior Member
moving object and animation
hey i can make a image move around and such but i want to make it so if i had a little guy his legs would move and he wouldnt have a white background. How would i do this?
-
Nov 6th, 2001, 07:08 PM
#2
Frenzied Member
Create a set of graphics (frames like in movies) and make them on a black background.
Create the same graphics except on a white background and the image is just a shadow (all black)
Use BitBlt to copy the shadow (mask) with vbSrcAnd
Use BitBlt to copy the black backgrounded pic over the mask with vbSrcPaint
Voila
-
Nov 9th, 2001, 02:01 PM
#3
Junior Member
Try Fox's Site, Theire's an animation programe there,
really good
The world would be better without
!!!!!!!!!!!YOU!!!!!!!!!
-
Nov 9th, 2001, 02:49 PM
#4
Member
Im really wondering this question too
Not the transparent image using bitblt but the moving the legs thing..... how do you make the image or "guy" have his lefs moving while he moves across the screen
I know how to make the guy move
Private sub timer1_timer()
imgguy.left = imgguy.left - 1
end sub
But how would you make his legs move while he is moving..... you probably have to get 2 different pics but how would you make them appear like that.....
Thanks for all the help.
-
Nov 10th, 2001, 01:17 PM
#5
Frenzied Member
Like I said, use frames (like stop motion animation)
PLEASE don't tell me you don't know how basic animation works...you have about 25 or 30 frames per second, each frame is a still picture, so that when you draw them quickly they appear to be moving.
Have a control array of picture boxes that store the separate frames, and a variable that tracks the current frame. Whenever you move the actual image, you have to change the frame.
Don't use actual picturebox/imagebox controls that move around; rather, have a big picturebox that doesn't move, and move the coordinates for bitblt.
-
Nov 10th, 2001, 02:19 PM
#6
Good Ol' Platypus
Some things that might trip you up:
1. Bitblt: See my example.
2. The animation doesn't loop: Add 1 to the frame counter but use the MOD command afterwards, eg.
VB Code:
FrameNum = FrameNum + 1 Mod NumFrames
In this, if you had 4 frames and their indicies were 0 to 3, then the code would work. If the indicies are 1 - 4, you must add 1 to the end result when you're using the index, eg.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Nov 11th, 2001, 04:08 AM
#7
Member
-
Nov 11th, 2001, 12:48 PM
#8
Frenzied Member
Sorry. Animation is done in frames, that's it. There's no other way to do it.
If you want a full second of animation, you need 30 frames for it to look good. Five seconds needs 150 frames. Ten seconds needs 300...you get the idea.
You can lump all of the frames into one picture, and just bitblt different portions of the pic, but you just have to use frames, sorry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|