One of the most frustrating things about gaming on Linux is that every game with some semblance of quality requires me to play with a bunch of obnoxious people online. Are there any free Linux games, with some degree of quality, that allow the player to play offline in a "career mode"?
Ubuntu – Are there any free, high quality, career mode games for Ubuntu
gamessoftware-recommendation
Related Solutions
Well you should make sure everything else outside your computer is behaving nicely.
Run a traceroute
to the gaming server. Where does latency grow? Is it normal or is it happening in places where it shouldn't?
For example, a hop from New York to London will add latency. Fifty or so milliseconds to the first hop after your router probably means faulty equipment in your last mile; doublecheck with your neighbours.
How much latency do you have to your router? Switching from wifi to wired connectivity may not always be possible, but it might just shave five or so milliseconds.
Is your computer good enough for the game? Sometimes game will have suboptimal performace under Wine, and well, if a game can't process packets in a round trip time (your latency to the game server as measured through ping
or traceroute
doubled) then the bottleneck is actually not the network.
Does your ping even matter? Most real time games require interpolation to run smoothly. This means you're actually playing "in the past." For example, Source games have every player running 0.1 seconds in the past, which means all players with latency in the double digits actually are playing on a even field. Personally I play at 160 ping on TF2 servers in US and don't really have too much trouble with it. Read more here. Read here about the Unreal networking stack.
Here's an experiment that may help you get the answer. For convenience, I'll refer to your default Steam library location as $STEAM
(the default is ~/.local/share/Steam/
). Proton is installed by default to $STEAM/steamapps/common/Proton 3.7
, I'll call this $PROTON
.
So, when I tried running The Witcher, Steam ran this command:
"$PROTON/dist/bin/wine-preloader" "$PROTON/dist/bin/wine" "Z:\$STEAM\steamapps\common\The Witcher Enhanced Edition\System\witcher.exe"
Where $STEAM
has backslashes instead of slashes, as it's a Windows path. In addition, it set something like 70 environment variables (related to Wine, Steam, various hardware/drivers, libraries, etc.). A single variable, WINESERVERSOCKET
referred to the wine server started for this instance. If I omitted this variable and used all the rest, I could start the game from the command line.
Steps:
Replace
$PROTON/dist/bin/wine-preloader
with a wrapper script that saves the environment somewhere:PROTON="$HOME/.local/share/Steam/steamapps/common/Proton 3.7" # adjust to your settings mv "$PROTON/dist/bin/wine-preloader" "$PROTON/dist/bin/wine-preloader-orig" printf "%s\n" '#! /bin/sh' 'env --null | grep -vz WINESERVERSOCKET > ~/env' > "$PROTON/dist/bin/wine-preloader" printf 'exec %q "$@"\n' "$PROTON/dist/bin/wine-preloader-orig" >> "$PROTON/dist/bin/wine-preloader" chmod +x "$PROTON/dist/bin/wine-preloader"
The script is essentially this:
#! /bin/sh env --null | grep -vz WINESERVERSOCKET= > ~/env printf "%s\0" "$0"-orig "$@" > ~/cmd exec /home/user/.local/share/Steam/steamapps/common/Proton\ 3.7/dist/bin/wine-preloader-orig "$@"
It saves the environment, except for
WINESERVERSOCKET
, in~/env
, the command to run and arguments in~/cmd
and runs the actual file with the arguments provided. It uses ASCII null characters to separate everything, since the actual environment variables may contain newlines.Note that I save the command with
-orig
added for convenience.Run the game from the Steam GUI. The wrapper script will create these files.
You can load the environment and run the command from these files. In bash
mapfile -d '' -t env < ~/env mapfile -d '' -t cmd < ~/cmd env "${env[@]}" "${cmd[@]}"
-d ''
here tells bash the files use the ASCII null character as delimiter.
This much was sufficient for The Witcher to run for me. All of those environment variables probably won't be necessary. I leave it to you to test which aren't.
Of course, all of these might be completely unnecessary. Looking at Steam's command-line options, we have:
-applaunch <appID> [launch parameters] Launches an Game or Application through Steam.
And when I ran:
steam -applaunch 20900 foo bar
the Wine command was:
"$PROTON/dist/bin/wine" "Z:\$STEAM\steamapps\common\The Witcher Enhanced Edition\System\witcher.exe" foo bar
So Steam did pass on foo
and bar
as arguments to the game. This might be all you need.
Best Answer
0 A.D.