Forums
September 24, 2017, 12:15 PM

Author Topic: D3D9Wnd 0.7 - a native, Direct3D 9-based windowed mode and multi-monitor support  (Read 33299 times)

0 Members and 1 Guest are viewing this topic.

Offline StepS

[ English | Русский ]

Hello.
I'd like to present you a windowed mode module that takes advantage of the game's Direct3D 9 renderer, which also allows for some brilliant features, such as playing the game on several monitors at once, stretching the window, unpinning/pinning mouse from the game window, playing the game using ultra-high screen resolutions, as well as producing and streaming ultra-high-resolution videos and screenshots on any monitor and system.

The following features can be highlighted:
  • Multi-Monitor support: enable W:A to display the game spanned across several monitors, placed either vertically or horizontally, in either frontend and/or in-game. With AutoSetResolution enabled, the resulting in-game resolution will automatically be set in WA settings on every launch. When using stretched or fullscreen frontend mode, enabling Multi-Mon in-game will not clip your cursor in the frontend area. NOTE: performance has to be considered when enabling this option. Your hardware, mainly CPU and GPU, should be supporting it well to prevent any lags during the gameplay. Limitations: the display mode has to be "Extend" instead of "Duplicate". Maximum texture size supported by your GPU is the limit for the total resolution of the virtual multi-monitor desktop (if you exceed the limit, WA will tell you and perform a workaround). Differently-sized monitors are supported but not recommended: it's up to you to decide whether to leave empty space by making the smaller monitor primary or, otherwise, cut a few lines by using the bigger one as primary. You should also make monitors as adjacent to each other as possible on the Windows Monitor Mapping screen. Monitors that do not perfectly coincide with each other will cause ruptures in the image and produce incorrect results. Example: two monitors where the top-left corner of the right monitor touches the bottom-right corner of the left monitor.
  • Unpin and pin the mouse: a feature requested by someone to be able to unpin the mouse in-game and move it over WA's window. This can be useful with Border (see below).
    Ctrl+G to unpin or pin the mouse.
  • Active Background: available in both Windowed and Stretched modes. Allows to view the gameplay even when the window is not in focus. This is permanently enabled since 0.6.6.6.
  • Run frontend in background: a feature to prevent the frontend menus from self-minimizing when switching to another window. When it is enabled, the frontend will keep running in background. Can be switched using the "RunInBackground" setting under [FrontendSettings].
  • Frontend Centering (deprecated): an option to center the frontend window, but your mouse will be clipped to the window, and Hardware Cursors will be disabled. Not recommended for use. You should use SuperFrontendHD instead.
  • Window border in-game and quick info: allows to have a window border around the window. Using the previously mentioned unpinning feature you are able to move the in-game window.
    Use WindowBorder=1 in the InGame section to enable this. Use Ctrl+D to quickly enable/disable this during gameplay.
    There's also a possibility to show quick information by enabling QuickInfo=1 in the [InGame] section. Some quick information like the in-game resolution, mouse pinned state, topmost state and other things can be shown there in real-time.
  • Stretched mode (deprecated in Frontend): enable "Stretch" in the ini file for either frontend or in-game. It is still windowed mode, but here it is enlarged to fully fill your screen, and looks just the same as if you were in fullscreen. This is especially useful if your monitor doesn't support 640×480 (and you want fullscreen) or if you plan on speeding up your game (by not having to wait until your monitor switches the resolution): instant return to frontend after the game has ended, instant minimization, ability to set the resolution higher than your own, etc. NOTE: some drivers use nearest-neighbor scaling instead of antialiased by default, so you might need to change that in driver settings.
    NOTE: the Stretch option in the Frontend is now obsoleted by SuperFrontendHD. It is NOT recommended to use the Stretch option in the frontend any longer.
  • If Direct3D 9 is not enabled, you will be notified. The module will assist with certain issues, should they occur.
D3D9Wnd works on W:A 3.7 and higher (CD/Steam/GOG) and makes use of the native Direct3D 9 renderer of the game introduced in 3.7.

Additional notes:
  • To fully disable the module without deleting it, use "EnableModule=0" in the ini file. To disable it for one session only, run WA with a command-line parameter: /wkargs -nowindow
  • This fixes the Windows 7 multiple monitors issue! (thanks to Obn3g0n/JoE for confirming)
  • UAC admin mode issue does not occur when maximizing from the taskbar in windowed mode.
  • With help of wkLobbyCmd you can switch resolutions on the fly and specify a resolution which is even higher than your own (in this case it'll be stretched to fit the screen). This allows everyone to produce full-HD (and even 4K, etc.) screenshots and videos regardless of their monitor. Aspect ratio does not matter.
    The maximum possible resolution is your GPU's max texture size (4096×4096, 8192×8192 or 16384×16384) and the minimum is 143×1. The module does not adjust to your aspect ratio, by the way. If you want to use a super-resolution that respects your respect ratio, you have to calculate the target resolution yourself (example: 16/9 1280x720 => 16/9 1920x1080).
  • The frontend is still in the top left corner. I can't tell more on why this happens right now, but it's due to hardly repairable bugs in the game. This will not be fixed in D3D9Wnd. A new, far better solution is on the horizon.
The latest version is 0.7.0.0 (6 July 2017): DOWNLOAD | Mirror.

Extract everything into your W:A folder and run the game, making sure that the "Load WormKit modules" option is enabled in the Advanced Options of your game.

Credits:
  • Kawoosh for version 0.0.1 of the module.
  • StepS for all the updates that followed.
  • MinHook developers for the hooking library which saved the module from the madCHook disaster.
  • Deadcode for helping resolve some bugs early on. Locking Windows or disconnecting the monitor no longer crashes the game.
« Last Edit: July 07, 2017, 06:15 AM by StepS »
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline Kaleu

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #1 on: January 21, 2013, 02:40 PM »
Kawoosh should add a "Donate" button or something at his releases, you guys are such a heroes giving these stuff for free, this is a example of love to W:A, gratz and thankz guys.
Experience the best TTRR gameplays with my maps!

→ The best of Kaleu ←

Offline StepS

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #2 on: January 21, 2013, 02:46 PM »
Kawoosh should add a "Donate" button or something at his releases, you guys are such a heroes giving these stuff for free, this is a example of love to W:A, gratz and thankz guys.

as Kawoosh said himself before, he doesn't need money (it won't bring inspiration and stuff, it's difficult to explain, Rubber could be ported on the release day already, that's a typical Kawoosh), nor would he if he was to produce a commercial app or game.
you could donate to me though :) I did most of the features/fixes work after the base creation and soon there can be more! that way I'm also learning stuff
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline van

  • van-the-dral
  • Hero Member
  • *****

  • Poland Poland
  • RoH RoH clan

  • Posts: 697
  • Death to the randomness.
    • View Profile
Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #3 on: January 21, 2013, 04:46 PM »
W00t, exactly what I've been waiting for, thanks!

To minimize in-game, use Shift+Esc. The escape menu button doesn't work

This is going to be a bit of a pain (years of practise). I kinda wish alt+tab worked properly.

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #4 on: January 21, 2013, 04:51 PM »
you could donate to me though :)
lmao and where do you want me to send you money?

Offline OrangE

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #5 on: January 21, 2013, 05:05 PM »
i will try this tonight in the streaming tests.
Due to massive misunderstandings: orange refers to a fruit not a color. I would be a color, if my name was orange meaning a color who is or lives in a rainbow. Orange is a fruit which is related to colors. There's been a legend around saying orange is a cool guy. So please, think of me as a fruit or a cool guy.

Offline Agassi

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #6 on: January 21, 2013, 06:20 PM »
Glory to USSR programmers!

Offline StepS

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #7 on: January 21, 2013, 06:44 PM »
W00t, exactly what I've been waiting for, thanks!

To minimize in-game, use Shift+Esc. The escape menu button doesn't work

This is going to be a bit of a pain (years of practise). I kinda wish alt+tab worked properly.
alt+tab does work properly, but W:A window is topmost. Also if someone is having trouble with wkAntiKeyboardHook, may take a look at this.
I've just added Tab+Alt (Alt+Tab), but probably Alt+Tab won't work on Windows 8. There's no way to detect this anymore, Windows takes full control over Alt+Tab, bummer.
« Last Edit: January 21, 2013, 06:59 PM by StepS »
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #8 on: January 22, 2013, 01:58 PM »
It's doesn't work for me @ Windows XP, I got a messy screen in front of the game.


Offline StepS

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #9 on: January 22, 2013, 04:25 PM »
It's doesn't work for me @ Windows XP, I got a messy screen in front of the game.
can you try the latest uploaded version?
Windows XP is old and lacks aero so there can be issues, but most of them should be sorted by now.
issues produced by Direct3D 9 itself cannot be solved.
if it still doesn't work, i'd like to see screenshots
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline StepS

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #10 on: January 22, 2013, 06:39 PM »
Updated. 0.3.0.0.
  • Fully fixed mouse issue with non-aero users, however they lose window border and centering.
  • Ctrl+G is now for both pin/unpin.
  • Ctrl+H is now for new feature: Active Background, in this way you can see the gameplay even when the window is not in focus. This is permanently enabled for non-aero users as a fix, and also moves the window into top left corner. Cannot be enabled when border is on.
  • Message boxes are also in Italian for italians now. :)
  • Added "Disabled" option into ini file, which will fully disable the module without need to delete it.

thanks to Casso for testing on disabled desktop composition and italian boxes!
« Last Edit: January 22, 2013, 06:56 PM by StepS »
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #11 on: January 23, 2013, 01:30 AM »
It's doesn't work for me @ Windows XP, I got a messy screen in front of the game.
can you try the latest uploaded version?
Windows XP is old and lacks aero so there can be issues, but most of them should be sorted by now.
issues produced by Direct3D 9 itself cannot be solved.
if it still doesn't work, i'd like to see screenshots
Now it works perfectly ;)

edit: not perfectly, I can't replay wagames  :'( I can listen to them but can't see nothing.
« Last Edit: January 23, 2013, 01:40 AM by Twyrfher »


Offline StepS

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #12 on: January 23, 2013, 08:04 AM »
wagames
lol totally forgot about this. i'll look into it later, thanks
it works fine for users with Aero :) why do you still use XP?

--- try it now, should work.
« Last Edit: January 23, 2013, 08:20 AM by StepS »
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline tuomatz

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #13 on: January 23, 2013, 09:01 PM »
Could you add a feature to set frontend resolution to different value than ingame resolution?
"People without a vehicle, are like worms without F8" - Aristotle

Re: D3D9Wnd - a Direct3D 9-based windowed mode without emulator
« Reply #14 on: January 23, 2013, 11:54 PM »
it works fine for users with Aero :) why do you still use XP?
Why should I change :D I haven't formated like in 3 or 4 years, my system runs perfectly (anyway, I have win7 in my laptop, I hate it)
Quote
--- try it now, should work.
Ok, later.