-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Age of Empires Dd7to9 #177
Comments
Unfortunately, I don't have a copy of the game. This is a game I wanted to test with for a while but could not find a demo copy of it online. When you say it disconnects you from the other players, can you give me more details? What makes you think that it is dxwrapper that is causing you to get disconnected? |
Thanks! I wonder if I can test the multiplayer issues with this demo? |
Ok, I can reproduce this issue with the trial edition. I have seen this kind of issue before. Let me see if I can fix it. |
It looks like this game is using a combination of GDI and DirectDraw to create the graphics. Direct3D9 does not play nicely with GDI when in exclusive fullscreen mode. Try enabling the |
|
I just tired more by use 2 computers. It will be fine if 2 of players use dxwraper. It will disconnect when 1 of 2 players not use dxwraper. |
IIRC from when I was banging my head on some OGL woe the DWM is more of a lingering variable than what the underlying api is per se, but don't quote me. |
The issue is that starting with newer builds of Windows 10 Direct3D9 got changed and this change caused GDI to not be visible when Direct3D9 is in exclusive fullscreen mode. I guess that is probabby ok since few Direct3D9 games use both Direct3D9 and GDI. However, many DirectDraw games use GDI and even some Direct3D8 games, see here. Converting the game to windowed fullscreen mode fixes that issue. I don't know if anyone has found a better solution for this. However, I have considered converting the GDI calls into Direct3D9 to solve this issue. But I have not looked into how much work that will be. |
This is weird. I am not sure what could be causing it. I did add a delay in writing to the screen with dxwrapper. Each write is not seen on screen until the next write happens. I disabled this delay to see if it is the cause. Also, I noticed that Age of Empires uses DirectPlay for multiplayer games. dxwrapper hooks the Anyways, here is a new build for you to try. Let me know if this works: dxwrapper.zip |
I had out of sync errors with cnc-ddraw before with one game, the solution was D3DCREATE_FPU_PRESERVE ... Maybe give that a try as well. I haven't heard about any issues with AOE in combination with cnc-ddraw though (I don't use this flag by default, do you?) |
Interesting. Thanks for the tip! I only use D3DCREATE_FPU_PRESERVE when requested specifically by the game. See here and here. I just checked on this game and it sets DDSCL_FPUSETUP which means that D3DCREATE_FPU_PRESERVE shouldn't be set. However, I have a bug where I create the Direct3D9 device with D3DCREATE_FPU_PRESERVE enabled for this game, even though I shouldn't. I'll need to fix that. |
Are you sure the problem isn't the fact that exclusive fullscreen isn't really much that anymore actually? |
The issue only happens on Direct3D9. The issue happens when you set the I would love to know if anyone has a fix for this because it affects lots of games when using BTW: Setting |
@9xtiger, I fixed an issue based on @FunkyFr3sh's comments. Can you check this one out and see if it fixes the issue: dxwrapper.zip |
I mean.. Not like GDI was ever supposed/gonna to work with newer d3d, right?
Mhhh, I see.
Except not really, as I just sighed yesterday in #59? |
Where is it documented that this is not going to work? It worked with d3d9 on every version of Windows (Including Windows 10) until the Windows 10 April Update. And it still works with d3d8 on every version of Windows.
I just checked on the latest released version of Windows 10 and disabling fullscreen optimizations has no effect on this issue.
I understand. I know it is not true exclusive mode. But anyways that is what you are telling DirectX you want and that is the mode that is broken with GDI. |
I found it. The documentation is right here says that the "flip" model does not support "multiple different APIs producing contents, which all layer together into the same HWND ... An example of this would be using D3D to draw a window background, and then GDI to draw something on top". This implies that the "Blt" model does support that (i.e. multiple different APIs producing contents, which all layer together into the same HWND). Dxwrapper's |
This one worked for me. Thank you very much. Its amazing!
And this 1 not worked. it got error in mutiplayer game. Mouse and Keyboard stuck and lagging. |
Doesn't "Direct3D9EnableMaximizedWindowedModeShim" in d3d9.dll fix the issue? I'm not too sure though, I always just use opengl for these games in cnc-ddraw |
No. I tried disabling and enabling |
@9xtiger, thanks for testing this. Can you test this one and let me know if this works also? This one just removes the delay in writing to the screen with dxwrapper to see if this is the issue. I want to narrow down the issue to a single thing. Here is the update: dxwrapper.zip |
I said newer directx, not newer windows... Though I'll grant I was kind of misremembering the chart and its implication
Mhh, is this documented somewhere? Which april are we talking about?
Well, that's what you ask. What you get isn't necessairly the same thing.
I was going to tell you
I mean, that's kinda what maximized windowed mode should be AFAIK... I'm quite uneasy by this implication. |
This one make disconnect. |
@9xtiger, thanks for checking. When you say it is not as smooth with "FullscreenWindowMode" on, is that true for the build that worked above or is it just this build that is not as smooth? Can you test with this one? I hope this works: dxwrapper.zip |
This one work well.
It getting not smooth for all of version dxwrapper. So i turned it off. Black and white name is not big problem with me. Thank you. |
Fixes an issue with out of sync game play when using DirectPlay. Related to #177
Thanks @9xtiger for checking on this. I added a fix for this issue into the project. |
This issue was first introduced with Windows 10 Fall Creators Edition. I am not aware of any documentation stating this issue. As I showed with the previous documentation this should work (not just on Direct3D9 but also on DirectX10 and DirectX11). It is clearly a bug in Windows, AFAIK. BTW: I think we are rehashing some of the comments from the thread here.
Yes, me too. Especially since the reports we are seeing is that maximized windowed mode isn't as smooth game play as exclusive fullscreen mode is. |
Closing this issue as complete. |
I would recommend you to use build numbers next time, for better peace/clarity/easiness of mind (even because April isn't in Autumn.. is it?)
Good memory, that kind of interop talk was exactly what I had in mind. Though I'll grant my "brainstorming pitches" there sounds really stupid in hindsight...
... I believe last month I was going to tell you that you can't really be sure of which mode you are actually in, unless you actively check for it (and AFAIK that in turns could only mean using ETW to query Windows). But does 238d6db...91cb506 mean that, indeed, all our observation above were misplaced? And that maximized windowed never actually engaged? |
Agreed.
True. But in this case it does not really matter. As long as you request exclusive fullscreen access by an app then this issue exists, whether or not you are actually in the mode doesn't matter. There must be some way to solve this, but I have not figured it out yet.
Yes, the setting in dxwrapper was broken, and maximized windowed never actually engaged. However, I have since fixed the issue and tested both with dxwrapper and with Windows compatibility mode. The issue still happens whether maximized windowed is engaged or not. |
I found a real fix for this issue by calling Here is the fix for this in dxwrapper: dxwrapper.zip Edit: updated the build, last one had a bug in Windows 11. |
All are perfect but the color of name player when i show the timeline changed from black to white. This make me disconect when i play with other player. Im using dd7to9 Age of empires. big thanks to you
The text was updated successfully, but these errors were encountered: