Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Animate card dealing

Status
Not open for further replies.

Galarun

Programmer
Jun 28, 2005
24
0
0
US
Hello programmers!

I have a cribbage card game programmed and I want to have cards move from one place to another as in dealing the cards to players' hands. I can't figure out how I would go around doing this. My first guess was to have a function that would move the card along a straight line (from the inital point to the final point) and have it displayed a certain intervals so it seems like it's moving. However, this seems a bit innefficient and I was wondering if anyone here knew of a better way to animate the cards going from one place to another. Any feedback would be nice as I am still a beginner programmer. Thanks a lot!
 
Why would your suggestion seem inefficient? If you are animating, you are literally moving the object from one point to another and displaying at certain intervals, as you stated.
 
Yeah you're right, but I was thinking there might be a way to literally move the card continuously across a line rather than display it at certain intervals along the way, but I might be wrong.

I'll do the straight line method first, but just curious, how do most people do something like this? Is there a better way?

Thanks for your replies,
 
This method is how all animation is done, even in the cartoons, computer animation is no different.

Age is a consequence of experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top