Subgames

From Minetest Wiki
Jump to: navigation, search
Language: English  • français

Minetest subgames (also called “games”) are essentially a pre-tested collection of mods. “subgame” is a technical term; in practise, a subgame could be a game, a sandbox, a puzzle, something-in-between or something completely different. After installing Minetest, “Minetest Game” and “Minimal development test” should be available on Minetest's main menu. In certain circumstances, such as after compiling Minetest the game may not be available to play as it is not included in the Minetest engine source. If that is so, Minetest game can be downloaded from the GitHub repository. Minimal development test is used by developers and is not intended to be played. When a player starts a Minetest subgame, all the mods packaged with that game will be used. Most community made games are posted at the forum.

Contents

Installing subgames

Once a subgame has been downloaded, find game download links in the games sub-forum, it needs to be extracted or unzipped from the archive file (.zip, .tar.gz, ect.). If the extracted folder has "-master" appended to the end of the name, remove it from the name, for example “minetest_game-master” to “minetest_game”. This only happens when the game archive is downloaded from GitHub.

Subgames are installed in the games/ sub-directory of Minetest. Move the folder you extracted from the download into this directory so you have games/extracted_folder (i.e. games/minetest_game).

Below is a listing of Minetest's "in-place install" directory. In a systemwide installation some folders may be installed in other places.

games/, mods/, and textures/ are locations where community content can be installed, the folders may not be present and you need to make them yourself.

minetest/
├── bin/
├── builtin/
├── cache/
├── client/
├── doc/
├── fonts/
├── games/
│   ├── minetest_game/
│   ├── minimal/
│   └── … (installed extra games)
├── locale/
├── mods/
│   └── … (installed extra mods and modpacks)
├── textures/
│   ├── base/
│   │   └── pack/
│   └── … (installed extra texturepacks)
└── worlds/
    └── … (saved worlds, some with exclusive world mods)

You also can use the global system variable MINETEST_SUBGAME_PATH to define the games directory.

Notable subgames

Main article: List of Subgames

The following subgames are usually installed when first playing Minetest:

This is the default subgame in Minetest. It covers all the blocks and items and most other stuff you find in this wiki. Despite the name, Minetest Game is actually a sandbox, there are no goals and it cannot be “won” or “lost”.

This subgame is not intended for playing, just for testing. It is not a game. This subgame contains mods specific to testing, like the "tester tool". It also always gives items to players upon joining and uses different default textures. It only features one sound when walking on grass, no other sounds are included.

Creating subgames

Minetest subgames are in the games/ subdirectory. To create a new subgame, create a new folder in this directory which has a name without spaces (use "_" in place of a space if you want). Within this folder create two more folders and two files.

  • The mods/ folder is where the subgame's mods, the actual content, will go.
  • The menu/ folder holds some details needed by Minetest's main menu.
  • The game.conf file is used to define the subgame's name which is displayed in the Minetest main menu. Open this file with a text editor and add a single line: "name = your subgame's name here"
  • Optionally you can add a minetest.conf file which allows you to set the options Minetest will use. This file can override a number of default options.

Any other files and folders are ignored by Minetest. It is suggested that at least a readme.txt should be added to describe the subgame and give its author(s) and version.

Menu folder

The menu folder allows you to provide images that will be used on the main menu.

  • background.png, if present, will be used as a background replacing the default clouds animation. This image will be re-sized to fully fill the Minetest window.
  • header.png, if present, will show the header image, usually some stylized text, in-front of the background.
  • icon.png is a 48² pixels image that will be used in the game selection list to identify the game.

Mods folder

Any mods and mod packs needed by the game should be added to this folder. Make sure each mod's dependencies are met or the game will crash.

Minetest will look for texture files with specific names. If these are not found in any of the mod texture folders, an error will be raised and dummy images will be created.

  • crack_anylength.png
  • heart.png
  • player.png
  • player_back.png

Details of file and folder structures within a subgame

This example has the default subgames Minetest Game (directory name “minetest_game”) and Minimal development test (directory name “minimal”) installed and shows a possible structure of an own subgame in “my_game”:

    games/
    ├── minetest_game/
    │   ├── game.conf
    │   ├── README.txt
    │   ├── menu/
    │   │   ├── header.png
    │   │   └── icon.png
    │   └── mods/
    │       ├── some_mod
    │       ├── some_other_mod 
    │       └── …
    ├── minimal/
    │   ├── game.conf
    │   ├── menu/
    │   │   ├── background.png
    │   │   ├── icon.png
    │   │   └── …
    │   └── mods/
    │       ├── some_mod
    │       ├── some_other_mod
    │       └── …
    ├── my_game/
    │   ├── game.conf
    │   ├── minetest.conf
    │   ├── README.txt
    │   ├── LICENSE.txt
    │   ├── menu/
    │   │   ├── background.png
    │   │   ├── footer.png
    │   │   ├── header.png
    │   │   ├── icon.png
    │   │   ├── overlay.png
    │   │   └── …
    │   └── mods/
    │       ├── LICENSE.txt
    │       ├── some_mod
    │       ├── some_other_mod
    │       └── …
    └── some more subgames