Posted on

Playing Four Winds Multiplayer Games on LAN on Windows 10/11

Latest versions of Windows 10/11 no longer support Winsock v.1.x based network communication that is used in older Windows games like Four Winds Mah Jong that utilize the DirectPlay interface (part of DirectX deprecated by Microsoft) to support simple peer-to-peer multiplayer games.

We are in the process of examining alternative ways of implementing support for multiplayer games, but for the time being, there is a free workaround available, IPXWrapper by Daniel Collins, that is likely to work well for most users, allowing IPX/SPX emulation over UDP, that makes it possible to run DirectPlay based multiplayer games over LAN on recent Windows 10 updates and Windows 11, both with 32- and 64-bit versions.

To use the wrapper with Four Winds, please do the following:

  1.  Go to download IPXWrapper (the most recent version is 0.6.1).
  2. Extract the contents of the zip file in a new folder.
  3. Copy the four .dll files included (dpwsockx.dll, ipxwrapper.dll, mswsock.dll and wsock32.dll) under C:\Program Files(x86)\4Winds2 (or wherever you have Four Winds installed).
  4. Double click the .reg file directplay-win64.reg (or directplay-win32.reg if you have a 32-bit Windows) included in the wrapper package to merge the required settings in the system registry.
  5. Run Four Winds, and after having started a multiplayer game, choose “Internet TCP/IP Connection for DirectPlay”, or “IPX Connection for DirectPlay”, as the communication channel, when shown a list of choices. (Select the same channel also on the client side when joining a game.) Note: When using the TCP/IP channel,  leave the IP address field empty when playing a game on LAN.
  6. If you cannot get the multiplayer games working on your LAN (practically indicated by not being able to have Four Winds games hosted on the same LAN visible in the list of available games on the client side), or if you experience any side effects because of the emulation, please check Readme.txt included in the wrapper package to see they ways of configuring it and limiting its scope of operation (typically there is no need to make any adjustments). Also, as always, please ensure that your firewall does not block Four Winds (DirectX) multiplayer games.

On older Windows operating systems (up to version 8.1 and also on earlier Windows 10 versions) DirectPlay still works fine so there is no need to use the wrapper with these versions.

IPXWrapper – Copyright (C) 2008-2017 Daniel Collins <>-
Licensed free of charge under GNU General Public License and without a warranty of any kind.

Posted on

Running Four Winds on Android with ExaGear

A screenshot of Four Winds running on Samsung Galaxy S7 on Android 8 (Oreo) using ExaGear Strategies Windows emulator.  The game can be run in full screen (and without side controls shown above) by letting ExaGear stretch the graphics (800 x 600 px “Basic Board” is used here as the game board). The larger game boards and integrated layouts are available in the emulator if supported by the device (but may not not be usable in mobile phone context; but e.g. for a 10-inch tablet all layouts would typically be available).

By using Eltechs’ Windows emulators you can now run Four Winds Mah Jong on your Android devices. Two versions are available, ExaGear Strategies (a free three-day trial period, lifetime license EUR 16.99, or monthly subscription at EUR 1.89) or the full Windows version, ExaGear Windows Emulator (lifetime license EUR 32,99). The former is recommended as it requires significantly less disk space, but to install the game you need to have the game installed on Windows and copy your Four Winds program folder (under C:\Program Files(x86)) onto your Android device’s ExaGear folder. On the full emulator you can install the game setup package similarly as on true Windows so basically you do not need to have a Windows computer. Note: The full emulator has currently a problem that leaves non-modal windows behind the main program window (the next version of Four Winds, however, will include a feature that makes this bug irrelevant). Note that you do not need a Windows license when using ExaGear.

Small text is not a problem on ExaGear since you can zoom in easily to make your selections in menus and setup dialog boxes and then zoom back when ready to return to the game. The game play itself is smooth (even on older Android devices like Sony Xperia Z2 running Android 7), and by changing the default control setup (Game Controls button under on the General option page of the User Interface group of the Preferences) so that discarding happens by tapping a raised tile (and is restricted to the tile itself), and checking the “Touch screen friendly” option on the same option page you can achieve surprisingly pleasant mobile playability by emulation.

Note that only ARM-based Android devices are supported so the emulation does not work on x86-based Android devices (like Lenovo Yoga Book) even if the application itself can be installed on such a device.

Most of the features of the game are available (excluding background music, which would require support for DirectX). Four Winds version 2.19 includes new features that make the game more accessible in mobile environment, e.g. the extra information windows will be available as alternating views similarly as the Discards view in the Basic game boards (but will continue to be available also as separate windows if wished), and the user interface has smart buttons that allow accessing of the most commonly used features more easily.

Posted on Leave a comment

Playing Four Winds on a Touch Screen

Now that touch screens, especially on tablets and 2-in-1 devices like Surface Pro, have become common in Windows environment and system based app-scaling for ultra-high resolution displays has greatly improved – allowing all applications (and not only those specifically designed for high-density displays) to show decent size text and controls so that they can be accessed by touch – a vast range of native Windows desktop applications like Four Winds Mah Jong have become available in mobile context. Applications that a few years ago were labeled with a derogatory term “legacy” have gained revived interest, and not just for nostalgic reasons but because native Windows applications are often feature-rich and have depth and versatility that only a few universal Windows applications have.

While it is clear that universal apps developed to fully utilize the features of touch-based (and mobile) computing have capabilities not available for desktop software, the efforts seen by Microsoft to make a computing environment serving well all kinds of devices and computers, also when using native desktop software, have begun to bear fruit. This post gives instructions on how to best use Four Winds with touch devices like 8- and 10-inch tablets and 2-in-1 computers running Windows 8.1 and 10 desktop operating systems.

Choosing optimal screen resolution, scaling value and view mode

Since version 8.1 Windows has offered improved app-scaling, which is crucial to allow older software run satisfactorily in ultra-high-dpi screen context. Which combination of screen resolution and scaling setting to use to get best results is not necessarily easily determined, and it is likely that settings need to be changed according to demands of different applications, but happily it is fast and easy to change the settings: to access the controls, right click on your Windows desktop and choose Display settings from the context menu that is shown, then experiment with different resolutions and scaling values. On the other hand, on Windows 10 devices that use traditional screen resolutions, it might be a better idea to lower native screen resolution and/or app scaling, or set an individual application to ignore app scaling.

Earlier versions of Windows let you change outlook of individual user interface elements like the size of the menu font, title bar and window borders. Since Windows 10 Creators Update the user interface for this feature has been removed but the feature itself is still supported, but you need to tweak the system registry to access the settings. Happily there is a free tool called Winaero Tweaker that lets you access these settings easily. While changing individual elements is usually not necessary (since system app scaling starting from Windows 8.1 normally works well), it may be necessary to tweak the size of the menu font, especially on small touch devices that only support regular screen resolutions (e.g. 1280 x 800). On these kinds of devices app-scaling does not always give big enough system font for touch control. But it is better to first try without any registry tweaks since app scaling on recent Windows 10 versions works most often really well.

Application-specific scaling is determined in the Compatibility tab of the program executable file. To access the the settings, click the Four Winds launch icon on Windows desktop with the right mouse button and choose Properties from the context menu. To have the application use the system’s app scaling, leave the “Override high DPI scaling behavior” box empty. To have the application use its internal app scaling, check the box, and then choose “Application” from the drop-down menu below. 

Four Winds supports a wide range of screen resolutions and layout options. When using a touch device, the goal is to find a combination of settings that make text and controls large enough to be easily accessible when using a finger. It is also meaningful to aim at full-screen game board to be able to cover the Windows taskbar and have tablet-like feel. To have keyboard input at hand when needed, it is also recommendable to run the system in Tablet mode (you can switch between the Tablet and Desktop mode by using the toggle button on the Windows Action Center – drag from the right edge to show it).

Four Winds running full-screen on a Windows 10 touch device: a low-end 8-inch Lenovo Miix 2 8 tablet using 1280 x 800 native screen with 125% app scaling. Four Winds runs using a compatibility setting that ignores system app scaling and applies internal app-scaling, instead, allowing the program to see the true system resolution and use its 1280 x 800 game boards with internally scaled system font and controls. Without the setting Four Winds would see the display as a 1024 x 640 screen, meaning that it could only use two possible game boards (Basic boards A and B), whereas ignoring the system app scaling it can also use Basic boards C and D, Integrated boards A, B and D, and Integrated Square boards N, O and P. Internal app-scaling works well because the device has low native screen resolution. While integrated game boards are available, the best touch experience can be achieved by choosing a basic board with big tiles and with separate view for discards (the Wall, player information and the Game Manager are available as separate windows).

Another example of Four Winds running full-screen on a Windows 10 touch device: Surface Pro 4 using 2736 x 1824 native screen with 200% app scaling. Here Four Winds has its internal app scaling turned off while using the Integrated Square R game board (1386 x 912 pixels) scaled by 200% so that full native resolution of Surface Pro can be utilized. This is the largest game board that Four Winds can use when app-scaling is allowed: without app-scaling it could use its larger game boards, but even the 1920 x 1200 pixels game boards would only cover about a quarter of the screen, and internally scaled text would at some parts appear far too big (where internal scaling is applied, but the surrounding elements stay unscaled). With app scaling Four Winds cannot necessarily utilize its internal high-resolution tile graphics but the system does upscaling so well that there is no noticeable difference.

Changing mouse- and keyboard-dependent settings and triggering mouse events with a touch

The default mouse configuration of Four Winds for making a discard is clicking a raised tile with the right (secondary) mouse button, which naturally does not work in touch environment. It is necessary to change the default:

  1. Choose File > Preferences.
  2. From the option tree, click General under the User Interface category.
  3. Check the Touch screen friendly option (the setting increases spacing of certain controls and makes hit control a bit looser to allow more relaxed touch control).
  4. Click the Game Controls button.
  5. Within the Mouse control group, change the configuration for Discarding to Click on raised tile, and uncheck the Extended confirmation area box.

Note that Windows emulates the mouse-over event in touch environment with tap-and-hold triggered drag gesture (and also with simple tap when the click event is not processed). E.g., you can display information about the available tiles and discards by tapping individual tiles, or by tapping a tile, holding the finger down a while, and dragging the finger over desired tiles. You can use this feature also to compensate the inaccuracy of finger-based pointing especially when accessing menus: instead of just tapping a menu command, you can tap and hold at any point of a drop-down menu and then drag to highlight menu items, and release when the correct menu command is selected.

Similarly, you can usually perform right mouse click by double tapping. E.g., you can display the context menu related to the Hands tab of the Game Manager by double tapping the list of hands, and the context menu related to the Moves tab by double tapping the list of moves.

Using accessibility features to work around problems with input

When you run Windows in tablet mode, the touch keyboard is normally automatically shown whenever keyboard input is expected, and the icon for manual launch is normally available in the system tray area of taskbar (if it is not, you can ensure that it is by right tapping the taskbar and checking Show touch keyboard button). But it is a good idea to pin the on-screen keyboard on the taskbar, just to ensure that keyboard is readily available also in Desktop mode. To do that, switch to Desktop mode, then click  Start > Settings > Ease of Access > On-Screen Keyboard. Once the keyboard is shown, right click (or tap and hold) to show the context menu and then choose Pin to taskbar.

You need a keyboard in Four Winds e.g. when saving games and entering input when customizing the rules. If you need to access the taskbar covered by Four Winds (either in Desktop mode  or Tablet mode, without having a keyboard and Ctrl+Esc command available), you can display the taskbar by moving the Four Winds window off the 0,0 screen position. Aternatively, you can make the taskbar to be automatically hidden, and then forcing it to be shown by sweeping from the bottom edge. To make the taskbar autohidden (and accordingly a control that can be forced to be shown), right click/tap on the taskbar in the desktop mode and choose Taskbar settings, then enable the options “Automatically hide the taskbar in desktop mode” and “Automatically hide the taskbar in tablet mode”.

Hint: You can reposition Four Winds easily at screen top left corner (0,0 coordinate) by double tapping the title bar (or by dragging the window near top left corner as it will be snapped to 0,0 when moved near the top left corner of the screen). This way you can have full-screen-sized Four Winds, moved off from 0,0 coordinate, to again cover the taskbar and fill the entire screen.

Another accessibility feature that can be useful to compensate shortcomings of desktop applications not designed for touch devices is having the magnifier available whenever needed. To have that, click Start > Settings > Ease of Access > Magnifier > Turn on Magnifier. You can determine the percentage of incremental magnification using the settings (often increment of 25% or less is adequate for temporary magnification). Once turned on, you can pin the Magnifier on the taskbar.



Posted on Leave a comment

Understanding App Scaling

In recent years ultra high-resolution displays (called e.g. as “Retina”, “4K”, and “UHD”) have become more and more common. Starting from Windows 8.1, Windows has supported system-based app scaling that allows applications that do not provide internal support for ultra-high display resolutions to run in such environments without problems. By using app-scaling, the user can easily scale the apps according to their personal taste without needing to restart the system or log out and in to have the new setting in effect.


Earlier Windows operating systems allowed the user to make individual adjustments to standard windows components and screen fonts, making it possible to run applications on high-DPI devices where the text would be too small to be easily read. This would work reasonably well e.g. in situations where an 13-inch laptop would be run using a 1920 x 1080 or 1920 x 1280 screen resolution. But this method would be clearly inadequate when using ultra-high screen resolutions: not only the text but the applications themselves appear miniature-like (typically at quarter-size of what they are designed to be) and are practically non-usable unless they are scaled up.

Earlier versions of Four Winds supported internal scaling, and the program used an application manifest where it stated to be “high-dpi-aware”, telling the operating system that it would handle scaling-related tasks internally without operating system intervention. This results in Four Winds versions prior to 2.15 prohibiting the system from performing app-scaling, which in modern environment is normally undesired. (The internal manifest can be overridden by using a registry trick and creating an external manifest; but it is better to update the program to current version so that the desired effect can be achieved more easily.)

Starting from version 2.15 Four Winds no longer manifests itself as a “high-dpi-aware” application so by default it uses the app-scaling setting set by the system. This works well in most situations, and especially in ultra-high resolution environments, where the manufacturer has already set a recommended app-scaling value. To see (and change) the percentage of app scaling, right click on your Windows desktop and choose Display settings then under Scale and layout check  (or change) the current scaling percentage.


App scaling means that applications that do not claim to be “high-dpi-aware” do not see the true resolution of the display, but instead the non-scaled resolution. E.g., if your display uses 2560 x 2048 resolution and 200% app scaling, programs like Four Winds (starting from version 2.15) would see the system resolution as 1280 x 1024, and would accordingly allow using only game boards that fit in this screen size, and the system would scale this up by 200% so that screen size would be doubled both in width and height.

This is in most cases desirable. However, if you have an earlier Windows operating system (Windows 95/98, up to Windows 8; but not 8.1 or 10), and/or have a system that uses (natively or via system app scaling) standard high-resolution screen mode (1920 x 1080 or 1920 x 1200) on a display that is a bit small for such resolution (e.g., a 13-inch laptop where ideal dpi-value would be around 96, meaning resolutions like 1280 x 800 or 1336 x 786, etc.), you would probably prefer to use the old internal app scaling and then use a Four Winds gameboard that matches the resolution. The good news is that you can still have it by doing the following:

  1.  Right click on Four Winds Mah Jong icon on Windows desktop and choose Properties from the context menu (or in Start menu, under 4Winds folder, right click “Four Winds Mah Jong 2”, click More > Open file location, then right click Four Winds Mah Jong shortcut and choose Properties).
  2. In the Properties dialog box, activate the Compatibility tab and check Override high DPI scaling behavior, and from Scaling performed by Application drop-down list choose “Application”. (Note: On the latest Windows 10 versions, you need to first click Change high DPI settings button to access these options.)

Using this setting allows Four Winds to internally enlarge fonts in menus, and make dialog boxes and other system controls bigger, behaving like versions prior to 2.15 did. On later Windows versions and especially when using ultra-high displays, this does not normally produce acceptable results so you would leave manual override compatibility setting turned off.

Because of complex combinations of display resolutions and physical screen sizes, you may need to experiment a while, using different screen resolutions and scaling factors (accessed by right clicking Windows desktop and choosing Display settings), until you find a combination that best works in your environment. The setting recommended by the manufacturer is often ideal quality-wise but may not be ideal as regards usability and legibility.