Author Topic: Graphic Driver  (Read 321 times)

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Graphic Driver
« on: 31 Dec 2017, 08:50 »
Good morning to all AGSer!

Recently I discovered a minor issue that I am sure it is regarding my computer but at the moment I don't know why this is happening and I would like to know if I can fix it somehow. So, if I start a new project into Ags (no matter which graphic driver I choose from the default panel) the game seems to go slowly into the editor. But if I run the game from the exe file (with software renderer) then the game run as it should do. Also I found out that if I do (ctrl+F5) run the game without debugger then the game go fine like when I run it from the exe file. So I am wonder why into the editor the game look slowly? There is a way for me to fix this?

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #1 on: 31 Dec 2017, 14:23 »
Could you tell which exactly version of AGS are you using?
Also, when you run the game, press Ctrl + Alt + V, that will display gfx mode information. Is there any difference between it when you run with debugger or without debugger?

You should also know, that Default Config pane creates default config for your game, but as soon as you run setup program at least once there will be user config created (in the same location as savedgames), which will override default config.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #2 on: 31 Dec 2017, 17:03 »
Thanks Crimson Wizard for answering.

At the moment I am using Ags 3.4.1 rc3.
I have to say that your advice to use this debug command have been very useful. So the first thing that I do when I open a new project is to go to the default panel in the editor and change the graphic driver to be Software renderer and then I run the game normally into the editor by pressing F5 and this is what I get so far.


I don't know why it is setted to be OpenGL when I just changed to be Software renderer before. Also into the "acsetup" it is setted as driver=Software.

If I do exactly the same thing by pressing ctrl+F5 by running with the debugger then I get it right as it should be.


Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #3 on: 31 Dec 2017, 17:23 »
Default Setup does not apply unti you do Build -> Build Exe or Rebuild all files. Maybe that causes this issues.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #4 on: 31 Dec 2017, 19:38 »
I don't know because when I first open a new project I change graphic driver into the default panel in the editor to be software renderer, I do build -> rebuild all files then build -> build Exe, I run the game into the editor but anyway it is still show OpenGL as graphic driver...

:EDIT: I have just re done in this way and it is worked fine this time.
 
« Last Edit: 31 Dec 2017, 19:44 by Vincent »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #5 on: 31 Dec 2017, 19:50 »
I will test again later to see if there is patricular way to reproduce this. Also, it is strange that there were differences when you run with debugger and without one, because in theory it should work the same.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #6 on: 31 Dec 2017, 20:23 »
Also, it is strange that there were differences when you run with debugger and without one, because in theory it should work the same.

Yes in theory both of the way should work the same way as I thought. I was a kind of surprised that they were working differently at all but I am not sure though how to reproduce this. Maybe by changing the graphic driver without re build the exe file?  So maybe if you press F5 it show OpenGl but ctrl+F5 it show as you have setted the graphic driver without re build the exe file.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #7 on: 31 Dec 2017, 22:28 »
Ok I think I found out the problem maybe...

So the first thing that I do when I open a new project is to go to the default panel in the editor and change the graphic driver to be Software renderer.

Now, if I set the resolution of the game to be lower than 800x600 (and doing Build-> Build exe) it keep the changes to be software renderer when I test the game into the editor by pressing F5. But if I set it to be 800x600 it display OpenGL...




:EDIT: I have just re done in this way and it is worked fine this time.
I believe that it worked because the resolution of the game was lower than 800x600.
« Last Edit: 31 Dec 2017, 22:44 by Vincent »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #8 on: 31 Dec 2017, 22:58 »
Do you have a game config written by setup program? It might be in the savedgames folder for your game.

What is your desktop resolution? I wonder why on your first screenshot the window is smaller than the size of the game.
In theory, software renderer may fail to create a window of certain size, in which case it may try other renderers.
« Last Edit: 31 Dec 2017, 23:01 by Crimson Wizard »

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #9 on: 31 Dec 2017, 23:16 »
You mean acsetup.cfg? It's just showing this inside the document.
[graphics]
render_at_screenres=0
[language]
translation=

This is looking incomplete altought I am using to delete the folder of the savedgame and to re build the exe file anytime.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #10 on: 31 Dec 2017, 23:32 »
At the moment I am using a netbook it has a screen resolution of 1024x600.

I wonder why on your first screenshot the window is smaller than the size of the game.

This is a good question indeed, I really don't know why. But the screenshots were taken at the same game testing with same resolution. One runned by F5 and the other by ctrl+F5.


In theory, software renderer may fail to create a window of certain size, in which case it may try other renderers.

If I try other renderers the game look slowly into the editor and from the exe file too. But software renderer seems to go much smoothly to my netbook.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #11 on: 01 Jan 2018, 00:23 »
At the moment I am using a netbook it has a screen resolution of 1024x600.

I wonder why on your first screenshot the window is smaller than the size of the game.

This is a good question indeed, I really don't know why.

Well, your first sentence already explains why: if your game is 1024x768, and your desktop is 1024x600, the game just won't fit and has to be scaled down.

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #12 on: 01 Jan 2018, 08:34 »
Sure, this is quite logical for me too but why in the second screenshot it get a different scaled?

First screenshot is 758x569 and the second one is 1024x600.
By the way I understand that there is no way for me to fix this. If I do a resolution higher than 800x600 it display OpenGL no matter what.

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #13 on: 01 Jan 2018, 14:23 »
Sure, this is quite logical for me too but why in the second screenshot it get a different scaled?

First screenshot is 758x569 and the second one is 1024x600.

That's because on second screenshot it runs fullscreen - there is no "W" letter after resolution. Your monitor/gfx card supports 1024x600 fullscreen mode.
Since you were running without debugger AGS uses an option from Preferences: "When running without debugger". It was probably either "fullscreen" or "use config".


By the way I understand that there is no way for me to fix this. If I do a resolution higher than 800x600 it display OpenGL no matter what.

The only reason I can think of is that software renderer just cannot create windows of necessary size, and it switch to other renderers. I am not sure why OpenGL though, on Windows it should try Direct3D 9 first, maybe it is also not well supported on your notebook?


We may know more if you turn logging on. If you open acsetup.cfg and put
Quote
[misc]
log=1
then run the game, it should write the log into ".ags" folder inside your usual saved games folder.
« Last Edit: 01 Jan 2018, 14:29 by Crimson Wizard »

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #14 on: 01 Jan 2018, 15:12 »
That's because on second screenshot it runs fullscreen - there is no "W" letter after resolution. Your monitor/gfx card supports 1024x600 fullscreen mode.
Since you were running without debugger AGS uses an option from Preferences: "When running without debugger". It was probably either "fullscreen" or "use config".

Thanks, I think that I have miss this option about Preferences before.


The only reason I can think of is that software renderer just cannot create windows of necessary size, and it switch to other renderers. I am not sure why OpenGL though, on Windows it should try Direct3D 9 first, maybe it is also not well supported on your notebook?

We may know more if you turn logging on. If you open acsetup.cfg and put
Quote
[misc]
log=1
then run the game, it should write the log into ".ags" folder inside your usual saved games folder.

Yes, I believe that this is what happening at the moment.
Direct3D 9 it doesn't seems to be supported very well from this netbook too.
However, this is the report from the log document so far.


Adventure Game Studio v3.4 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2017 others
ACI version 3.4.1.10

Installing exception handler
Initializing allegro
Reading configuration
Looking for game data file
Located game data file: c:/Users/Vincent/DOCUME~1/FMV/_Debug/FMV.exe

Opened game data file: game28.dta
Game data version: 49
Compiled with: 3.4.1.10
Setting up window
Initializing TTF renderer
Initializing mouse: number of buttons reported is 5
Checking memory
Data directory: c:/Users/Vincent/DOCUME~1/FMV/_Debug
Optional install directory: Compiled\Windows
Optional audio directory: AudioCache
Optional voice-over directory: Speech
Voice pack was not found, but voice installation directory is defined: enabling voice-over.
Initializing keyboard
Install timer
Initialize sound drivers
Sound settings: digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'Auto' (0xffffffff)
Installed digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'W32M' (0x5733324d)
Install exit handler
Initialize path finder library
Load game data
Game GUI version: 118
Requested script API: v3.4.1 (5), compat level: v3.4.0 (4)
Built library path: ags_theora.dll
Plugin 'ags_theora' loading succeeded, resolving imports...
Game title: 'FMV'
Checking for disk space
Initializing MOD/XM player
Initializing resolution settings
Game native resolution: 1280 x 1024 (32 bit)
Device display resolution: 1024 x 600
Game settings: windowed = yes, screen def: scaling, screen size: 1024 x 600, match device ratio: ignore, game scale: max_round
Using graphics factory: Software
Created graphics driver: Software renderer
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Failed to init gfx mode. Error: Unable to find a suitable graphics driver
Attempt to switch gfx mode to 1024 x 600 (32-bit) windowed
Failed to init gfx mode. Error: Resolution not supported
Built library path: d3d9.dll
Using graphics factory: D3D9
Created graphics driver: Direct3D 9
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Failed to init gfx mode. Error: Failed to create Direct3D Device: 0x8876086C
Attempt to switch gfx mode to 1024 x 600 (32-bit) windowed
Failed to init gfx mode. Error: Failed to create Direct3D Device: 0x8876086C
Using graphics factory: OGL
Created graphics driver: OpenGL
Supported gfx modes (32-bit):
   320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x600;
   
Attempting to find nearest supported resolution for screen size 711 x 569 (32-bit) windowed
Maximal allowed window size: 1024 x 569
Attempt to switch gfx mode to 711 x 569 (32-bit) windowed
Running OpenGL: 1.4.0 - Build 8.14.10.2230
WARNING: OpenGL extension 'GL_EXT_framebuffer_object' not supported, rendering to texture mode will be disabled.
WARNING: OpenGL 3.0 or higher is required for tinting shader.
ERROR: OpenGL: Tinting program's fragment shader failed to compile:
----------------------------------------
ERROR: 0:1: '' :  Version number not supported by GL2
ERROR: 0:2: 'out' : syntax error parse error

----------------------------------------
ERROR: OpenGL: Lighting program's fragment shader failed to compile:
----------------------------------------
ERROR: 0:1: '' :  Version number not supported by GL2
ERROR: 0:2: 'out' : syntax error parse error

----------------------------------------
Succeeded. Using gfx mode 711 x 569 (32-bit) windowed
Render frame set, render dest (0, 0, 710, 567 : 711 x 568)
Requested gfx filter: StdScale
Graphics filter set: 'StdScale', filter dest (0, 0, 710, 567 : 711 x 568)
Using gfx filter: StdScale
Mouse control: off, base: 1.000000, speed: 1.000000
Mouse confined: (0,0)-(710,567) (711x568)
Check for preload image
Initialize sprites
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
***** ENGINE HAS SHUTDOWN

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Graphic Driver
« Reply #15 on: 01 Jan 2018, 16:01 »
Yes, this log confirms that both software and Direct3D failed to create a window of that size for some reason, but OpenGL could.

You also have pretty low version of OpenGL supported by your system, so tinting and lighting effects won't be seen when you run it. (They will still work in game, it's just that you, personally, won't see them on this notebook)

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Graphic Driver
« Reply #16 on: 01 Jan 2018, 20:35 »
Alright, thanks for all your kind help Crimson Wizard, I much appreciate it.