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.

2D All the way! / sprite bug putting sprites on a background

Author
Message
codewarrior
20
Years of Service
User Offline
Joined: 29th Apr 2003
Location: United States
Posted: 29th Apr 2003 21:48
I am new to DB but not new to Basic...I've seen others post problems with sprite bugs and I think the one I found is a DB version problem. I got the book "Beginners guide to DB programming" and this is a code snippet from the book trying to put an F15 sprite on top of a background. The way the code is now it loads my F15 image with transparency for black pixels but the background fails to load, it gives me a blue background instead...it acts this way in DBPro but I tried it in a DB1 demo and the code works correctly. Anybody seen a workaround for this??
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Apr 2003 00:19
Yep. Use BACKDROP OFF, or use COLOR BACKDROP to set it to the colour of your choice.

It's one of the known differences - DBPro uses 3D acceleration to draw sprites.
CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 30th Apr 2003 03:21
All I do to get rid of the blue screen is use
Set Sprite sprite#,0,1
For some reason if I use Backdrop Off my fps drop by 50 fps or more, in a game I'm working on just using sprites and 2d in 800x600 I get 105 fps with out using the backdrop off and I get 57 when I use backdrop off. weird isn't it? You'ld think it would speed up not using the backdrop. Anyway after I set the first sprite like 'Set Sprite 1,0,1' the blue screen goes away.


CTP

Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 30th Apr 2003 05:14
codewarrior - there is a tutorial dedicated to solving this problem in DBPro available from this site.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
codewarrior
20
Years of Service
User Offline
Joined: 29th Apr 2003
Location: United States
Posted: 30th Apr 2003 08:41
Rich,
Which Tutorial is it?? I have 1 thru 11 downloaded...thanks in advance...
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 30th Apr 2003 14:34
Time to read number 10 again then

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"

Login to post a reply

Server time is: 2024-04-24 20:54:32
Your offset time is: 2024-04-24 20:54:32