Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Image Animation

Author
Message
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 13th Jul 2003 01:56
is there a possiablity to animate images in DB programs? like rotating images or spin or moving it from one place to another. if so plz try to give me some examples or a program with that requirement.
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 14th Jul 2003 19:09
HELLOOOOOOOOOOO????????
IS ANYBODY OUT THERE???????????
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 14th Jul 2003 21:57
you can use the sprite commands (check the help)
but those are mostly slow

you can also use the paste image command, and move the image by changing variables you use in that command (in a loop)

just say it if you want more explanation

[href]www.bernardfrancois.com[/href]
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 15th Jul 2003 01:02
ofcorse i NEED more explanation i'll be very thankful if u support me in this!
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 15th Jul 2003 14:21
for example if you want to animate your image dynamicly using the arrow keys:



or when you just want to animate your image along a mathematical function y=x²:



you can also combine multiple mathematical functions, for example y=x² and y=(x-2)²
then we want the image to follow the path of the first function for an x# range from 0 to 2, and the second function for an x# range starting from 2



offcourse you can change the speed# variable as you like
you'll also need to have loaded an image 1...
if the paste image command gives an error, you'll have to use paste image int(x#),int(y#)



you could also store the x# and y# values in an array, in case you don't find a good function for the movement you want



note that you cant change the speed in the above method... to do this you can use this code (I just slightly adapted the above code)



in this case, the image will advance to the next frame every 5 frames (this method has the disadvantage that you can't use every possible speed, but you can also change the speed by using bigger/smaller differences between the induvidual keyframe's x and y coordinates)



I hope this was enough explanation . But if you still have any questions; just shoot!

[href]www.bernardfrancois.com[/href]
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 16th Jul 2003 03:31
hey thankx alot fer ur cool examples!
these were only moving from a position to another, i was wondering if there's cool animation effects also, like fading, rotating, zooming...etc.
and about the position, how can i make the image slide in to the scene and stop at a particular position?

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 16th Jul 2003 11:17
you might write a function to do this, which lets an image move from one coordinate to another... if you want a variable speed for this you can use the y-value of a good mathematical function

[href]www.bernardfrancois.com[/href]

Login to post a reply

Server time is: 2025-05-20 04:48:56
Your offset time is: 2025-05-20 04:48:56