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 / Screen Size

Author
Message
shood35
15
Years of Service
User Offline
Joined: 19th Nov 2009
Location:
Posted: 19th Nov 2009 15:14
I have a student that just asked me how to resize the window of a GDK Project. He is creating a game and yes the default window size is too small. Is there any way to change the size of a window without stretching its contents. He needs more area for the game. I of course tried the dbScreenWidth and such that doesn't do it.

Scott
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 19th Nov 2009 15:58
dbSetDisplayMode does change the display resolution, and when you are in non-maximized window mode it will size the window.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
LOLdaniel
15
Years of Service
User Offline
Joined: 19th Nov 2009
Location: LOLEVERYWHERE
Posted: 19th Nov 2009 23:22 Edited at: 20th Nov 2009 22:02
if you want to make it full screen without stretching everything, the code is



Ian G
16
Years of Service
User Offline
Joined: 3rd Jun 2008
Location: SSM, Canada
Posted: 20th Nov 2009 04:01
As _Pauli_ stated, setting the display mode to a higher res will change the window size accordingly. You can check out the display commands in the GDK documentation to get an idea. You can have full control over the window, idk what effect you're looking for, but you can also create fullscreen apps by dbSetWindowOff (a fullscreen 'window' can be made by maximizing the window and setting its layout to 0,0,0). This thread is kind of cool as it shows how to set up what kind of window you'll have at startup, it needs the latest update of the GDK to work properly however (the variables are pretty self-explanatory) http://forum.thegamecreators.com/?m=forum_view&t=144462&b=22
shood35
15
Years of Service
User Offline
Joined: 19th Nov 2009
Location:
Posted: 24th Nov 2009 14:25
Thank you all for your ideas and info. I appreciate it.

Scott
shood35
15
Years of Service
User Offline
Joined: 19th Nov 2009
Location:
Posted: 24th Nov 2009 14:32
I believe what I tried before was the dbSetDisplayMode(1024, 768, 32) and what had happened was that it did reset the resolution but it for some reason set it based on a 640x480 window centered in the middle of the screen. Essentially the physical window size was the same 640x480 but it fit more contents in the window which made the contents look much smaller based on the 1024x768. Does that make sense?

Scott
shood35
15
Years of Service
User Offline
Joined: 19th Nov 2009
Location:
Posted: 24th Nov 2009 15:09
Okay 'Ian G' that link you gave rocks. Thanks for it.

Scott

Login to post a reply

Server time is: 2024-11-20 09:38:28
Your offset time is: 2024-11-20 09:38:28