Difference between revisions of "Subgames"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Add to Misc category)
(Redirected page to Games)
 
Line 1: Line 1:
In [https://wiki.minetest.net/Minetest Minetest], “'''subgame'''” is basically just a fancy term for “game”, but it does not have to be. It is intended to be a complete gameplay experience which you can run in Minetest. It is not a [[mod]], but an independent game. Each subgame is different, sometimes even wildly different. As Minetest is a game engine, the support for subgames is one of '''the''' core features of Minetest.
+
#REDIRECT [[Games]]
 
 
This page focuses on subgame information for developers. For more general information about subgames, go to [https://wiki.minetest.net/Subgames].
 
 
 
== 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 [https://wiki.minetest.net/Minetest.conf 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.
 
* <code>background.png</code>, 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.
 
* <code>header.png</code>, if present, will show the header image, usually some stylized text, in-front of the background.
 
* <code>icon.png</code> is a 48×48 pixels image that will be used in the game selection list to identify the game.
 
 
 
=== Mods folder ===
 
 
 
Any [https://wiki.minetest.net/Mods 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.
 
* <code>crack_anylength.png</code>
 
* <code>heart.png</code>
 
* <code>player.png</code>
 
* <code>player_back.png</code>
 
 
 
=== 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”:
 
<pre>
 
    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
 
</pre>
 
 
 
[[Category:Misc]]
 

Latest revision as of 16:15, 12 March 2018

Redirect to: