Unity Games Working On Linux (User Ported)

From GamingOnLinux.com Linux Games Wiki
Revision as of 23:09, 9 January 2018 by Shmerl (Talk | contribs) (Games tested: - The Witcher is not a Unity3D game, it's using modified Aurora engine)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The aim for this page is to be a community driven project that is work in progress and hopefully should show a list of games that will and will not work on Linux from porting it manually.

Warning: Some games may end up not working in future, so buy with care!

Since Unity 4, Linux is supported target platform for Unity games. Since Unity is based on Mono, only appropriate Linux executables are needed, so it is possible to manually "port" a Unity game made for another platform, that does not ship with Linux executables by locating and placing appropriate executable, as long as the game have OpenGL, OpenGLES or Vulkan renderer enabled, uses GLSL or SPIR-V shaders, and doesn't use plugins that are impossible to obtain for Linux.

For Unity 5+ games, porting from Mac version can alleviate the problems with pink shaders, since instead of DirectX/Direct3D HLSL shaders common OpenGL GLSL shaders are used.

Porting a Windows or Mac game

Obtaining game files

First, you have to obtain files of the game you are trying to port. Unless you are trying to fix a broken Linux game or add support for 32-bit or 64-bit for games shipping with only 32-bit or 64-bit executable in Linux (which should be possible by adding the respective files), you have to obtain files for the Windows or Mac version of the game. If you have the game installed on Windows, Mac or Wine, you can use files from there. If not, it is usually possible to download (and extract if they are archived) the files under Linux natively:

  • For Steam, you can download files through SteamCMD or use the Steam console to download a Windows or Mac depot (search SteamDB for the actual depot numbers for your game). It is also possible to download an old version of the game that way.
  • For GOG.com, you can download a Windows installer and extract its files using innoextract --gog setup_whatever_game.exe [1]. For Mac, most (if not all) installers come as .pkg files, which are in fact xar archives. After extracting its contents, the next step is to find a file called 'Scripts' in a subdirectory (cannot remember its exact name right now), which is actually a gzipped cpio archive. After renaming it to Scripts.gz, gunzipping it, and extracting the resulting cpio archive, you can finally get to the game content [2].
  • For itch.io, you can download and extract a Windows version with 7z x Game.exe. For Mac, simply extract the .zip file, ex. unzip Game.zip.
  • For other sources, you can try extract the Windows installers with innoextract, 7za or similar tools. For Mac's .dmg files, you can use dmg2img to convert the file to img with dmg2img image.dmg image.imgand then mount it as a HFS file system with sudo mount -o loop -t hfsplus image.img game [3].

For Windows games, you should simply get the folder containing GameName.exe and GameName_Data, which is of the same structure as Linux.

For Mac games, the file structure is different and you need to move and rename some files around [4]:

mv GameName.app/Contents/Resources/Data GameName_Data
mv GameName.app/Contents/Resources/unity\ default\ resources GameName_Data/Resources/unity\ default\ resources
mv GameName.app/Contents/Resources/UnityPlayerIcon.png GameName_Data/Resources/UnityPlayer.png

The executable is stored in GameName.app/Contents/MacOS/GameName, but it will not be used. The rest of the files are not needed, as we will be replacing them with contents from the Linux Unity player later on.

GameName is the Unity project game name. You will need to rename Linux executables to it later on.

Checking Unity version of the game

Secondly, you have to check the version of the Unity the game it using. This can be done at least two ways:

  • Navigate to the GameName_Data folder of the game you want to check the version. Inside this folder there should be multiple of files, most of which contain the string for the Unity version. Executing strings command on one of them can help getting the exact version. Majority of games include level0 file in them, so navigating to the folder and executing this command should print the actual Unity version on your terminal:
    strings level0 | head -1
    If nothing is returned, it's a very old Unity engine version, which has the version information towards the end of the file, but for which no Linux support exists anyway.
  • If you have any Linux Unity Player executable, you can try putting this executable in the same level as GameName.exe and GameName_Data and launch the game from terminal or with -logfile /location/to/file.txt command line parameter to force the game write a log to /location/to/file.txt and inspect the output. You should look for a line similar to this in log:
    Expected version: 5.6.3p3. Actual version: 5.6.4p1.
    Expected version is the version of your executable, in that case Unity Patch Release 5.6.3p3.
    Actual version is the version of the executable needed, in that case Unity Patch Release 5.6.4p1.
  • Also, PCGamingWiki keeps track of Unity games engine build versions via Property:Unity engine build – you can look at which games have the specific version there. To see the list of games along their Unity engine version, you can use this query. Keep in mind that the data there is contributed by users, so it can be out of date and not all the games may have it filled properly! The date of last version check can often be found noted as a reference on actual pages.

Obtaining Unity files

Knowing the exact game version, you have to obtain Unity Linux Playback Engine files. These can either be taken from another Linux Unity game of the same version, or can be extracted from official Unity Linux Build Support ~100 MB exectuable (Unity 5+) or ~1.5 GB Unity Editor (Unity 4).

The files that are essential to work are:

For 32-bit version:

  • GameName.x86 (.x86 part is sometimes omitted in newer Unity versions, leaving only GameName in some games)
  • GameName_Data/Mono/x86/libmono.so
  • GameName_Data/Mono/x86/libMonoPosixHelper.so (since Unity 5.5)
  • GameName_Data/Plugins/x86/ScreenSelector.so (since Unity 4.3)

For 64-bit version:

  • GameName.x86_64 (.x86_64 part is sometimes omitted in newer Unity versions, leaving only GameName in some games)
  • GameName_Data/Mono/x86_64/libmono.so
  • GameName_Data/Mono/x86_64/libMonoPosixHelper.so (since Unity 5.5)
  • GameName_Data/Plugins/x86_64/ScreenSelector.so (since Unity 4.3)

Sometimes you need to put additional .so plugin files in either the GameName_Data/Plugins/x86 directory for 32-bit version or GameName_Data/Plugins/x86_64 for 64-versions. It's not needed in most cases, but if the game needs them, the names can be deducted from .dll files stored in GameName_Data/Plugins directory for Windows, or from .bundle directories in GameName.app/Contents/Plugins for Mac.

Some common plugins include [5]:

File archives

Some players already extracted the appropriate files. You can either look for the pre-made versions posted on the game forums if someone already did the job (see the table below), but there are also some mirrors of the extracted Unity files, which saves you trouble downloading and extracting the Linux Playback Engine or Unity Editor files or rummaging through your collection of Linux Unity games:

Manually extracting files

You can also manually extract the files needed. For that, you need to download the appropriate version of UnitySetup-Linux-Support-for-Editor-X.Y.Z.ab.exe (for Unity 5+) or either UnitySetup-4.Y.Z.exe for full releases or UnitySetup_update-4.Y.Zab.exe for patch/beta releases, where X.Y.Zab and similar is the Unity version you detected.

First, you need to find the appropriate version of Unity from one of those locations:

*Some full releases start with with number higher than 1, that means that the previous versions were release candidates, obtainable from beta archive.
**Only the current beta releases are available for download, so if you need an old beta executables, unless it is 5.4.0b10, 5.4.0b13, 5.4.0b15, 5.4.0b16, 5.4.0b18, 5.4.0b21, 5.4.0b23, 5.5.0b1, 5.5.0b2, 5.5.0b5, 2017.2.0b11 or 2017.3.0b1 available from Linux Releases, you may need to find archived release somewhere else or find another game using it (see Finding files in your own game library section).
***the xb/xf/xp notation was only used for the Linux Editor builds of Unity 5.5.0p1—2017.1.1f1 (inclusive) and 2017.2.0b6 – i.e. the builds published between 2016-12-13 and 2017-09-05.

  • For Unity 5 and above, you only need to download Unity Setup for Linux weighting around 100 MB. To do so, first locate the version you want on the links above, then copy any component download link (except the Unity Installer for full releases, as it uses a different download scheme link) to clipboard and copy the 12-character hexadecimal build ID, for example d597d0924185 for Unity 2017.1.2p4 – that is the ID of the build. Knowing the build ID, you can download UnitySetup-Linux-Support-for-Editor-X.Y.Zab.exe from the following link:
    http://download.unity3d.com/download_unity/xxxxxxxxxxxx/TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor-X.Y.Zab.exe
    or
    https://beta.unity3d.com/download/xxxxxxxxxxxx/TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor-X.Y.Zab.exe
    xxxxxxxxxxxx is the build ID and X.Y.Zab is your detected Unity version. Generally, regular link works for full releases while beta and patches releases use the latter link, but sometimes the files are even available in both locations.
    Relative location of files Unity downloader downloads is also stored in unity-win.ini file which can be acccssed in
    http://download.unity3d.com/download_unity/xxxxxxxxxxxx/unity-win.ini
    or
    https://beta.unity3d.com/download/xxxxxxxxxxxx/unity-win.ini

    Alternatively, you can also access the links in a more human-readable format (only in beta.unity3d.com) in
    https://beta.unity3d.com/download/xxxxxxxxxxxx/download.html
    Here are examples for Unity 2017.1.2p4:
  • For Unity 4, you need to download the full executable, weighting around 1.5 GB.

After obtaining the installers, you need to extract the files from them. The archives are an NSIS installers and can be extracted with p7zip. cd to the location of your downloaded file and extract the files with 7z x UnitySetup-version.exe, where version is either the respective version of Linux Support for Editor for Unity 5+ or the full installer for Unity 4 you downloaded. For Unity 5+, the files needed will be located in $INSTDIR$_XX_/Variations/ folder, where XX is a random number, and for Unity 4 in Data/PlaybackEngines/linuxstandalonesupport/Variations/ folder. The variations you are interested in are most likely the linux64_withgfx_nondevelopment_mono and/or linux32_withgfx_nondevelopment_mono, but feel free to experiment.

There is a bash script to automatically handle downloading and extracting the required files by passing only the Unity version. It repeats the procedures explained above and was posted on the original Russian forums, but it is largely untested: [6] (click "скрытый текст" to show it). Dependencies include: p7zip-full (p7zip in Arch), curl, grep, cut, tr.

You only need the files mentioned in Obtaining Unity files section, so feel free to remove the rest – replacing the files that ship with Windows game may result in game not starting otherwise!

You also need to rename LinuxPlayer to GameName and Data directory to GameName_Data where GameName is your game name (see Obtaining game files section.)

Finding files in your own game library

An alternative route is to search through your own installed game library, looking for the executables you need. When looking for a specific executable you can type this command in terminal, where . indicates the current directory and can be changed to a different one and X.Y.Zab is the executable you are looking for:
find . -name level0 -print0 | xargs --null grep --with-filename "X.Y.Zab"
This command will only scan the directory in which you invoke it (or pass instead of .) and all its sub-directories, so it's a good idea to run it where you've got all your games installed (e.g. ~/games).[7] [8]

Porting from other platforms

It could also be possible to port games from other platforms, including Android, iOS, tvOS, Samsung Smart TV, Tizen, WebGL, Facebook Gameroom and historically Unity Web Player – possibly even consoles if one could get hands on the files. It may also be possible to port to non-Linux platforms that way, however it all mostly remains to be tested.

The Russian Mac porting guide did not succeed porting an Android game to a x86 system due to a different CPU architecture, so an ARM Linux distro (for example on Raspberry Pi) may be needed [9].

Testing

TODO - write about -logfile and possibly other command line parameters. [10] [11], [12]

Cosmetics

TODO - Write about converting images, icons and making desktop shortcuts. [13], [14], [15]

Games tested

Here are all the games tested for working on Linux. For now, the table only includes one entry per game, sorted alphabetically by game name – in case of new tests, update the existing entry with up to date info. Link the game name to the source you obtained the game from. Alternatively, if you feel the results are vastly different, feel free to add a new entry below the old test and discuss it in the talk page!

Feel free to add pre-Unity 4 games to the list as well and mark them appropriately – it will let other tester know why this Unity game does not work and in case of engine upgrade, could be easily retested.

For Platform column, state the platform you used the files from, most commonly Windows or Mac but other options are possible as well – see Porting from other platforms section.

Only use Yes in the Works column if the game is actually playable as if it were native. If you encounter any game-breaking issues such as game not starting or pink shader textures, mark it as a firm "No" and state the reason in Description column – try to be as descriptive as possible, in case that will help someone else to get the game working by finding the issue.

For tester name, type the last tester name. If you are the one doing tests, you can use your wiki name, e.g. User:Faalagorn.

For the last tested date use YYYY-MM-DD format.

Games with the shader problems would basically require to decompile Managed/Assembly-CSharp.dll and replace the shaders to use there, or to extract the .asset files and create them anew. Some of these games are playable as they are, but certain things will show up pink. [16]

Game Unity version Platform Works Description Tester name Last tested Guide/files used
1954 Alcatraz 4.0.1f2 Windows Yes Seegras 2016-01-13 Blog post
Air Buccaneer 4.2.0f4 Windows No Can't connect to network? Seegras 2016-01-13 Blog post
Albedo: Eyes from Outer Space 4.3.4f1 Windows Yes Apparently perfect (only played for 10 minutes). muntdefems 2017-11-28 GOG.com forums, GOGmix
Astral Terra 5.1.2f1 Windows No Shader problems. Seegras 2016-01-13 Blog post
Avenging Angel 5.1.0f3 Windows No Shader problems. Seegras 2016-01-13 Blog post
Blackguards 3.5.6f4 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Blackguards 2  ? Windows No Refuses to start a new game (probably a video plugin it uses; it was not looked for). darktjm 2017-09-17 GOG.com forums
Block Story™ 4.6.8f1 Windows No "Not available on your current platform" Steam error. Seegras 2016-01-13 Blog post
Bob Came in Pieces 2.6.1f3 Windows No Unsupported (pre-Unity 4). User:Faalagorn 2017-12-21
Bridge Project 4.5.3f3 Windows No x86 crashes, x86_64 does not accept input Seegras 2016-01-13 Blog post
Cognition: An Erica Reed Thriller 3.5.7f6 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Coldfire Keep 4.3.4f1 Windows Yes Seegras 2016-01-13 Blog post
Commando Jack 3.5.7f6 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Contract Wars Client 4.1.5f1 Windows No Game launches fine, but after logging in, the game fails to load with the "PROFILE LOAD FAILED Check your Internet connection (proxy, ports, antivirus/firewall) or reload page with the game" error. Could be due anticheat. User:Faalagorn 2017-11-25 Облако Mail.Ru
CreaVures 3.4.2f2 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Dead Bits 4.1.3f3 Windows Yes Seegras 2016-01-13 Blog post
Dead Effect 4.6.0f3 Windows Yes Seegras 2016-01-13 Blog post
Dead Frontier 3.5.7f6 Windows No Unsupported (pre-Unity 4). Faalagorn 2018-01-02
Dead Island Epidemic (delisted) 4.6.1f1 Windows No Libs missing, among them FMODUnity .NET Plugin. Seegras 2016-01-13 Blog post
Dementium II HD 3.5.7f6 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Depths of Fear :: Knossos 4.6.1f1 Windows Yes Seegras 2016-01-13 Blog post
Deus Ex: The Fall 4.3.4f1 Windows No Needs LD_LIBRARY_PATH for libsteam.api.so; Wwise sound engine wrong version, playable. Seegras 2016-01-13 Blog post
Dungeonland 3.5.6f4 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Dysan the Shapeshifter 3.4.2f2 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Empress Of The Deep 2: Song Of The Blue Whale 3.3.0f1 Windows No Unsupported (pre-Unity 4). User:Faalagorn 2017-12-21
Empyrion – Galactic Survival 5.2.3f1 Windows No Hanging? Seegras 2016-01-13 Blog post
Escape from Tarkov 5.6.4p3 Windows No Version 0.2.45.214 worked, later versions removed Vulkan renderer, leaving only D3D11, making the game not launching. User:Faalagorn 2018-01-05 Official forums
Expeditions: Conquistador 4.? Windows Yes Seems to work fine. darktjm 2017-09-17 GOG.com forums
Final Dusk 4.6.1f1 Windows Yes Seegras 2016-01-13 Blog post
First Person Lover 4.6.1f1 Windows Yes Completable – for some reasons I couldn't see names on credits and had performance/minor flickering issues, but that may be my side. Leaderboards and some links do not work, as the main site do not work anymore. User:Faalagorn 2017-12-20 Google Drive
Gabriel Knight: Sins of the Fathers – 20th Anniversary Edition 5.3.4f1 Windows No Shader problems, shows unusable menu. darktjm 2017-09-17 GOG.com forums
Godus Wars 5.2.2f1 Windows No Shader problems. Seegras 2016-01-13 Blog post
Gravi 4.5.5f1 Windows Yes Seegras 2016-01-13 Blog post
Guns n Zombies 5.2.2f1 Windows No Shader problems, crashes. Seegras 2016-01-13 Blog post
Her Story 5.0.1f1 Windows No Uses AVPro Windows Media Plugin for videos. User:Yepoleb 2017-09-17 GOG.com forums
Hired Ops 5.3.6p1 Windows No Requires libsteam_api.so and ScreenSelector.so; pink screen when launching. User:Faalagorn 2017-11-26
Huntsman: The Orphanage (Halloween Edition) 4.2.2f1 Windows Yes Needs LD_LIBRARY_PATH for libsteam.api.so. Seegras 2016-01-13 Blog post
Jalopy 4.5.3f3 Windows Yes User:Interknet 2017-05-31 Steam forums, GitHub Gist
Joe Dever's Lone Wolf HD Remastered 4.5.4f1 Windows No Self-written plugins. Seegras 2016-01-13 Blog post
Kyn 4.6.6f2 Windows Yes Apparently perfect (only played for 10 minutes). May have to be restarted a couple of times for it to work in fullscreen. muntdefems 2017-09-12 GOG.com forums, GOGmix
Last Inua 4.2.2f1 Windows Yes Seegras 2016-01-13 Blog post
Last Tinker™: City of Colors, The 4.3.4f1 Windows Yes Apparently perfect (only played for 10 minutes). Linux version is available on Steam. muntdefems 2017-09-12 GOG.com forums, GOGmix
Magnetic: Cage Closed 4.3.4f1 Windows No "Not available on your current platform" Steam error. Seegras 2016-01-13 Blog post
Melissa K. and the Heart of Gold Collector's Edition 4.5.3f3 Windows No Hanging? Seegras 2016-01-13 Blog post
Might & Magic X - Legacy 4.2.2f1 Windows No Hanging? Seegras 2016-01-13 Blog post
My Summer Car 5.0.0f4 Windows Yes User:Interknet 2017-05-31 Steam forums
Once Bitten, Twice Dead! 4.6.1f1 Windows Yes Seegras 2016-01-13 Blog post
Overcast - Walden and the Werewolf 4.1.3f3 Windows Yes Seegras 2016-01-13 Blog post
Paper Sorcerer 4.1.5f1 Windows Yes Seegras 2016-01-13 Blog post
Pid 3.5.3f3 Windows No Unsupported (pre-Unity 4). muntdefems 2017-09-14 GOG.com forums
Randal's Monday 4.1.5f1 Windows Yes Perfect. I've completed it without a crash or glitch. muntdefems 2017-09-12 GOG.com forums, GOGmix
realMyst: Masterpiece Edition 4.5.5p4 Windows No Broken menu, needs uWebKit. Seegras 2016-01-13 Blog post
Red Lake 4.3.4f1 Windows Yes Seegras 2016-01-13 Blog post
Reign Of Kings 5.1.1p2 Windows No Shader problems, needs LD_LIBRARY_PATH for libsteam.api.so. Seegras 2016-01-13 Blog post
Republique 5.2.2p4? Windows No Pink shaders. muntdefems 2017-09-14 GOG.com forums
Republique 5.2.2p4 Windows No "Not available on your current platform" Steam error. Seegras 2016-01-13 Blog post
Reservoir Dogs - Bloody Days (delisted) 5.6.1p1 Windows No Crashes at startup. Huinehtar 2017-12-20 GOG.com forums
Seamulator 2009 2.1.0f5 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Shad'O 3.5.2f2 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Shelter 3.5.7f6 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Slender: The Arrival 4.5.1p3 Windows No Texture problems, playable. Seegras 2016-01-13 Blog post
SMILE GUIDE: the apple escape 5.3.2f1 Windows No Flickering – shaders problems? User:Faalagorn 2017-12-20
StarForge (delisted) 4.5.5f1 Windows No Shader problems, needs LD_LIBRARY_PATH for libsteam.api.so. Seegras 2016-01-13 Blog post
Stick it to The Man! 4.3.2f1 Windows Yes Seegras 2016-01-13 Blog post
Stranded Deep 5.2.2f1 Windows No "Not available on your current platform" Steam error. Seegras 2016-01-13 Blog post
Subject 13 4.6.4f1 Windows Yes Nearly perfect. I've completed it without a crash, but I did encounter a couple of minor texture glitches. muntdefems 2017-09-12 GOG.com forums, GOGMix
Subnautica 5.2.3f1 Windows No "Not available on your current platform" Steam error. Seegras 2016-01-13 Blog post
Tappy Plane 5.3.4f1 Mac Yes MyKubik 2016-04-11 Blog post
Tharsis  ? Windows No Pink shaders. muntdefems 2017-09-14 GOG.com forums
The Dead Linger (delisted) 4.6.0b20 Windows Yes Old version – game switched to Unreal Engine later. Some black textures. Seegras 2016-01-13 Blog post
The Forest 5.1.5f1 Windows No Doesn't let you launch into a new game. User:Interknet 2017-05-31
The Hat Man: Shadow Ward 4.3.4f1 Windows Yes Seegras 2016-01-13 Blog post
The Sexy Brutale 5.3.6p5 Windows No User:Hummer010 2017-10-01 GOG.com forums, Google Sheets
The Swindle 4.6.3f1 Windows Yes Needs Steamworks libraries in the runtime for it to work. Apparently perfect (only played for 10 minutes). muntdefems 2017-12-15 GOG.com forums, GOGMix
The Tower 5.1.2f1 Windows No Shader problems. Seegras 2016-01-13 Blog post
Theatre Of The Absurd 3.5.0f5 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Them - The Summoning 3.4.2f2 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Train Town 4.5.0f6 Windows Yes Seegras 2016-01-13 Blog post
Toren 4.3.4f1 Windows Yes Apparently perfect (only played for 10 minutes). muntdefems 2017-12-15 GOG.com forums, GOGmix
Toren Deluxe Edition 4.3.4f1 Windows Yes Apparently perfect (only played for 10 minutes). muntdefems 2017-12-15 GOG.com forums, GOGmix
Treeker: The Lost Glasses 5.1.2f1 Windows No Shader problems, playable. Seegras 2016-01-13 Blog post
Truffle Saga 3.5.7f6 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Unearthed: Trail of Ibn Battuta - Episode 1 - Gold Edition 3.5.7b1 Windows No Unsupported (pre-Unity 4). Seegras 2016-01-13 Blog post
Urja 4.5.4f1 Windows Yes Seegras 2016-01-13 Blog post
Year Walk 4.5.5f1 Windows Yes Seegras 2016-01-13 Blog post

External links