/UniverseLAN

UniverseLAN is a GOG Galaxy wrapper which allows LAN / Direct IP connections for games using Galaxy Multiplayer

Primary LanguageC++MIT LicenseMIT

Why?

This extends the "You buy it, you own it" and "DRM-Free" GOG philosophy to the multiplayer portion of all games that use GOG Galaxy.

Why UniverseLAN? Because the Universe is much bigger than the Galaxy!

What is UniverseLAN?

UniverseLAN is a GOG Galaxy wrapper which allows LAN / Direct IP connections for games using Galaxy Multiplayer (without using GOG Galaxy client).
This is useful in cases where:

  1. You and other people own a game
  2. All or some of you don't have (reliable) internet access
  3. And as such GOG Galaxy services won't work
  4. The game you want to play does not natively support LAN and/or DirectIP connections
  5. But you all want to play together anyway

UniverseLAN allows you to play locally (e.g. LAN parties) without relying on internet access. UniverseLAN does not care if you are in a hotel room with bad WiFi or visiting a remote place with your friends! You can still enjoy your games, together.

I hope this does not need to be said, but:

  • UniverseLAN does not bypass or remove any DRM measures.
  • UniversLAN does not bypass any cd-key or ownership checks.
  • UniverseLAN does not give you free DLC, you still need to buy DLC from GOG and install the DLC before being able to use any DLC.
  • UniverseLAN does not and can't bypass any "always online" requirements.
  • UniverseLAN does not condone piracy, does not facilitate piracy, and will not facilitate piracy.
  • UniverseLAN is not a cheat tool and does not facilitate cheating, and will not facilitate cheating.
  • Please adhere to GOG requirements:

Your account and games are for your personal use only. If you want to share them, you can always buy a gift for that person.

The DRM-free nature of our service means that we trust you that this will not be abused.

  • The devices that you want to play on together do need to be able to reach each other on a reliable (local) network.

What is the status of UniverseLAN?

UniverseLAN is in development, and in beta.
Do expect bugs, possibly lost save files, updates and fixes.

At this moment in time you are expected to build it yourself to get up-to-date binaries.
Older binaries may be available at the 'Releases' page.
UniverseLAN requires a C++20 compatible compiler (VS 2019 16.10+ , GCC 13+).
The internal development name of this project is LanSupportForDRMFreeGames [LSFDRMFG], you might see references to that in the source.

Note

*** Some games do use GOG Galaxy but do not use GOG Galaxy for multiplayer.
They can use other services or custom networking implementations.
Such games might not be able to be played together using UniverseLAN wrapper.

How do you get .def files?

To generate the module definition files, use wrap_dll:

  • python3 wrap_dll.py Galaxy64.dll

Then remove on each line everything after (and including) = sign in .def file. Place in Source/DLLs/<version>/UniverseLAN.def

Instructions

  • Replace target game Galaxy.dll, Galaxy64.dll, REDGalaxy.dll or REDGalaxy64.dll to use UniverseLAN (check the .dll file properties to view the version information, else make an sha1 checksum and look in sha1_hashes.txt for the hash to determine the sdk version).
  • Place config files in the working directory* of the game
  • Place Server executable where config files are located.
  • Adjust config accordingly (e.g. point to a server address that hosts the UniverseLAN Backend)
  • It's recommended to NOT mix x64 and x86 platforms (e.g. x64 server with x86 game)
  • Do NOT mix different versions due to ABI incompatibility (e.g. 1.148.3.0 client with 1.100.2.0 server or vice versa), GOG does not keep their Galaxy library backwards compatible / upgradeable.
  • One machine must host the server, the other machine must be correctly configured to point to the machine hosting the server.
  • Make sure the Galaxy ID numbers are different (Config.ini).

* - Usually the working directory is the root directory of the game, or where the .exe file is located. Some games use a proxy launcher .exe in the game root directory like Game_Name\Launcher.exe, which launches and executable from a subfolder like Game_Name\Binaries\Win64\RealGame.exe, this might indicate that config and server files should be placed in Game_Name\Binaries\Win64\.

For developers:

  • Don't add GOG stdint.h when adding new SDK versions, remove it. If you try it WILL cause errors.
  • It is possible to support Galaxy SDK versions from 1.57 up to the newest ones (1.152.6+).
  • If someone has earlier SDK headers and/or documentation files please share <3

Debug Information

Debug (tracing) files can be found in <Configuration Files Directory>/tracing/<date time when application was launched>/.

Compilation

Windows

  • Visual Studio 2019 16.10 or newer required

Linux

  • Requires GCC 13 or newer.
  • Requires libtbb to be present (libtbb:i386 on 64-bit systems when compiling for x86)

List / status of games

✅ (N) - Players can play together, tested with N players [(2) would mean 2 clients].
🚧 - Work in progress.
⚠️ - May or may not work, not tested, the future will tell.
❌ - Tested and does not work.
❓ - Can't acquire the correct GOG Galaxy SDK version.
↔️ - Game supports direct connect, LAN or free multiplayer, and as such does not need UniverseLAN.
🔶 - Worked before, some commit has broken this game. To be investigated.

Game Status Tested GOG Galaxy SDK Version Notes
Aragami 1 ✅(2) 1.121.2
Forsaken Remastered ✅(3) 1.124.0
Guns, Gore & Cannoli 2 ✅(3) 1.124.0
Tropico 6 ✅(2) 1.139.2 Also other games are displayed? Game has custom networking?
Build 161 worked, build 243 seems to be broken (can't join lobby)
Update: The person testing UniverseLAN used an invalid configuration (same generated Galaxy ID numbers), after fixing this configuration issue in Config.ini the person reported the game seems to work on build 243.
MetalSlug3 ✅(2) 1.100.2 Works since build 243
Serious Sam 4 ✅(2) 1.144.1 Works since build 256
Tooth and Tail ✅(2) 1.122.1 Works with 1.124.0, tested with build 256
Door Kickers - Action Squad ✅(2) 1.133.6 Tested with build 287
Driftland - The Magic Revival 🚧 1.133.6 Both games crash when joining
Serious Sams Bogus Detour 🚧 1.100.2 Stuck on "Creating lobby..." or "Joining lobby..."
Can get into lobby since build 243 but host crashes on start
Niffelheim 🚧 1.139.2 Stuck at "Loading..." (save transfer?)
Alien vs Predator 2000 It's some waay earlier version than 1.67 (smallest size around 3.5MB).
The AvP2K Galaxy.dll is around 1.9MB. Version is maybe 0.176?
Homeworld Remastered Collection ⚠️
Homeworld: Deserts of Kharak ⚠️
No Man's Sky ⚠️
Speed Brawl ⚠️ 1.144.1
DUSK ⚠️ 1.133.6
Absolver ⚠️ 1.104.2
Shadow Warrior 2 ⚠️ 1.95.0
Rage of Mages II: Necromancer ↔️
Neverwinter Nights 2 Complete ↔️
Baldur's Gate 3 ↔️
Heroes of Might and Magic 3 ↔️
Empire Earth 3 ↔️
Jazz Jackrabbit 2 Collection ↔️
Ticket to Ride ↔️ 1.139.2 Tried it with the wrapper and works, but need to create a free Wonder account
Aragami 2 ↔️ 1.148.3 Probably does not use GOG Galaxy for networking (doesn't work for private lobbies).
Can play on public lobbies without GOG Galaxy or with this patch AFAIK.
DUSK (DuskWorld) ↔️ 1.133.6 Uses steam (works without Steam Client) api for free online play, doesn't use GOG Galaxy.
Roboquest 1.148.3 Probably does not use GOG Galaxy for networking.
Northgard 1.139.2 Still thinks the game is offline, custom multiplayer?
Tropico 5 1.68.0 Game uses an external service for multiplayer?

Notice

I'm not affiliated in any way with GOG or CD Projekt RED.
All trademarks and copyright are property of their respective owners.
Any statements or expressed opinions here are each of their respective own person and do not represent any companies or other entities.
GOG SDK documentation and SDK include files are freely available from https://docs.gog.com/galaxyapi/.
No copyright infringement intended.

Is distributing header files against copyrights?

I don't think so:

  1. https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc.
  2. https://softwareengineering.stackexchange.com/questions/216471/how-does-copyrights-apply-to-source-code-header-files

Source/DLLs/<version>/gog/ is missing files? What do I do?

The tests require the Galaxy.lib and Galaxy.dll files from GOG.
You can get any version matching Galaxy.dll from any game that you own.
UniverseLAN does not and will not distribute (RED)Galaxy / (RED)Galaxy64 dll files, because it's against copyright / GOG ToS.
I don't know if .lib files should be considered API or copyrighted program code, but to play it safe UniverseLAN also does not distribute .lib files.
For the time being; if you wish to build the tests, you need to acquire these .lib files from the GOG Galaxy SDK, available in the GOG Galaxy Developer Portal.
Building the tests is optional.

Tip: By creating a project with wrap_dll and providing a valid (RED)Galaxy(64).dll you can generate a wrapper project, which when compiled, should yield a compatible .lib file that you can use to build the tests.

Galaxy SDK Backwards Compatibility List

These GOG Galaxy SDK versions should work interchangeably.

For Developers: This does not neccesseraly represent version compilation compatibility, for example 1.125 and 1.125.1 are not compile-compatible (due to uint32_t to enum type change), but should be binary-compatible.

SDK Base Version Other Compatible Versions Notable changes
1.57 -
1.59 1.60 Added:
IFriends::AvatarType
IFriends::GetFriendPersonaName
IFriends::GetFriendAvatarUrl
1.61 - Added:
IFriends::IPersonaDataChangedListener
IFriends::IRichPresenceChangeListener
IFriends::RequestUserInformation
IFriends::Set/Delete/ClearRichPresence
1.62 1.63
1.64
Added:
IUser::IsLoggedOn
ILeaderboardEntriesRetrieveListener::FAILURE_REASON_NOT_FOUND
IErrorManager / GetErrorManager
Renamed Reset to ResetInstance
1.65 1.66
1.67 -
1.68 -
1.69 -
1.70 -
1.71 1.72
1.73 -
1.74 -
1.75 -
1.76 -
1.77 -
1.78 1.79
1.80
1.82 -
1.83 -
1.84 1.85
1.86
1.87 -
1.88 1.89
1.90
1.91 1.92
1.92.1 1.93
1.94
1.95
1.96
1.97
1.98
1.99 -
1.100 1.100.2
1.101
1.101.2
1.101.4
1.102 -
1.103 1.103.1
1.104
1.104.1
1.104.2
1.104.3 -
1.104.4 1.104.5
1.104.6
1.105
1.106 1.107
1.108
1.109 -
1.110 1.110.1
1.110.2
1.110.3
1.110.4 1.111
1.111.2
1.112
1.112.1
1.112.2
1.113 -
1.113.2 -
1.113.3 -
1.114 1.114.1
1.114.2
1.114.3
1.114.4
1.114.6
1.114.7
1.114.8 1.114.9
1.114.12
1.120 -
1.120.1 1.121
1.121.1
1.121.2
1.122 1.122.1
1.122.3
1.122.4
1.123
1.123.1
1.124
1.125 1.125.1
1.125.2
1.126 1.126.1
1.127 -
1.128 1.128.1
1.128.2
1.128.3
1.129 1.130
1.130.1
1.131 1.131.1
1.131.2
1.131.3
1.132 1.132.1
1.133 -
1.133.1 -
1.133.3 1.133.4
1.133.5
1.133.6
1.133.7
1.133.9
1.134 1.134.1
1.134.2
1.134.3
1.134.4
1.134.5
1.134.6
1.134.7
1.134.8
Telemetry has been added
1.134.9 -
1.134.10 -
1.135 -
1.136 1.136.4
1.137
1.137.1
1.137.2
1.137.3
1.137.4
1.137.5
1.137.6
1.138
1.138.1 1.139
1.139.1
1.139.2
1.139.3
1.139.4
1.139.5 -
1.139.6 -
1.139.7 1.139.8
1.139.9
1.140 - Added GalaxyThread (+to InitOptions)
1.141 1.142
1.143 1.143.1
1.143.2
1.143.3
1.144
1.144.1
1.144.2
1.145
1.145.1
1.145.2
1.145.3
1.145.4
1.145.5
1.146 1.147
1.147.1 -
1.148 1.148.1
1.148.2 - Added GetRichPresenceKeyByIndex/Copy
1.148.3 1.148.4
1.148.5 - Removed SignInUWB and added SingInXbox
1.148.6 - Added CloudStorage
1.148.7 1.148.8
1.148.9
1.148.10
1.148.11 1.148.12
1.148.14 -
1.148.15 -
1.148.16 1.148.17
1.148.18
1.148.19
1.148.20
1.148.21
1.148.22
1.148.23
1.148.25
1.148.26
1.149.0
1.149.1 -
1.149.2 1.149.3
1.149.4
1.149.5
1.149.6
1.149.7
1.149.8
1.149.9 -
1.149.10 -
1.149.11 -
1.149.12 1.149.13
1.149.14
1.149.15
1.149.16
Galaxy/Galaxy64 renamed to REDGalaxy/REDGalaxy64
1.150 - GOG reverted the rename to RED prefix, it's Galaxy/Galaxy64 again.
1.151 -
1.152.1 -
1.152.2 -
1.152.5 1.152.6