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 / Creating sprite enables 3d mode?

Author
Message
ZKAT8IT
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 18th Apr 2003 06:03
in my program writen in DBC i have a image pasted for the background and then a sprite over that image, but when i run the program in DBP as soon as the sprite is created it seems as if it goes into 3d mode and i lose my background image, is there a way to stop DBP from going into 3d mode when the sprite is created?
The Wendigo
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 18th Apr 2003 10:31
nope. sprites are now taken care of via 3D plains with textures. Reason being, the 3D accelerater can handle them and thus, the software and CPU can deal with other things. Basically, it's a speed optimization even though it sounds backwards.

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Apr 2003 13:38
You can get a quick fix though (the code you should look at is in the 'DisableBlueScreen' function) :



But you will find that the above code runs terribly slow.

My advice is to ensure that backsave is switched off for all your sprites and to redraw the background yourself every frame. That's what this slightly modified code does :



You'll probably note that I haven't switched off the backsave facility on sprite 1 - that's because there seems to be a 'feature' in DBPro that once you switch the first one off, all new sprites are created with the backsave facility off.

Also, I'm still switching the backdrop off, because otherwise the system would waste time clearing the screen to blue, just so that I can overwrite it all with my image - if you have a crap video card like mine ( ) this saves quite a bit of time per frame.

Login to post a reply

Server time is: 2026-07-10 19:47:12
Your offset time is: 2026-07-10 19:47:12