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 Professional Discussion / having problems with sprites

Author
Message
chester
23
Years of Service
User Offline
Joined: 11th May 2003
Location: United Kingdom
Posted: 18th May 2003 02:45
hi i seem to be having a big problem with sprites.
i`m using darkbasic pro,
if i run the screen scroling tutorial from the darkbasic pro web site i keep getting runtime errors,sometime i get a blank screen and sometimes i get just the background image, all this and i havent even changed the code.
But thats just the start.
If i run a dbpro helpfile (Sprite Functionality ) all i get is black screen and the text flashing on and off.
I have the dbpro begineers guide to programming (good book)
but in chapter 11 one of the examples you load in is called transprite, and you`ve guesed it, it throws a wobbley, what you get is the background image and thats, it its supposed to put a sprite onto the background image of a f15 plane ive added the source code for this one to see if anyone thinks it wrong.
i`m wondering if there is something wrong with my computor
i`m running windows xp pro , athlon xp2200 chip , 512 ram ge-force2 mx400 graphics card
any help greatly appriciated
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th May 2003 02:49
Because you are loading into bitmap 1, that bitmap becomes the current one. When you paste your sprite it pastes into the current bitmap... see where I'm going with this?

Use the SET CURRENT BITMAP command to switch back to bitmap 0 (the main display) after you have grabbed the image.
chester
23
Years of Service
User Offline
Joined: 11th May 2003
Location: United Kingdom
Posted: 18th May 2003 03:01
done that it came back with run time error 302 sprite does not exist at line 22

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th May 2003 03:03
Thats because in that code the sprite command is commented out (the line above the paste). So the sprite doesn't actually exist for you to paste it anywhere.

Uncomment that line and try again.
chester
23
Years of Service
User Offline
Joined: 11th May 2003
Location: United Kingdom
Posted: 18th May 2003 03:07
well i`m impressed thank you very much i`ve been mucking around with that for ages

Login to post a reply

Server time is: 2026-07-11 22:25:02
Your offset time is: 2026-07-11 22:25:02