Product Chat / Is there any way to force gg standalone to use a certain resolution?

Author
Message
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 10th Apr 2020 19:48
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 10th Apr 2020 20:36
Not at the moment. You have to set things sizes according to the screen ratio.

GetDeviceWidth: GetDeviceWidth() -- returns the display width in pixels
GetDeviceHeight: GetDeviceHeight() -- returns the current display height in pixels

That grabs the desktop x and y lengths. Which you can then work out the ratio needed for your sprites etc.

Apart from keeping things easy and simple usage-wise, never understood why the option to change resolutions and even run in a small window have never been supported, maybe performance, but always nice to have the option; definitely for testing. The resolution can change on the fly with the disabledynamicres in setup (if it still is relevant). So is possible, technically.
Maybe, if your monitor is causing you issues, you could setup a virtual machine to test on? Although never set one up for Windows before and not sure how it would run. Then you could set the desktop res to test different ratios at least.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Apr 2020 20:55
Can't you just set the resolution before running GG?
Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 10th Apr 2020 20:58 Edited at: 10th Apr 2020 20:59
I was thinking of suggesting that, but I think for a game you want to sell you may not want to change the desktop res beforehand. If you mean for testing, apparently his new monitor is not good with normal resolutions. So a way of forcing into a window would alleviate that.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Apr 2020 21:24
I was thinking along the lines of a .BAT file or small C++ App which could change the resolution, run GG, then change it back on exit.
Been there, done that, got all the T-Shirts!
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 10th Apr 2020 21:54
Yeah it was changing it back I worried about Just in case GG crashes... You know how it is. but if you can still resume the desktop after a crash maybe
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 10th Apr 2020 22:14 Edited at: 10th Apr 2020 22:27
The way a lot of games do this (especially Bethesda games) is with a launcher that will edit the setup.ini based on the user selection.

So you may want to connect with anyone working on an .EXE launcher and see if something like this could be possible with their 3rd party software. I noticed you are using one for your latest game.

So while a lot of games have resolution options within the game, this is not ideal as it can cause crashing or simply the game might bleed out of the screen preventing users from exiting or correcting the resolution. So the launcher method is more ideal as it happens before the game even launches. So if your video card doesnt support it, you'd get an error more early on, rather than in the main menu of the game or within the gameplay.

You just need some clever program to detect the resolution lines in the setup.ini and have it replace it a drop down list of values.



If someone was kind enough to make a launcher that would modify other setup.ini properties within your standalone game project folder.. that would be fantastic... even better if TGC some how supported with this, though i doubt that would be in the cards.

My Visual Basic skills are not good enough to support with this one but I do know the launcher modifying the setup.ini file method is the solution. I'll see if i can dig around for a light program that could create an interface for this that can do external file manipulation. Important to have a set to default option as well.

Might even be worth checking out Unreal, Unity and CryEngine resources made by the community for this sort of thing and see how modular they can be for modifying setup text files.

Quote: "I was thinking along the lines of a .BAT file or small C++ App which could change the resolution, run GG, then change it back on exit."


That's an idea too. I remember the older CD-ROM games that would boot up an auto.bat for the games and it would present resolution options 1,2,3,4 etc and with a press space to continue then the bat would just the launch the game. I could actually write up something like no problem. Though getting it to read what resolution you already have and have it just prompt to Yes or No and if no gives you the resolution options or yes/continue to have it change the resolution to your current. Something I'm assuming like this for getting the resolution in batch operations: here

@duch who worked on your game launcher?
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 10th Apr 2020 22:18
Ahh, I didn't spot that in the setup.ini file:
fullscreen=0
width=-1
height=-1

Can't you just give those some values to force the resolution?

i.e.:
fullscreen=1
width=1920
height=1080

or whatever.
Been there, done that, got all the T-Shirts!
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 10th Apr 2020 22:45
Quote: "Can't you just give those some values to force the resolution?"

No.
In the setup ini documentaion:
Quote: "
width = Not Used
height - Not Used
depth = Not Used
aspectratio = Not Used
"
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Apr 2020 00:38
@AmemMoses Heh. I tried that years ago, but no ignores normal resolution settings as Corno concurs above. Perhaps with max in the pipeline this may be a future option
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2020 01:10
Right so a launcher that edits the setup.ini wouldn't achieve anything then, my original idea sounds like the best one imo.
Been there, done that, got all the T-Shirts!
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 11th Apr 2020 01:18
I'm working on it - but it's not straight forward to get the engine to do it, though some progress made - there's a lot of DX9 windows stuff mixed up with DXGI:

https://forum.game-guru.com/thread/213870?page=7#msg2628937

Cheers.

GPU: GeForce RTX 2070 SUPER PassMark: 14817
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 11th Apr 2020 04:34 Edited at: 11th Apr 2020 04:36
I didn't realize setting width and height in setup.ini didn't do anything
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 11th Apr 2020 09:19 Edited at: 11th Apr 2020 09:25
Now I thought it wouldn't matter whether you used a launcher to select a res from the setup. ini or not.
Once you hit the title.lua it bypasses all of that anyway ?

-- choose ideal resolution
BackdropOff()
DrawSpritesLast()
resolutions = require "titlesbank\\resolutions"
g_strBestResolution = resolutions.findclosest()
etc ?

im no scripter but would this make it easier to make a res selection from the actual menu ?
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Apr 2020 13:09
That code simply chooses the 'best' set of title images to go with the 'actual' resolution.
Been there, done that, got all the T-Shirts!
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 11th Apr 2020 14:23
Quote: "That code simply chooses the 'best' set of title images to go with the 'actual' resolution."

Ahh right got it .. So the res is set before it gets there then.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 11th Apr 2020 18:49
Quote: " there's a lot of DX9 windows stuff mixed up with DXGI:"

And it will be there till TGC abandon .X file format.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 11th Apr 2020 21:30
Not really related - about swapchain management and how windows and full screen are rendered using back buffer and render targets using direct x 11 - the api rather than the .x format for models. I can’t get free resize of non full screen windows to work properly but not sure it matters .

Cheers.

GPU: GeForce RTX 2070 SUPER PassMark: 14817
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 11th Apr 2020 21:38
Is it true that Max will have windowed mode for standalones?
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Duchenkuke
GameGuru VBOTB Developer
8
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 12th Apr 2020 07:47
that would certainly be a cool thing
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 12th Apr 2020 16:21
One way, but not going to be of any use to you. GG Loader and AGK
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.

Login to post a reply

Server time is: 2024-11-23 18:29:25
Your offset time is: 2024-11-23 18:29:25