It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Jupiter Hell on Linux appears to writes files into the same directory as the binary, I think actually it might be writing to the current directory but the game doesn't launch unless you are in the game directory so it's moot.

At any rate, it would be much nicer IMO if the game would save runtime data into one of the standard places for Linux. This would be a directory like ~/.config/jupiter-hell or ~/.jupiter-hell.

This would make it easier to backup scores and saves, because it is typical to backup this directory while you don't typically have a good way to search all over the filesystem for your data. It would also allow the game to be installed systemwide outside of your home directory, without needing to make the game directory world readable.

I hope you can make this change, though I get it is lower priority. If you are concerned about backwards compatibility you could make it opt-in, for example via a configuration file in the game directory.
edit: see their response to my original report on this issue as well.

I don't like this sort of thing, either (I install all my games owned by root:games in /usr/local/games w/ no world and only read group access), but it's a common enough practice and there are common ways to work around it. For example, there's ./play.it, which uses symbolic links so that the only files in the game directory are the ones written by the game (but I have no idea how to use the new forge site, so I can't help there -- I can't even find out if Jupiter Hell is supported, or how to download scripts for supported games). I personally use unionfs (a FUSE filesystem), and have integrated such support into my game wrapper script (https://bitbucket.org/darktjm/gamesup/), so all I have to do is replace "dogame <game exe>" with "dogame -c -w <game exe>" to work around this; this is my current launch script:

#!/bin/sh
dir=/usr/local/games/Jupiter\ Hell/game
export LD_LIBRARY_PATH="/usr/lib64:$dir"
exec dogame -c -w "$dir"/jh --vk

The unionfs method requires 3 directories: the one the game was installed to, the one the game writes saves, logs, etc to, and the one you play from. for example, let's say you set variables i, w, p to those dirs, respectively:

mkdir -p "$w" "$p"
unionfs -o cow,uid=$(uid -u) "$w=RW:$i=RO" "$p"
cd "$p"
<run the game from here>
fusermount -u "$p"

Then, "$w" will be the only directory you need to back up. The specific unionfs I'm using is from gentoo's sys-fs/unionfs-fuse package, or https://github.com/rpodgorny/unionfs-fuse.
Post edited August 15, 2021 by darktjm
Thanks for the workaround ideas. I'll try the fuse unionfs one out, seems better than my current method using unshare which requires root to start.

If the devs are lurking, this is a problem on Windows as well, it isn't a Linux issue. The only real difference is where the files should go: %appdata% vs $XDG_CONFIG_HOME.
There is the JH_PREF_PATH environment variable that you can use.

Note: this *must* end with a trailing slash, otherwise it will save this as ~/.config/jhellconfiguration.lua, and this directory *must* exist or it will segfault.

Here is the run_jh.sh that I use:

#!/bin/sh
mkdir -p ~/.config/jhell
LD_LIBRARY_PATH=. JH_PREF_PATH=$HOME/.config/jhell/ ./jh --vk

You can move the existing files with:

mv configuration.lua default.rec log.txt mortem.txt player.dat score.dat save ~/.config/jhell/

I'm not sure if this is documented anywhere; I found this by accident while reverse engineering some stuff to figure out the game logic. It seems to work well though.
Post edited August 30, 2021 by arp242
avatar
arp242: There is the JH_PREF_PATH environment variable that you can use.
Awesome, this makes it so much easier!