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.

Newcomers DBPro Corner / Getting Black Screen

Author
Message
Uechi
18
Years of Service
User Offline
Joined: 2nd Sep 2006
Location:
Posted: 4th Nov 2010 02:56
All I get is a black screen - this is the simplified code
file is in the folder for the program




set display mode 800,600,32
color backdrop 0
sync on
sync rate 0
load image "dane.bmp",465
sprite 465,100,0,465
sync
wait key
end
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 4th Nov 2010 08:42
Sometimes the first SYNC doesn't quite work. Make your first SYNC right under the SYNC RATE command or put the sprite in a DO/LOOP so it SYNCs over and over again.



You should use .png for images instead of .bmp and never ever use .jpg (they change the colors around). .pngs allow you to use alpha channels so you can make transparent areas on the sprites.

Uechi
18
Years of Service
User Offline
Joined: 2nd Sep 2006
Location:
Posted: 4th Nov 2010 17:44
adding the extra sync did it

also in my real code I did not set current bitmap back to 0
thanks for your help
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 4th Nov 2010 23:42
The only time you use SET CURRENT BITMAP is if you use LOAD BITMAP with a number other than zero. Using just LOAD IMAGE you don't need to set the current bitmap since Darkbasic Pro starts at bitmap zero.

Login to post a reply

Server time is: 2024-11-23 07:19:01
Your offset time is: 2024-11-23 07:19:01