Running game assets on Linux or xBSD - TheXTech/TheXTech GitHub Wiki
To run any game on UNIX-like systems like Linux or any xBSD (FreeBSD, OpenBSD, NetBSD, etc.), there are two ways:
- For Linux distributions for i386 and x86_64 architectures, there are prebuild packages available: you need to mix content of two archives in the same directory: the plain engine package for Linux, and the game assets package. In result, you will get a fully portable copy of the game that you can put on your USB stick and take between different computers with the similar environment.
- For Linux environments for architectures like ARM/MIPS/PowerPC/etc., for FreeBSD/NetBSD/OpenBSD, etc., you will need to build the game executable from the source code using this instruction and once you reach the "Running and debugging a build" paragraph, stop.
-
You will need to have a 7zip module to unpack 7-zip archives (
p7zip
and/orp7zip-full
packages), however, there is a high chance that your default archive manager will support 7z archives by default without of any other actions. - Download the archive of the game engine itself: you will need to download the Plain runtime edition (the stable, or the in-development version). Depending on your processor and type of opeating system, you should download the build compatible with your processor. If there is no available prebuild pacakges for your system, do build the engine from the source code using this instruction and once you reach the "Running and debugging a build" paragraph, stop.
- Download one of the archives of the game assets package itself.
This installation will store everything in a game directory that can be moved between computers. It is compatible with the plain binary builds distributed as TAR packages.
- Create an empty directory at any convenient place (for example,
/home/<your-user>/TheXTech/<Name of game>/
, later refered as game directory). - Unpack content of the game assets archive into the game directory.
- Now, you need to put the
thextech
executable file depending on the obtaining way:- If you use a prebuilt package, open the engine archive and unpack all content of the
thextech-bin
sub-directory inside the archive into the game directory. It's possible that some text files may conflict: you can easily rename them. - If you built an engine from the source code by yourself, take the
thextech
file theoutput/bin
sub-directory at your CMake build directory, and put into the game directory.
- If you use a prebuilt package, open the engine archive and unpack all content of the
- Once all stuff is ready, to start the game, run the
./thextech
executable. - You can create a desktop shortcut or open any compatible LVL, LVLX, WLD, or WLDX files via the game executable (Use the "Open with..." menu, or drag and dropping the file to the desktop shortcut (it should contain the
%f
marker after the path to executable) to play them directly. - As an icon, you can use any PNG file from the
graphics/ui/icon
sub-directory at the game directory.
During use of the game, there are next directories will be created:
- logs - Debug logs of the game. Once you get any troubles with the game, please attach one of these log files to the bug report.
-
screenshots - Screenshots taken via the game itself using
F12
key. -
gif-recordings - Recorded GIF animations via the game itself using
F11
key. -
settings - Settings of the game:
- settings/thextech.ini - Setup of the game. You can edit it via notepad to enable or disable some features including the Discord Rich Presence support.
- settings/controls.ini - Setup of game controls: all key bindings and game controller buttons setup were saved here.
-
settings/gamesaves - The storage of game saves: all saved games appears here. However, if you moved an old episode with game save files presented (such as
save1.sav
,save2.sav
,save3.sav
), they will be imported by the game, however, updated gamesaves will appear at the new storage at the settings/gamesave directory, keeping the episode directory clear.
- gameplay-records - Recorded gameplays demos: when you enable the recording of gameplay in the settings, every attempt to play a level will create a new replay file that you can open by the game and see the full playthrough. In some cases, these replays can help to reproduce various bugs that happen very rare.
This installation will store everything in a user directory at ~/.local/share/TheXTech/
. It is compatible with all build types.
- First, obtain an executable:
- By installing a DEB or Flatpak package
- By using the
thextech
executable file from an engine archive - By building the engine and taking the
thextech
executable file from theoutput/bin/
subdirectory of your CMake build directory.
- If you are using a plain executable file, you may optionally install it to
/usr/local/bin/
or~/.local/bin/
for convenience.
- Run the
thextech
executable to prepare your user directories. It should ask you to install an asset pack and exit. - Confirm that
~/.local/share/TheXTech/assets/
exists. (If you have an older TheXTech installation present, this may be located at~/.PGE_Project/thextech/assets/
.) - Unpack the content of the game assets archive into a
~/.local/share/TheXTech/assets/<pack>/
directory (you can choose<pack>
here) - Verify that
~/.local/share/TheXTech/assets/<pack>/gameinfo.ini
exists. The game will look for it. - Run the
thextech
executable again. It should successfully boot to the game menu with the default episodes included in your asset pack. - After first launch, there should exist a
~/.local/share/TheXTech/worlds/
directory with a subdirectory for every asset pack. (The subdirectory is determined bygameinfo.ini
and may be different from your original<pack>
.) - You may put any compatible episodes you have in
~/.local/share/TheXTech/worlds/<pack-id>/
for each installed asset pack. (All episodes made for an original SMBX 1.3 and earlier will work in~/.local/share/TheXTech/worlds/smbx/
.) Optionally you can put any battle levels in the "battle" folder for your asset pack (~/.local/share/TheXTech/battle/<pack-id>/
), for battle arena purposes.
- Enjoy the game! You can choose which asset pack to play on game boot, or by specifying an asset pack at the command line with
thextech -c <pack-id> content.lvlx
(egthextech -c aod level1.lvlx
). - You can create a desktop shortcut or open any compatible LVL, LVLX, WLD, or WLDX files via the game executable (Use the "Open with..." menu, or drag and dropping the file to the desktop shortcut (it should contain the
%f
marker after the path to executable) to play them directly. - As an icon, you can use any PNG file from the
graphics/ui/icon
sub-directory at the game directory.
During use of the game, there are next directories will be created:
- logs - Debug logs of the game. Once you get any troubles with the game, please attach one of these log files to the bug report.
-
screenshots - Screenshots taken via the game itself using
F12
key. These are separated by asset pack. -
gif-recordings - Recorded GIF animations via the game itself using
F11
key. These are separated by asset pack. -
settings - Settings of the game:
- settings/thextech.ini - Setup of the game. You can edit it via notepad to debug issues launching the game.
- settings/controls.ini - Setup of game controls: all key bindings and game controller buttons setup were saved here.
-
settings/gamesaves - The storage of game saves: all saved games appears here. However, if you moved an old episode with game save files presented (such as
save1.sav
,save2.sav
,save3.sav
), they will be imported by the game, however, updated gamesaves will appear at the new storage at the settings/gamesave directory, keeping the episode directory clear.
- gameplay-records - Recorded gameplays demos: when you enable the recording of gameplay in the settings, every attempt to play a level will create a new replay file that you can open by the game and see the full playthrough. In some cases, these replays can help to reproduce various bugs that happen very rare. These are separated by asset pack.
- assets - This is a directory for you to install new asset packs to.
- worlds - This is a directory for you to install new episodes to. They are separated by asset pack.
- battle - This is a directory for you to install new battle levels to. They are separated by asset pack.