D3D9Wnd - a Direct3D 9-based W:A windowed mode and multimon!

Specifically for discussion of the 1999 PC game by Team17. Created as a place for discussion and to troubleshoot problems with other members. While we cannot provide OFFICIAL support, we will do what we can to help you if you need assistance.

Moderator: Dream17 Staff

Post Reply
StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

D3D9Wnd - a Direct3D 9-based W:A windowed mode and multimon!

Post by StepS » Wed Jun 12, 2013 1:28 am

Hello.
I'd like to present you a windowed mode made using the native Direct3D 9 renderer, which allows some brilliant features, as well as no lags and full FPS (no emulator), stretching of the window, unpinning/pinning mouse from the game window, playing the game on several monitors at once, producing and streaming full HD videos and screenshots on any monitor and system.

The way of windowing the Direct3D 9 mode was originally inspired by Kawoosh, and then I added a lot of features and improvements:
  • Stretched mode: enable "Stretch" for needed places in ini. It is still windowed mode, but here it is enlarged to fill your screen in full, 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: on some GPUs there may be need to enable smoothing if you enlarge from a smaller window to prevent pixelation.
  • 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 summed up in-game resolution will automatically be set in WA settings on every launch. When using stretched or fullscreen frontend mode, enabling the Multi-Mon in either in-game or frontend 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 not to allow any lags during the gameplay. Limitations: the display mode has to be "Extend" instead of "Double". The primary monitor has to be on the left for horizontal setups, or on top for vertical setups, or on top left for square/rectangle-shaped setups. For more than 2 monitors, they should go in numerical order (but maybe not, it's up to you to see it). Maximum texture size supported by your GPU is the limit for the total resolution from summing up all of the monitors' resolutions (if you exceeded 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.
  • 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 for 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 on 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].
  • Custom frontend size and frontend centering: options to customize frontend position and size, but eating the mouse.
  • 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 directly during gameplay.
    There's also a possibility to show quick information by enabling QuickInfo=1 in the InGame section. Some quick infos like the ingame resolution, mouse pinned state, topmost state and other things can be shown in there in realtime.
  • And of course, I made the module intelligent to prevent sillies from running into issues.
Unlike wndmode, D3D9Wnd works only on W:A 3.7 and newer (including Steam), because it uses 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 for one session only, run WA with a command-line parameter: /wkargs -nowindow
  • This fixes the Windows 7 multiple monitors issue! (thanks Obn3g0n for confirming)
  • UAC admin mode does not have any effect when maximizing from taskbar.
  • 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 bigger ;) ) screenshots and videos regardless of their monitor. Aspect ratio can be any, as seen in examples.
    The maximal possible resolution is your GPU's max texture size (4096×4096, 8192×8192 or 16384×16384, example with 4096×4096) and the minimal is 143×1. To get the best image, use a bit of mathematics if you know your monitor's aspect ratio (16:9, 16:10...)
  • 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.
The latest version is 0.6.6.6, DOWNLOAD. Extract everything into your W:A folder and run the game. You must have "Load WormKit modules" option from Advanced Settings enabled.
Last edited by StepS on Sat Nov 01, 2014 1:20 am, edited 10 times in total.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode, no emula

Post by StepS » Mon Jun 17, 2013 12:53 am

A wild update appears. 0.5.2.5
  • Finalized the FullscreenFrontend option which now behaves like it would normally (with resolution restoration).
  • Settings file has fully been reorganized; you must fill your settings again into the new settings file.
  • Added the Multi-Monitor feature: 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 summed up in-game resolution will automatically be set in WA settings on every launch. When using stretched or fullscreen frontend mode, enabling the Multi-Mon in either in-game or frontend 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 not to allow any lags during the gameplay. Limitations: the display mode has to be "Extend" instead of "Double". The primary monitor has to be on the left for horizontal setups, or on top for vertical setups. For more than 2 monitors, they should go in numerical order (but maybe not, it's up to you to see it). Square setups (double on double) are currently partially supported, but can be looked into later if needed. Maximum texture size supported by your GPU is the limit for the total resolution from summing up all of the monitors' resolutions (if you exceeded 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. At least half of the height (or width in vertical setups) must collide with the monitor on the left; if it doesn't then you probably don't want multi-monitors.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode, no emula

Post by StepS » Mon Jul 01, 2013 12:14 am

A new update has been released.
  • The ActiveBackground feature has been made available to be enabled permanently with a settings file. It is also finalized and now works in all cases. Window border in this mode is now possible, and the window is no longer stuck in top left corner.
  • Users with Windows Classic/Simplified interface (no aero/DWM) are no more limited to top left corner, and they can now also use the border. ActiveBackground is always forced enabled for them, as before.
  • Added TopLeftPosition feature for people who need the in-game window to be on top left. This can also be temporarily enabled with Ctrl+L.
  • Added AutoUnpin feature which will automatically unpin mouse cursor when you switch to another window (alt-tab or any other ways). Enabled by default now.
  • Mouse will now be pinned after clicking inside the WA's window if it was unpinned before. For stretched and expanded modes it will be re-pinned automatically when you get back to WA.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Thu Jul 04, 2013 4:37 pm

A new update released, 0.5.5.0.
  • Now got rid of the "2x size" maximum resolution limit! This means you can set any resolutions you like without any mouse issues, as long as your GPU supports it (maximum 2D texture size).
  • Added the long-awaited Run frontend in background 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. Now enabled by default, can be switched using the "RunInBackground" setting under [FrontendSettings].
  • The built-in in-game mouse capture has now been improved to reflect the actual window's positions, just like done recently for ActiveBackground.
  • The NoTopmost feature has been moved to the [Misc] section and now affects both frontend and in-game. Still can be switched with Ctrl+T, but this time in both places.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Wed Aug 07, 2013 1:02 pm

A small update (0.5.5.5) was released, sorry for delaying, should have been released many weeks ago.
  • Minor fixes
  • Now supports square- and rectangle-shaped multi-monitor setups (for example, 2 monitors above 2 monitors). A least 65025 simultaneously working monitors are supported. The total width is defined by the top monitor row. Totally untested.

Fiery Bulblax
Newbie
Posts: 2
Joined: Mon Oct 14, 2013 6:09 am

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by Fiery Bulblax » Mon Oct 14, 2013 6:11 am

The download site is down? Maybe host it somewhere else?

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Wed Oct 16, 2013 11:22 am

no it's not, I check every day. Did your ISP ban the common free top level domain?

Fiery Bulblax
Newbie
Posts: 2
Joined: Mon Oct 14, 2013 6:09 am

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by Fiery Bulblax » Fri Oct 25, 2013 6:27 am

Of course, now that I say this, I'm able to download it. :P

aquiyahora
Newbie
Posts: 1
Joined: Wed Nov 20, 2013 9:52 am

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by aquiyahora » Wed Nov 20, 2013 9:56 am

SHA256: 6b71f1e0e6448a5ccdc3fe3e8356f4e09c816ab3340706ed18a294f8bcdd67df
Nombre: wkD3D9Wnd.rar
Detecciones: 5 / 46
Fecha de análisis: 2013-11-18 03:48:57 UTC ( hace 2 días, 5 horas )


Baidu-International Backdoor.Win32.Hupigon.AVyQ 20131117
ClamAV Win.Trojan.Dadobra-119 20131118
Jiangmin Backdoor/Huigezi.2007.agwr 20131117
Sophos MadCodeHook 20131117
TrendMicro-HouseCall TROJ_GEN.F47V1109 20131118
.
.
https://www.virustotal.com/es/file/6b71 ... /analysis/
.
.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Thu Nov 28, 2013 10:24 am

aquiyahora wrote:
check the reply here, no need to spread this garbage over multiple forums

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Thu May 22, 2014 8:44 pm

A new update has been released: 0.6.0.0.
  • D3D9Wnd is now fully version-independent. This means that it will work on any future version of W:A that supports Direct3D 9 (but still requires at least 3.7 or newer, as older versions don't have Direct3D 9) without having to wait for me to update the module.
  • You can now load D3D9Wnd with any wormkit module loader, not only the built-in option of the game.
  • Implemented fix for the long-living W:A crash when you press Ctrl+Alt+Del, Win+L or get an UAC pop-up on Vista and newer (thanks to Deadcode for the solution; the fix will also be available in the next W:A update).
  • Added a FancyStartup option for the frontend initialization. With this setting, W:A will start up translucent, quickly becoming opaque.
  • The module will now set W:A's process DPI-aware. This resolves clipping/stretching/blurriness/mouse issues that come out of the DPI virtualization system in Vista and newer (especially important for Windows 8.1 users who use a DPI scaling value other than 100% and 125%).
  • The Fullscreen frontend mode will now use native fullscreen.
  • The module will now only start activity after the Direct3D 9 interface creation, related to which the check for DirectDraw/Direct3D7 is now done in a better way, as well as a lot of other things.
  • Assisted Vsync no longer makes the game laggy when the game's height is taller than your primary monitor's height, therefore it won't be auto-disabled now.
  • You should no longer see an empty mouse cursor when returning to frontend from the game with Hardware Cursors enabled and unpinning being used prior to the return.
  • Mouse clipping will now correctly work when running Stretched/Centered/Custom frontend with wkSuperFrontend module.
  • Previously you could see a black rectangle for a split second when W:A's frontend was starting up. Technically now it's done in the best way though it may feel a little bit unusual for people who got accustomed to it already.
  • Many optimizations and improvements.
  • Added a secret feature.
Coming soon:
  • Ability to resize the in-game window: I have already done this for Worms 2 (see the video | download), and almost finished for W:A, though it won't be progressive at first (it's best to keep it as is, when the resizing stops only).
  • Alt+Enter support: this will have multiple variations. In the first mode, pressing Alt+Enter would switch between exclusive fullscreen and windowed mode display; in the second mode, Alt+Enter would stretch/shrink the window; and in the third mode Alt+Enter would take advantage of the aforementioned window resizing, expanding the borderless windowed display to the whole desktop resolution.
  • Multi-monitor improvements.
  • Some other things.

StepS
Settled in
Posts: 57
Joined: Sun Jun 09, 2013 10:51 am
Location: Russia, Moscow
Contact:

Re: D3D9Wnd - a Direct3D 9-based W:A windowed mode and multi

Post by StepS » Sat Nov 01, 2014 12:57 am

A new update has been released: 0.6.6.6. This update is awesome and everyone who is using an older version must upgrade. More details on that later.
What's new?
  • Added a SoundInBackground feature. This will let the game to play sounds even when it's not in focus. Now enabled by default.
  • Multi-monitor settings have been changed. Now the preferred amount of monitors is "Max" and can be customized, and the "EnableInFrontend" option has been disabled as it was totally useless.
  • Fixed the game using a lot of CPU when minimized (and causing a crash on return to the frontend afterwards). Also, now there's no minimize button on the caption, it was causing bugs. Use the keyboard combos for minimizing the game.
  • Active background and automatic cursor unpinning are now always enabled.
  • Fixed the bug where in-game stretch resolution would not properly be reapplied after playing one match and then another one with Fullscreen frontend enabled. Thanks to Senator for the report.
  • Module now works without additional DLLs.
  • Some other things and fixes. :)
Happy Halloween!

Post Reply