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 / The sprite that goes 0 to 60 in seconds flat

Author
Message
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 29th Jul 2009 02:57 Edited at: 29th Jul 2009 03:00
This came to mind quite by accident when I misplaced a variable for a get and then paste image command. Move the mouse around or leave it still. Press the "c" key to clear the screen. (You might want to watch it a little while to get the full effect.)


That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 29th Jul 2009 05:32 Edited at: 29th Jul 2009 05:32
without looking at the code, let me guess what you did:

made a random image
made a sprite of that image
turned off the backsave using set sprite
made a large offscreen bitmap
then you made a main loop composed of:

copy an area of the offscreen bitmap to the screen
reposition the sprite
copy the screen back to the other bitmap
cls
then used variables to control what section of the bitmap was
copied
used other variables to control the angle and speed of movement
and every so many seconds you randomly changed the image



am I close?

Login to post a reply

Server time is: 2024-05-20 07:33:47
Your offset time is: 2024-05-20 07:33:47