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.

Dark GDK / dbSetDisplayMode Alternative (s p a c e)

Author
Message
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 22nd Feb 2012 02:36 Edited at: 22nd Feb 2012 02:37
Hi, I need a loading screen for my game and decided that the resolution should change when loading. The problem is that I think the program flushes a lot of game data when setting the resolution back to normal after loading.

I have found no alternate way of doing this in DarkGDK so I am thinking of creating a temporary windows and using SDL to render the splash screen along with the loading bar and hiding the game window.

Does anyone have any tips on how I should do this?

(Sorry about the space thing, I needed more spaces in the subject title)
Hassan
14
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 22nd Feb 2012 10:23
why would you need to change the resolution? even if you succeed, after that, when you switch the resolution back to normal you will lose all loaded media

you will just have to keep the resolution, and put your media loading in a loop, in such way that every loop, only 1 (or a little bit more if you have too much to load) object/image/effect/whatever is loaded, and after loading it, you will update the progress bar (increase width or whatever it's like) then dbSync to render the updated progress to the window

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 22nd Feb 2012 13:52
In my X Flight game, I have the main menu screen set to the current windows resolution. You can set the resolution for the game environment at that point. So when you enter the game, the resolution changes to what you selected. I find this method useful because if the player selects an incompatable resolution, this screen will never be unsupported.

The problem with having to reload all the objects is an issue, but I don't go between the game and the main menu more than once. I only load the objects when going from the main menu and the game.

The fastest code is the code never written.
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 23rd Feb 2012 14:48
Thanks for input.

I will just have to keep the resolution at normal until I find an efficient bypass.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Feb 2012 22:45
If you want to change the resolution on-the-fly in your game, you will be forced to reload all the objects each time you make the change. In that case I would suggest making a "LoadObjects()" funtion and call that each time you make a change.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-04-26 06:49:31
Your offset time is: 2024-04-26 06:49:31