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! / not able to keep background

Author
Message
Hugh
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location:
Posted: 26th Oct 2002 08:09
Hi,

I'm having trouble figuring out why placing a sprite is erasing the background. Am using DBpro. The code below illustrates my problem. Pretty sure I'm just not getting something simple... but been scouring help and tutorials and forums to no avail.

hide mouse
load image "ship.png", 2
load bitmap "background.png"
while controlkey() = 0
endwhile
rem ** soon as you hit control, the background leaves
do
sprite 1, mousex(), mousey(), 2
loop
Hugh
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location:
Posted: 8th Nov 2002 17:47
Please let me know if this problem is a DBPro bug, a coding problem, or maybe something wrong with my DBPro install.

Does this code work for you?

Is the current bug list posted somewhere?


Thanks,

Hugh

Kensupen
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 25th Nov 2002 20:34
You have to paste the background each loop, or it will go away. You also have to paste all 2d inamges from back to front in your code, so background 1st, then objects, then any other like GUI.

-Kensupen
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 25th Nov 2002 21:24
This is a DBPro behaviour.
Execute Set Sprite N,1,1 once before any sprite command if you want it to act like DB1.

In your example insert
Sprite 1,1,1
at the top

Login to post a reply

Server time is: 2024-03-28 17:07:40
Your offset time is: 2024-03-28 17:07:40