Difference between revisions of "Games"

From Minetest Developer Wiki
Jump to navigation Jump to search
(Replaced content with "{{UnofficialLua}} See https://wiki.minetest.net/Games#Making_a_game Category:Misc")
Tag: Replaced
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Games are intended to be a complete gameplay experience which you can run in Minetest. It is not a [[Mods|mod]], but an independent game. Each game is different, sometimes even wildly different. As Minetest is a game engine, the support for games is one of '''the''' core features of Minetest.
+
{{UnofficialLua}}
  
This page focuses on game information for developers. For more general information about games, go to [https://wiki.minetest.net/Games].
+
See https://wiki.minetest.net/Games#Making_a_game
 
 
== Creating games ==
 
Minetest games are in the ''games/'' subdirectory. To create a new game, 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 game'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 game's name which is displayed in the Minetest main menu. Open this file with a text editor and add a single line: "name = your game'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 game 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 game ===
 
 
 
This example has the default games Minetest Game (directory name “minetest_game”) and Minimal development test (directory name “minimal”) installed and shows a possible structure of an own game 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 games
 
</pre>
 
  
 
[[Category:Misc]]
 
[[Category:Misc]]

Latest revision as of 19:55, 24 October 2022

Mbox warning.png This page contains unofficial, low-quality Lua API documentation and is likely to be outdated or wrong. Do not rely on it!
For the official and up-to-date documentation, see Lua API Documentation.
Mbox warning.png This page has been proposed for deletion for the following reason: "Contains unofficial and potentially outdated, redundant and inconsistent Lua API information"
If you don't think that this page should be deleted, please explain why on the talk page.

See https://wiki.minetest.net/Games#Making_a_game