Tower of Guns

Tower of Guns

View Stats:
 This topic has been pinned, so it's probably important
blankslatejoe  [developer] Nov 23, 2014 @ 6:09pm
Linux Help Thread!
Hi Folks--now that the Linux build is out, I can unsticky the Linux thread and post this one instead. You'll have to bear with me a bit in this thread, as I'm not a linux user myself, nor did I develop the Linux port myself, so this is a whole new world to me!

The following FAQ was compiled by Chris, my awesome Linux QA helper!

Updated: 5/15/15 - includes steps to change .sh file in case of OS language conflict

Tower Of Guns 1.27 - Frequently Asked Questions
===============================================

GENERAL INFORMATION:

Within the game installation directory, you find a file called README.linux. Please consult this file first if you run into any trouble.


Also it is highly advised to use the proprietary drivers for your video card. Open drivers (i.e. MESA/Gallium) can work, depending on your chip but you might experience performance issues and/or incorrect game rendering.
-----------------

FAQ:

The game will not launch.

Please try to start the game via console by executing the shellscript TowerOfGuns.sh. It should display an error message. Shortly after. This should help us to identify the issue.


The crashes on startup with the Error message:
"error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory".

Please make sure to install the OpenAL. In case you run a 64-bit (x86_64) Distribution, you will need the lib32 version of it. Most Linux Distributions offer this library right out of the box, so you should be able to install it using your package manager.


The game story dialogue seems glitched and/or the game freezes after the first level.

This can happen if your system uses a specific locale setting. Changing your LANG variable to "en_US.UTF-8" will fix this. Of course you do not need to change your system language just to play the game. Feel free to apply this argument to the TowerOfGuns.sh shellscript. To do that, just open TowerOfGuns.sh with your favorite text editor and modify it like this:
#!/bin/sh
cd "$(dirname "$0")"/Binaries/Linux
env LANG=en_US.UTF-8 ./UDKGame-Linux -NOVERIFYGC $@

EDIT: You can also just grab a modified .sh file here, should you have this problem: http://www.towerofguns.com/ToG_Linux_SHfile.zip


The game performance seems poor when enemies spawn or fire.

There are several thing you can try out to maximaize the performance.
1) Please make sure to disable any Desktop/Composite Effects before launching the game. How you do that depends on which Desktop/Window Manager you use. In doubt, please check the documentation of your Desktop/Window Manager.
2) Many Linux Distributions will utilize the poversaving capabilities of your processor to save energy and keep it cool. They will usually clock up maximum speed when needed, but this might not be quite fast enough for the game, resulting in FPS drops when the action starts. Because of that, it may be a good idea to disable powersaving for as long as you play the game.
On Ubuntu, you can set your CPU to use the maximum clock using a program like cpufreq-set: "sudo cpufreq-set -g performance". After playing, you can restore the previous behaviour using: "sudo cpufreq-set -g ondemand".
If you have configured your system to utilize a Desktop Applet to change the CPU powerlevels, you can of course use those to reach the same effect. On other Distributions, the programs used to manage the CPU powersaving might differ. In doubt, please check the documentation of your Distribution.


I get no sound/music.

This usually happens when PulseAudio is used but it is not configured to support ALSA playback. Tower of Guns uses a custom SDL library which does not support PulseAudio natively! So please make sure that your system is configured for native ALSA playback and to not try to set SDL_AUDIODRIVER to pulse/pulseaudio!
If you want the game to play via PulseAudio, you can configure an ALSA-bridge. To do that, make sure that you have installed the alsa plugins package. On Ubuntu/Debian it should be called libasound2-plugins, while for other Distributions, it can be called different, like alsa-plugins.
If you run a 64-bit (x86_64) Distribution, please make sure that you install the 32-bit versions of alsa plugins and other packages for your audio driver/system.
For more detailed information, see http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/, paragraph "ALSA Applications" or the documentation of your Distribution.


------------------------

As always, thanks to you guys for your awesome support.
Last edited by blankslatejoe; May 15, 2015 @ 7:19am
< >
Showing 1-15 of 28 comments
DaVince Nov 28, 2014 @ 9:00pm 
Hi Joe, thanks for making the game! I've been playing it tons ever since it came out on Linux. Anyway, I found a few more things people could do to improve performance.

The instructions do seem to be written for the non-Steam version. There's no TowerOfGuns.sh in the Steam version, so -NoVerifyGC, needs to be added under Game properties -> Set Launch Options.

-----------------------------------------
Disable postprocessing in the game
This does not seem to be an actual option in the game, but instead a console thing.
- In TOG's in-game settings, make sure the console is enabled.
- Press ~ (or tab).
- Type this:
show postprocess
- It will use this setting for the duration of your game session. So if you quit the game entirely, you'll have to enter this command again (just press up in the console to make this easier).

Your FPS should shoot up once you've done this. (You can display your FPS with the console command "stat fps".)

--------------------------------------
Change the engine's config file
Unreal Engine 3 has a LOT of configuration settings. And it seems that someone has figured out some settings that definitely increased the performance for me. Original instructions are here, but it's very generic so I've already done it for all y'all fine folks.

Download this modified config file[pastebin.com] and save it as $HOME/.local/share/steam/SteamApps/common/TowerofGuns/Engine/Config/BaseEngine.ini. Make a backup of the original file first!

Then open the file in a text editor and find
ThreadedShaderCompileThreshold=6
Change 6 into the amount of CPU cores you have, minus 2. So if you have 8 cores the number is 6, etc.

Start TOG. Reset the game's settings to their defaults so it will pick up on these new settings. Then change the in-game settings to what you're comfortable with. :)

-------------------------------------------
NVIDIA-specific performance increases
Enable threaded optimizations. This makes a pretty big difference. It's not on by default because it decreases performance on single-threaded apps so NVIDIA decided it's better to make you do it manually if you need it.

In Steam, pick Game properties, Set Launch Options. Enter the following:

env LD_PRELOAD="libpthread.so.0 libGL.so.1" __GL_THREADED_OPTIMIZATIONS=1 __GL_YIELD="NOTHING" %command%
(You can also add -NoVerifyGC after %command% for the microstuttering fix from Joe's original post.)

By the way, this specific trick works for any game, and will improve performance for a lot of games by varying degrees.

------------------------------------------------
What doing all this did for me personally
Before
45-60 in an empty room. Dips when looking through a large room (sometimes down to 30 FPS).
Parts with heavy action were slideshows of 1 FPS. Too much action, especially explosions, rendered the game unplayable. End boss almost impossible.
Just looking around in a large room would make the FPS dip.

After:
60-70 FPS (in an empty room).
When fighting enemies, the experience is almost always completely smooth - no slideshows at all, and better FPS in general. Even on the end boss. It's just ridiculous how much of a difference these tweaks made for me.
Last edited by DaVince; Nov 28, 2014 @ 9:03pm
Faugn Nov 29, 2014 @ 2:44pm 
The game does not start for me. I'm on Arch Linux 64 bits, with a NVIDIA GeForce GTX 560 (using the proprietary drivers).

Here is the log when started from Steam:

Game update: AppID 266110 "Tower of Guns", ProcID 17017, IP 0.0.0.0:0 ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Installing breakpad exception handler for appid(steam)/version(1416617579) Setting breakpad minidump AppID = 266110 Steam_SetMinidumpSteamID: Caching Steam ID: 76561197996991420 [API loaded no] Installing breakpad exception handler for appid(udkgame-linux)/version(1.0) Installing breakpad exception handler for appid(udkgame-linux)/version(1.0) ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '~/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Installing breakpad exception handler for appid(udkgame-linux)/version(1.0) Installing breakpad exception handler for appid(udkgame-linux)/version(1.0) Installing breakpad exception handler for appid(udkgame-linux)/version(1.0) Init: BSD Sockets initialized DevConfig: GConfig::Find has loaded file: ../../Engine/Config\ConsoleVariables.ini Init: Version: 12097 Init: Epic Internal: 0 Init: Compiled (32-bit): Oct 26 2014 16:36:58 Init: Changelist: 1999891 Init: Command line: Init: Base directory: ~/.local/share/Steam/SteamApps/common/TowerofGuns/Binaries/Linux/ [0000.05] Log: Steam Client API initialized 1 [0000.21] Log: Steam Game Server API initialized 1 [0000.23] Log: Sockets: I am localhost (192.168.0.11:0) [0000.23] Init: Presizing for 83221 objects not considered by GC, pre-allocating 0 bytes. [0000.23] Init: Object subsystem initialized Game removed: AppID 266110 "Tower of Guns", ProcID 17018

And when starting manually from a console:

> ./UDKGame-Linux Init: BSD Sockets initialized DevConfig: GConfig::Find has loaded file: ../../Engine/Config\ConsoleVariables.ini Init: Version: 12097 Init: Epic Internal: 0 Init: Compiled (32-bit): Oct 26 2014 16:36:58 Init: Changelist: 1999891 Init: Command line: Init: Base directory: ~/.local/share/Steam/SteamApps/common/TowerofGuns/Binaries/Linux/ [S_API FAIL] SteamAPI_Init() failed; Sys_LoadModule failed to load: ~/.steam/bin32/steamclient.so [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll. [0000.04] Log: Steam Client API initialized 0 [S_API FAIL] SteamAPI_Init() failed; Sys_LoadModule failed to load: ~/.steam/bin32/steamclient.so [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll. [0000.04] Log: Steam Game Server API initialized 0 [0000.06] Log: Sockets: I am localhost (192.168.0.11:0) [0000.06] Init: Presizing for 83221 objects not considered by GC, pre-allocating 0 bytes. [0000.06] Init: Object subsystem initialized [0000.07] Log: Shader platform (RHI): PC-OpenGL [0000.09] Log: Textures will NEVER stream out! /samba/ue3builds/MINORITY8-PC/projects/UE3_TowerOfGuns/Development/Src/../../Development/Src/Engine/Src/UnPhysLevel.cpp(1544): Assertion failed: 0 zsh: segmentation fault (core dumped) ./UDKGame-Linux

DaVince Nov 29, 2014 @ 3:09pm 
I can't solve your problem for you, but I can think along and tell you a few things on what's NOT the problem.

1. The LD_PRELOAD error is unrelated and just means the Steam overlay won't run for this game. It will give these errors for a lot of games and still run them just fine. You can disable the overlay in the game's options to get rid of those errors, if I'm not mistaken.

2. The [S_API FAIL] SteamAPI_Init() failed error is also unrelated. It's just saying that because you're not running it through Steam in that case, so it can't find the Steam API. But the game will still run regardless.

3. I compared your second output to mine (after running it in the same way), and I noticed that everything except for the last few lines are the same. So this is the relevant error:

/samba/ue3builds/MINORITY8-PC/projects/UE3_TowerOfGuns/Development/Src/../../Development/Src/Engine/Src/UnPhysLevel.cpp(1544): Assertion failed: 0 zsh: segmentation fault (core dumped) ./UDKGame-Linux

That said, for me, it outputs this instead (during that [0000.09] bit, which is a time stamp of how many seconds have passed during startup):

[0010.39] Log: Textures will NEVER stream out! Loading library: libPhysXCooking.so Result of loading library libPhysXCooking.so: 0xc056780 Loading library: PhysXUpdateLoader.so ERROR: PhysXUpdateLoader.so: cannot open shared object file: No such file or directory Result of loading library PhysXUpdateLoader.so: 0x0 Loading library: libPhysXCore.so Result of loading library libPhysXCore.so: 0xc056a00 ...Rest of log etc.

Now, this leads me to believe that the game loads something different on your system than my own relating to the physics. (I have a GT540M.) At least it seems the game tries to load something related to PhysX and stumbles on something at source level? Looks like the dev would need to look at UnPhysLevel.cpp, line 1544 to be able to tell you what's going wrong there...

The game is 32-bit, though. Do other 32-bit games run properly?
Last edited by DaVince; Nov 29, 2014 @ 3:13pm
Faugn Nov 29, 2014 @ 3:24pm 
Thanks, I know 1 and 2 are not the issue. Other 32-bits games run fine, so yeah, waiting on what the developer will say about that assert.
blankslatejoe  [developer] Dec 2, 2014 @ 6:22pm 
Hm...that's a new one for me. I'm afraid I don't have much of an answer for you, but thanks for including the logs--I can pass that along to the guys who did the Linux porting work and see if they have any ideas about what went wrong.

I'm sorry it's not running for you though--that's never a good first impression of a game! :-(
Last edited by blankslatejoe; Dec 2, 2014 @ 6:23pm
Faugn Jan 4, 2015 @ 7:21am 
Originally posted by blankslatejoe:
Hm...that's a new one for me. I'm afraid I don't have much of an answer for you, but thanks for including the logs--I can pass that along to the guys who did the Linux porting work and see if they have any ideas about what went wrong.

I'm sorry it's not running for you though--that's never a good first impression of a game! :-(

So... Any news on how I could fix that assert?
Faugn Feb 18, 2015 @ 6:10pm 
Still happening with the latest version... ;(
Faugn Mar 5, 2015 @ 3:25am 
And since I've never managed to actually run the game at least once, I can't review it to warn potential buyers... Good thing I got it cheap from a bundle.
blankslatejoe  [developer] Mar 6, 2015 @ 12:11pm 
Hm... Faugn, I was really hoping that mid Feb update would fix your issue. So far you're the only one I know who's run into the problem (though there could be some folks who have hit it and just not reported it, of course). The logs you sent didn't reveal that much, and we were crossing our fingers that the problem was due to one of the other library issues we fixed. Unfortunately, it's unlikely another Linux patch will be pushed out for a long time, as I have to go through a third party for that. Out of curiousity, have you tried the DRM-free, steamless version from Humble (since you said you got it from the bundle)?
Faugn Mar 6, 2015 @ 11:05pm 
I fixed the issue yesterday after investigating why another UDK game was not starting properly (Chivalry): https://steamcommunity.com/app/219640/discussions/0/610573751149973226/?tscn=1425571006
blankslatejoe  [developer] Mar 7, 2015 @ 6:55pm 
Awesome! I'm glad you were able to work out the resolution!
rpmcruz Aug 13, 2015 @ 2:47pm 
For those running Ubuntu 64-bit, I managed to fix it by issuing:
sudo apt-get install libxxf86vm1:i386 libglu1-mesa:i386 libopenal1:i386 libssl1.0.0:i386
notboxbot Oct 8, 2015 @ 8:49am 
In case anybody still has audio problems:

I had no sound at all (on openSUSE 13.2-x64); the game is considerably less fun without sound. :-)

What I had completely overlooked: SDL_AUDIODRIVER is set to "pulse" as a default on my system; starting the game from the command line with "SDL_AUDIODRIVER=alsa ./UDKGame-Linux" works!

Setting this globally (for all games) was out of the question, so after some googling I found this solution: in the "Tower Of Guns" properties, set the launch options to:
"SDL_AUDIODRIVER=alsa %command%" (without quotes).

(Another solution would be deleting "TowerofGuns/Binaries/Linux/lib/libSDL2-2.0.so.0", causing the game to use the Steam-supplied SDL lib instead, which IS apparently PulseAudio-aware; this might help if the PulseAudio->ALSA translation layer doesn't work).

BTW:
the top post mentions a "TowerOfGuns.sh" shell script; this doesn't exist in the current version (1.27) - apparently "UDKGame-Linux" is always called directly.
All sounds in the game , music and VFX are crackling, i can hear the sound allright, but with some cracks in it.

I'm Using ArchLinux, with native Alsa.

I hope somebody can help.
Whitechapel Jul 5, 2016 @ 5:22pm 
I'm also having crackling music ingame. Didn't find any solution for this so far.
< >
Showing 1-15 of 28 comments
Per page: 1530 50