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 / Fulldesktop and screen gamma

Author
Message
Cescano
10
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 8th Jan 2015 02:51
Seems that launching the game in fulldesktop mode the "set gamma" command doesn't work, I can't fade my screen to black and back to normal.
Launching the game using "set window off", so fullscreen mode, doesn't give this problem.
The reason why I was going to use fulldesktop is the ability to alt+tab and back to the game without crashing, I know it steals abour 5% of the FPS and in fact I would add a setting to decide in which mode launch the game, but know I feel like I will not use the fulldesktop mode if this means bugs and bugs other than decreased performance
MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Jan 2015 03:04
You need to write your own screen flush recovery code...

Like this:

https://www.deepredonline.com/vabblog/videoon4.html
Go to 03:10 and play to see how I handle the Screen Flush catcher...

There is some code on the forum relating to screen flush but I cannot remember what it was called...

Basically the simplest method is to detect Object 1 or Image 1 and then reload everything if one or both or either is missing...

Also low FPS is intentional...

MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Burning Feet Man
17
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 11th Jan 2015 09:16
Heya MrValentine, do you have a Youtube (or equivalent) channel for your videos?

Also, I'm curious how quick your reload media test would take if you removed the Sync command from the reload procedure.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MrValentine
AGK Backer
14
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Jan 2015 09:59
Check out yesterdays post, Video On 9 the recording is from the instant the application sets into full screen! and from that moment on as soon as the music plays, that is it, the objects are loaded and the lights are setup, and then the sound file is loaded and looped...

To be honest, not a huge amount of difference, maybe 33% faster?

Keep in mind my objects are just read from a text file and then dynamically based off that data created and have the physics applied and a single texture applied at the moment...

You are basically calling all your setup information again, BUT NOT YOUR VARIABLES! So you may want to store the variables as soon as you recover... in case the entire application collapses suddenly... if your game project relies on last location or last data etc. that is...

I might upload all the videos to The Hello World Channel on YouTube as soon as I submit the game... They play poorly at the moment because I a using a remote shared hosting server... might be faster if I used my home server... and also not had the time to get the right recording/encoding settings properly configured at the moment, everything is pretty much immediate and sudden... no planning was made for the videos, but I will be able to improve that as you will see with Video On 9! I changed my recording method!

Thanks!

Mage
Valued Member
18
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 24th Jan 2015 09:31 Edited at: 24th Jan 2015 09:38
Don't use Gamma controls to fade to black. That's not what it's for and that's why it's not working well for you.

No modern game does this and you'll notice their gamma controls also don't work in windowed mode either.

Instead make a small all black image maybe 32x32 and load it into DB Pro. Create a sprite with it and stretch it to the screen dimensions. Hide the sprite. Paste the sprite continually to the screen gradually increasing its sprite transparency from 0. Easy.

Now you don't need Full Screen Exclusive Mode (Crashes when tabbed out).

If you still want to do screen flush recovery you'll find the simplest and easiest example here:
http://forum.thegamecreators.com/?m=forum_view&t=202959&b=1

You won't find a simpler example that works.

Login to post a reply

Server time is: 2025-05-11 08:19:32
Your offset time is: 2025-05-11 08:19:32