Running game assets on macOS - TheXTech/TheXTech GitHub Wiki

Running game on macOS

Unlike other platforms like Linux and Windows, there are two ways to run the game from one of downloaded game assets packages:

  • Placing content of the game assets package into a subdirectory of ~/TheXTech/assets/ (v1.3.7+): you will be able to run the engine application in as-is form without of the necessary to modifying its content.
  • Creating a standalone Application bundle with a game using a prebuilt Application template package (an engine package that contains no resource).

Before to start

  • Download the plain executable package for macOS: (the stable or the in-development version).
  • Download one of the archives of the game assets package itself.
  • Unpack both archives by double-clicking each of them.
  • For the case if you want to make custom app bundle packages: You will need to have a proper code editor (For example, the VS Code, or Xcode). The standard "Text Editor" is UNUSABLE as it DAMAGES code files: it automatically replaces several characters to typographical analogues which just breaks source code files. That means, the "Text Editor" is just a document editor, not a code editor at all!

Using the generic runtime (v1.3.7+)

Since the version 1.3.7, you are able to run the game using the same generic executable rather than pack every single game into its own application bundle.

  • Run TheXTech.app to initialize TheXTech's user data. The engine should ask you to install assets, and exit.
  • A folder should be present at ~/TheXTech/assets/ in your Home directory. If you can't find it, look in ~/TheXTech Games/TheXTech/assets/.
  • Copy your game assets directory to ~/TheXTech/assets/<pack> (you can choose <pack>).
  • Verify that ~/TheXTech/assets/<pack>/gameinfo.ini exists. The game will look for it.
  • Run the game! If you have multiple asset packs installed, you will be prompted to pick one on game start.
  • Now, a folder should be present at ~/TheXTech/worlds/<pack-id>/ for the asset pack you installed. (<pack-id> depends on gameinfo.ini and may be different from the <pack> folder you chose.) You can install any episodes you like to this folder.

Creating a game application (pre-v1.3.7 or portable packages)

If you still want to make a convenient portable pacakge (App Bundle) rather than use the generic runtime, you can pack any selected game assets pack into the monolithic game bundle that will have an unique icon and the name of the game will be shown in the task bar and the task manager. When using an engine of versions older than 1.3.7, you will be required you to to make app bundles even you wasn't expected to do that.

  • Open the context menu over TheXTech.app bundle, and select Show Content menu item.
  • Browse inside the bundle to the Content/Resources/assets directory.
  • Move all content of the recently unpacked game assets package into the opened Content/Resources/assets directory.
  • Copy the Content/Resources/assets/graphics/ui/icon/thextech.icns file into the Content/Resources/ directory and replace the previous. This makes your bundle to get native game's icon rather than default engine's icon.
  • And now, open the Content/info.plist file via the code editor (don't use Text Editor for this purpose! if you did this mistake, you have to redownload the package or replace original file, then open via Code Editors!), find the <key>CFBundleName</key>, and then, at the line below, put the name of the game between <string> </string> tags, for example, <string>The User's Adventures</string>. This makes your bundle to show the name of the game in the task manager while running.
  • After all, rename the bundle itself into the name of the game (for example The User's Adventures.app).
  • Try to launch the bundle, it should work now.

Allowing the application to run

  • On some versions of macOS, unsigned applications are not allowed to run by default. Since TheXTech is not a commercial product we cannot afford a signing key.
  • If you are prompted to move the application to trash when you try to run it, go to Settings -> Privacy / Security. There should be an option to allow the application to run.

Extra directories

On the first launch, the next directories will be created:

  • At your home user directory (/Users/<your-username>/) the ~/TheXTech/ (generic runtime) or ~/TheXTech Games/<game name>/ (game application) directory will be created (Where the <game name> is derived from the name of the app bundle, for example, if app bundle is The User's Adventures.app, the directory will be The User's Adventures). It will have the next content:
    • worlds - initially empty directory where you can place downloaded episodes to play them using this game. If you are using the generic runtime, there will be separate subdirectories for each asset pack.
    • battle - initially empty directory where you can place downloaded battle levels to play them using this game.
    • settings - Settings of the game:
      • settings/thextech.ini - Setup of the game. You can edit it via notepad to debug game startup problems.
      • 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.
  • At the directory configured as Screenshots directory (The Desktop by default) there are next directories may appear:
    • TheXTech Game Screenshots sub-directory will appear. Here will be saved any screenshots taken via the game itself using F12 key.
    • TheXTech Game Screenshots/gif-recordings sub-directory will appear. Here will be saved any recorded GIF animations taken via the game itself using F10 key.
⚠️ **GitHub.com Fallback** ⚠️