Adventure Game Studio

AGS Development => Engine Development => Topic started by: arj0n on Wed 17/05/2017 19:03:18

Title: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: arj0n on Wed 17/05/2017 19:03:18
Issue: When starting the game in D3D9 in full-screen mode using the settings as shown below, it gives a black screen.

AGS Editor: Build 3.4.0.16, March 2017
General settings:
Color depth: 16-bit (hi-colour)
Resolution: 320 x 200

acsetup.cfg:

[sound]
digiid=-1
midiid=-1
digiwin=-1
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
[misc]
log=1
game_width=320
game_height=200
gamecolordepth=16
titletext=SRAM 2 - CINOMEH'S REVENGE (beta) Setup
[graphics]
defaultdriver=D3D9
driver=D3D9


Full AGS log: HERE (https://dam1976.home.xs4all.nl/AGS/blackfullscreen/ags-log.zip)

AGS.log errors:

Starting game
D3DGraphicsDriver: D3D Device Lost
D3DGraphicsDriver: D3D Device Lost
D3DGraphicsDriver: D3D Device Not Reset
D3DGraphicsDriver: InitializeD3DState()
D3DGraphicsDriver: D3D Device Lost
...
D3DGraphicsDriver: D3D Device Lost
D3DGraphicsDriver: D3D Device Not Reset
D3DGraphicsDriver: InitializeD3DState()
WARNING: Not all of the Direct3D resources have been disposed; ID3D ref count: 1
***** ENGINE HAS SHUTDOWN


I'm not sure if I posted this in the correct part of the forums. If posted in the wrong spot: sorry.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Crimson Wizard on Wed 17/05/2017 19:25:28
Something weird is going on.
Can you try 3.4.1 Beta and see if that will work? It makes D3D run in 32-bit mode even if game is 16-bit.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: arj0n on Wed 17/05/2017 19:49:25
Using AGS Build 3.4.1 Beta3 gives the exact same issue...

ags.log here (https://dam1976.home.xs4all.nl/AGS/blackfullscreen/ags-log_beta.zip)

btw,
* my GeForge GT 430 driver version is v381.65, which is up to date.
* DirectX is v12
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Crimson Wizard on Mon 22/05/2017 15:38:47
I forgot to ask what Windows version do you have. In the past I saw reports of D3D not working on Windows 10 properly.

Can you try using OpenGL in recently released 3.4.1 beta 4? That may be an alternative for D3D on newer systems (unless someone adds compatible renderer for DirectX 11 and higher).
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: arj0n on Mon 22/05/2017 15:50:27
I'm using Win10.
Tested this issue on more pc's. Only my own pc seems to have this issue. Maybe this happens because I use an old-ish graphic card?
Will try the OpenGL in the beta and let you know the results.

Thank you.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: arj0n on Thu 25/05/2017 19:32:44
Quote from: Crimson Wizard on Mon 22/05/2017 15:38:47
Can you try using OpenGL in recently released 3.4.1 beta 4? That may be an alternative for D3D on newer systems (unless someone adds compatible renderer for DirectX 11 and higher).
OpenGL works perfect on my system :)
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Radiant on Mon 03/07/2017 17:09:12
Looks like some people are reporting the same issue with Heroine's Quest. They can resolve the issue by switching to DirectDraw 5, but it strikes me as odd that the older version works better than the newer.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Alan v.Drake on Mon 03/07/2017 17:42:59
Yeah, it seems Microsoft did something to D3D9 with an update and this is the result.
Perhaps the AGS implementation is not 100% spec compliant, but we aren't the only ones experiencing weirdness with D3D9 + fullscreen.

I have a 970 GTX on Windows 10, and I can't see a damn thing fullscreen, no matter what build I try. But I know it worked months ago.

EDIT: try setting vsync mode to on, it might work then

- Alan
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Radiant on Mon 03/07/2017 18:52:18
I thought vsync was on by default?
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: morganw on Thu 06/07/2017 18:37:28
I'm pretty sure it is off by default, as originally it wasn't supported when using Direct3D.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Dave Gilbert on Wed 12/07/2017 14:59:19
Bit late to this thread, but I can also confirm this is happening to a lot of users. Direct3D results in a black screen. Switching to DirectDraw fixes the problem. The common cause seems to be Windows 10, although it runs fine on my Windows 10 laptop.

Weirdly enough, this is the exact OPPOSITE of the problem many users experienced around 2011 with Windows 7. Running in DirectDraw would result in a black screen, but Direct3D fixed it. This problem was so prevelant that I advocated removing DirectDraw from AGS entirely. I'm happy that nobody listened to me. :-D
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Radiant on Wed 12/07/2017 15:21:20
I wonder how hard it would be to add a DirectX 12 driver to AGS? DX5 is twenty years old and was shipped with Windows 98, DX9 is thirteen years and shipped with XP; it should be no surprise that compatibility for either of these is not a high priority for Microsoft.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Dave Gilbert on Wed 12/07/2017 15:31:41
What's weird is that the unsupported & antiquated DirectDraw works fine, but the (relatively) more modern Direct3D does not? It's confusing for sure!
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Dualnames on Sun 17/09/2017 01:12:13
http://steamcommunity.com/app/439310/discussions/0/2592234299576775467/?tscn=1505603169

So have we found a solution to this besides just switching to DirectDraw?
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Crimson Wizard on Sun 17/09/2017 01:56:39
Quote from: Dualnames on Sun 17/09/2017 01:12:13
So have we found a solution to this besides just switching to DirectDraw?

You can also switch to OpenGL.

Quote from: arj0n on Thu 25/05/2017 19:32:44
Quote from: Crimson Wizard on Mon 22/05/2017 15:38:47
Can you try using OpenGL in recently released 3.4.1 beta 4? That may be an alternative for D3D on newer systems (unless someone adds compatible renderer for DirectX 11 and higher).
OpenGL works perfect on my system :)
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Dualnames on Sun 17/09/2017 05:26:28
My issue is that this specific person wants D3D bad.
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Crimson Wizard on Sun 17/09/2017 12:59:21
Best way is to add new DirectX support then (11 or 12).
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Dualnames on Mon 18/09/2017 21:51:37
So newest ags has that?
Title: Re: Error: D3DGraphicsDriver: D3D Device Lost (AGS v3.4.0.16)
Post by: Crimson Wizard on Mon 18/09/2017 22:28:43
Quote from: Dualnames on Mon 18/09/2017 21:51:37
So newest ags has that?
No. I mean, this probably would be best solution to add one.

By the way, don't other d3d9 games not working on Windows 10, or its just AGS?