Difference between revisions of "Overgrowth Linux"

From Wolfire Games Wiki
Jump to: navigation, search
m (The game mysteriously segfaults when playing (in particular, between matches in arena mode))
 
(18 intermediate revisions by 5 users not shown)
Line 2: Line 2:
  
 
=Installer=
 
=Installer=
 +
 +
''We currently don't ship an installer anymore, but we intend to do this in the future.''
 +
 
The Linux installer is a Bash script which loads a graphical installer. The shebang points to ''/bin/sh'', but it will not work with every shell.
 
The Linux installer is a Bash script which loads a graphical installer. The shebang points to ''/bin/sh'', but it will not work with every shell.
  
Line 19: Line 22:
 
===Libraries===
 
===Libraries===
 
<pre># apt-get install libfreeimage3
 
<pre># apt-get install libfreeimage3
# apt-get install libalut0</pre>
+
# apt-get install libalut0
 +
# apt-get install libsdl-net1.2
 +
</pre>
 +
 
 +
===64-bit systems===
 +
''The following is no longer necessary as we build and deliver a 64 bit binary package, but is still necessary if you wish to run the 32 bit version.''
 +
 
 +
Overgrowth tries to access the 32-bit (i386) version of many libraries whose 64-bit version (amd64) might already be installed in your system. In order to install the 32-bit version of these libraries, append '':i386'' at the end of the package name when using apt-get. For example, when running Overgrowth Alpha 208 on a 64-bit Ubuntu 14.04, the following 32-bit libraries must be installed, despite its 64-bit versions already being installed:
 +
<pre>sudo apt-get install libgconf2-4:i386 libnss3:i386 libgtk2.0-0:i386 libglu1-mesa:i386 libxft2:i386</pre>
  
 
==Gentoo==
 
==Gentoo==
Line 28: Line 39:
 
# emerge -av media-libs/freeimage
 
# emerge -av media-libs/freeimage
 
# emerge -av media-libs/freealut
 
# emerge -av media-libs/freealut
# emerge -av media-libs/libpng:1.2</pre>
+
# emerge -av media-libs/libpng:1.2
 +
# emerge -av media-libs/libsdl-net:1.2
 +
</pre>
  
 
===Groups===
 
===Groups===
Line 46: Line 59:
 
# eselect java-vm user set 1
 
# eselect java-vm user set 1
 
</pre>
 
</pre>
 +
 +
==Arch==
 +
You can install the package [https://aur.archlinux.org/packages/overgrowth/ overgrowth] from the AUR.
 +
===Libraries===
 +
If you install the AUR package all required libraries should be pulled in automatically. If you install Overgrowth manually, using SUMLauncher or using Steam you will need to acquire the dependencies manually. The following should provide a good starting point:
 +
<pre># pacman -S --needed freeimage freealut sdl sdl2_net</pre>
 +
 +
===SUMLauncher===
 +
You can install the package [https://aur.archlinux.org/packages/sumlauncher/ sumlauncher] from the AUR.
  
 
=Problems and solutions=
 
=Problems and solutions=
 
Overgrowth currently has many severe bugs and issues on Linux. Luckily, there are fixes or workarounds for most of them. The below specifically assumes a199, so please upgrade before trying the suggestions here.
 
Overgrowth currently has many severe bugs and issues on Linux. Luckily, there are fixes or workarounds for most of them. The below specifically assumes a199, so please upgrade before trying the suggestions here.
  
==Game freezes on loading in full-screen mode==
+
==Errors about GLSL appear, mentioning GLSL versions.==
Sometimes, Overgrowth freezes when loading a map, or when starting the game itself, in full-screen mode.  This is because when an error popup appears, it is covered by the fullscreen window and so it can't be closed.  Switch Overgrowth to windowed mode (e.g. using SUMLauncher), find the error message, then fix that.
 
  
==Annoying Intel error popup makes Overgrowth unusable in fullscreen mode==
+
This is another one that happens with Intel graphics on LinuxAdd #version 130 to the tops of all files that end with .vert or .frag, but ''not'' any of the files that end with .glsl, in the Overgrowth/Data/GLSL directoryIf you install mods that provide new shaders you may need to fix them as well.
Overgrowth currently gives a popup whenever it is launched with Intel graphics.  This might be OK, except first of all, this popup cannot be turned off, and second, due to the first issue, it makes fullscreen unusableMany Overgrowth maps also work just fine with Intel graphics, making this unnecessary.
 
  
There does not seem to be any non-hacky workaround for this.  Luckily, there is a relatively simple hacky workaround: simply open up the binary (Overgrowth.bin.x86 or Overgrowth.bin.x86_64) in a text editor that can safely edit binaries (such as vim), find the word "intel" (NOT contained in the word "intelligence"), and replace it with some other 5-letter word like "antel".
+
You can use BASH code:
  
==Errors about GLSL appear, mentioning GLSL versions.==
+
<pre>
 
+
# cd to your Overgrowth/Data/GLSL
This is another one that happens with Intel graphics on Linux.  Add #version 130 to the tops of all files that end with .vert or .frag, but ''not'' any of the files that end with .glsl, in the Overgrowth/Data/GLSL directory.  Gnurdux's fixes includes this for all the built-in GLSL shaders; if you install mods that provide new shaders you may need to fix them as well.
+
cd /usr/local/games/Overgrowth/Data/GLSL
 +
# adds #version 130 to files
 +
for f in $(ls *.vert *.frag); do echo -e "#version 130\n$(cat $f)" > $f; done
 +
</pre>
  
 
==Textures are missing.  Loading screen shows a white box and the game appears in black and white==
 
==Textures are missing.  Loading screen shows a white box and the game appears in black and white==
Line 68: Line 91:
 
S3TC <your distro here>
 
S3TC <your distro here>
  
==An error message pops up when loading the arena==
+
Also, you may need to start with "LC_ALL=en_US" parameter e.g.:
 
+
<pre>LC_ALL=en_US ./Overgrowth.bin.x86_64 </pre>
Open up the file Overgrowth/Data/Scripts/test_custom_level.as. Somewhere it refers to DogBroadsword when it should say DogBroadSword (with a capital S). Fix this.
 
 
 
==The game crashes when loading the arena==
 
 
 
There are at least two issues that can cause this.
 
Bug #1 solution: Open up Overgrowth/Data/Scripts/test_custom_level.as. There should be 3 occurrences of the word MetaEventType. Replace all but the first with the word int.
 
 
 
Bug #2: The game crashes when the function GetRotation is called.
 
Fix #1: Comment out (add // to the beginning of) the line that calls GetRotation. This may affect gameplay somewhat, although it doesn't seem too bad.
 
Fix #2: The cause of this bug is that David tells AngelScript that quaternions have no copy copy constructor, even though they do. This can be fixed by changing one byte in a function argument by editing the binary (e.g. in a hex editor). For 64-bit (and I think this bug only happens on 64-bit) find the byte at offset 0x3D56C3. This should be 0B. Replace it with 1B. This is a correct fix, and I think should make gameplay the same as on other OSes.
 
  
==The game mysteriously segfaults when playing (in particular, between matches in arena mode)==
+
==Could not find "Data" folder==
This likely has something to do with OpenAL.  I was able to fix this by custom-compiling OpenAL with a manual change in the source code. Please find Gnurdux on IRC if you want to try this yourself. Hopefully David will fix this pretty soon.
 
  
[[Category: Overgrowth]]
+
Unlike Windows systems, Unix-based systems are mostly case-sensitive in its directory paths. This reflects when, after starting Overgrowth, the system tries to find a "Data" folder, when the folder that is provided is actually called "data", without the capital D. Changing the lowercase D to uppercase should fix this issue.

Latest revision as of 05:21, 28 October 2017

The Linux version of Overgrowth has different dependencies which need to be fulfilled, otherwise the game won't run. Those dependencies can vary from distribution to distribution.

Installer

We currently don't ship an installer anymore, but we intend to do this in the future.

The Linux installer is a Bash script which loads a graphical installer. The shebang points to /bin/sh, but it will not work with every shell.

# readlink -f /bin/sh
/bin/bash

If the installer won't load and /bin/sh doesn't point to bash try to force using bash.

# bash overgrowth-xxx-linux.sh

root rights are not necessarily required to install Overgrowth. If you only have a single user on your system (that wants to play Overgrowth) it is not a bad idea to install it to your home directory, because then you do not have to start SUMLauncher as root user.

Distributions

Debian

This also includes Ubuntu, Mint etc.

Libraries

# apt-get install libfreeimage3
# apt-get install libalut0
# apt-get install libsdl-net1.2

64-bit systems

The following is no longer necessary as we build and deliver a 64 bit binary package, but is still necessary if you wish to run the 32 bit version.

Overgrowth tries to access the 32-bit (i386) version of many libraries whose 64-bit version (amd64) might already be installed in your system. In order to install the 32-bit version of these libraries, append :i386 at the end of the package name when using apt-get. For example, when running Overgrowth Alpha 208 on a 64-bit Ubuntu 14.04, the following 32-bit libraries must be installed, despite its 64-bit versions already being installed:

sudo apt-get install libgconf2-4:i386 libnss3:i386 libgtk2.0-0:i386 libglu1-mesa:i386 libxft2:i386

Gentoo

Libraries

Overgrowth needs different libraries in order to work. This list might not be complete.

# emerge -av gnome-base/gconf
# emerge -av media-libs/freeimage
# emerge -av media-libs/freealut
# emerge -av media-libs/libpng:1.2
# emerge -av media-libs/libsdl-net:1.2

Groups

If your user is not already in this groups you have to add him. Otherwise the game may not start and it is even possible that X will completely crash.

# gpasswd -a your_user audio
# gpasswd -a your_user video

SUMLauncher

SUMLauncher does not work with dev-java/sun-jdk, you will need dev-java/icedtea-bin to use it.

# emerge -av dev-java/icedtea-bin
# eselect java-vm list
Available Java Virtual Machines:
  [1]   icedtea-bin-6 
  [2]   sun-jre-bin-1.6  system-vm
# eselect java-vm user set 1

Arch

You can install the package overgrowth from the AUR.

Libraries

If you install the AUR package all required libraries should be pulled in automatically. If you install Overgrowth manually, using SUMLauncher or using Steam you will need to acquire the dependencies manually. The following should provide a good starting point:

# pacman -S --needed freeimage freealut sdl sdl2_net

SUMLauncher

You can install the package sumlauncher from the AUR.

Problems and solutions

Overgrowth currently has many severe bugs and issues on Linux. Luckily, there are fixes or workarounds for most of them. The below specifically assumes a199, so please upgrade before trying the suggestions here.

Errors about GLSL appear, mentioning GLSL versions.

This is another one that happens with Intel graphics on Linux. Add #version 130 to the tops of all files that end with .vert or .frag, but not any of the files that end with .glsl, in the Overgrowth/Data/GLSL directory. If you install mods that provide new shaders you may need to fix them as well.

You can use BASH code:

# cd to your Overgrowth/Data/GLSL
cd /usr/local/games/Overgrowth/Data/GLSL
# adds #version 130 to files
for f in $(ls *.vert *.frag); do echo -e "#version 130\n$(cat $f)" > $f; done

Textures are missing. Loading screen shows a white box and the game appears in black and white

Overgrowth requires S3TC texture support, which is not enabled by default in open source graphics drivers. If you have this issue, you need to set up S3TC texture support. You can probably find out how by googling

S3TC <your distro here>

Also, you may need to start with "LC_ALL=en_US" parameter e.g.:

LC_ALL=en_US ./Overgrowth.bin.x86_64 

Could not find "Data" folder

Unlike Windows systems, Unix-based systems are mostly case-sensitive in its directory paths. This reflects when, after starting Overgrowth, the system tries to find a "Data" folder, when the folder that is provided is actually called "data", without the capital D. Changing the lowercase D to uppercase should fix this issue.