Minetest is an open source voxel game engine with easy modding and game creation

Overview

Minetest

Build Status Translation status License

Minetest is a free open-source voxel game engine with easy modding and game creation.

Copyright (C) 2010-2020 Perttu Ahola [email protected] and contributors (see source file comments and the version control log)

In case you downloaded the source code

If you downloaded the Minetest Engine source code in which this file is contained, you probably want to download the Minetest Game project too. See its README.txt for more information.

Table of Contents

  1. Further Documentation
  2. Default Controls
  3. Paths
  4. Configuration File
  5. Command-line Options
  6. Compiling
  7. Docker
  8. Version Scheme

Further documentation

Default controls

All controls are re-bindable using settings. Some can be changed in the key config dialog in the settings tab.

Button Action
Move mouse Look around
W, A, S, D Move
Space Jump/move up
Shift Sneak/move down
Q Drop itemstack
Shift + Q Drop single item
Left mouse button Dig/punch/take item
Right mouse button Place/use
Shift + right mouse button Build (without using)
I Inventory menu
Mouse wheel Select item
0-9 Select item
Z Zoom (needs zoom privilege)
T Chat
/ Command
Esc Pause menu/abort/exit (pauses only singleplayer game)
R Enable/disable full range view
+ Increase view range
- Decrease view range
K Enable/disable fly mode (needs fly privilege)
P Enable/disable pitch move mode
J Enable/disable fast mode (needs fast privilege)
H Enable/disable noclip mode (needs noclip privilege)
E Aux1 (Move fast in fast mode. Games may add special features)
C Cycle through camera modes
V Cycle through minimap modes
Shift + V Change minimap orientation
F1 Hide/show HUD
F2 Hide/show chat
F3 Disable/enable fog
F4 Disable/enable camera update (Mapblocks are not updated anymore when disabled, disabled in release builds)
F5 Cycle through debug information screens
F6 Cycle through profiler info screens
F10 Show/hide console
F12 Take screenshot

Paths

Locations:

  • bin - Compiled binaries
  • share - Distributed read-only data
  • user - User-created modifiable data

Where each location is on each platform:

  • Windows .zip / RUN_IN_PLACE source:
    • bin = bin
    • share = .
    • user = .
  • Windows installed:
    • bin = C:\Program Files\Minetest\bin (Depends on the install location)
    • share = C:\Program Files\Minetest (Depends on the install location)
    • user = %APPDATA%\Minetest
  • Linux installed:
    • bin = /usr/bin
    • share = /usr/share/minetest
    • user = ~/.minetest
  • macOS:
    • bin = Contents/MacOS
    • share = Contents/Resources
    • user = Contents/User OR ~/Library/Application Support/minetest

Worlds can be found as separate folders in: user/worlds/

Configuration file

  • Default location: user/minetest.conf
  • This file is created by closing Minetest for the first time.
  • A specific file can be specified on the command line: --config <path-to-file>
  • A run-in-place build will look for the configuration file in location_of_exe/../minetest.conf and also location_of_exe/../../minetest.conf

Command-line options

  • Use --help

Compiling

Compiling on GNU/Linux

Dependencies

Dependency Version Commentary
GCC 5.1+ or Clang 3.5+
CMake 3.5+
IrrlichtMt - Custom version of Irrlicht, see https://github.com/minetest/irrlicht
Freetype 2.0+
SQLite3 3+
Zstd 1.0+
LuaJIT 2.0+ Bundled Lua 5.1 is used if not present
GMP 5.0.0+ Bundled mini-GMP is used if not present
JsonCPP 1.0.0+ Bundled JsonCPP is used if not present

For Debian/Ubuntu users:

sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev

For Fedora users:

sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel libzstd-devel

For Arch users:

sudo pacman -S base-devel libcurl-gnutls cmake libxxf86vm libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses zstd

For Alpine users:

sudo apk add build-base cmake libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev zstd-dev

Download

You can install Git for easily keeping your copy up to date. If you don’t want Git, read below on how to get the source without Git. This is an example for installing Git on Debian/Ubuntu:

sudo apt install git

For Fedora users:

sudo dnf install git

Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:

git clone --depth 1 https://github.com/minetest/minetest.git
cd minetest

Download minetest_game (otherwise only the "Development Test" game is available) using Git:

git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game

Download IrrlichtMt to lib/irrlichtmt, it will be used to satisfy the IrrlichtMt dependency that way:

git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt

Download source, without using Git:

wget https://github.com/minetest/minetest/archive/master.tar.gz
tar xf master.tar.gz
cd minetest-master

Download minetest_game, without using Git:

cd games/
wget https://github.com/minetest/minetest_game/archive/master.tar.gz
tar xf master.tar.gz
mv minetest_game-master minetest_game
cd ..

Download IrrlichtMt, without using Git:

cd lib/
wget https://github.com/minetest/irrlicht/archive/master.tar.gz
tar xf master.tar.gz
mv irrlicht-master irrlichtmt
cd ..

Build

Build a version that runs directly from the source directory:

cmake . -DRUN_IN_PLACE=TRUE
make -j$(nproc)

Run it:

./bin/minetest
  • Use cmake . -LH to see all CMake options and their current state.

  • If you want to install it system-wide (or are making a distribution package), you will want to use -DRUN_IN_PLACE=FALSE.

  • You can build a bare server by specifying -DBUILD_SERVER=TRUE.

  • You can disable the client build by specifying -DBUILD_CLIENT=FALSE.

  • You can select between Release and Debug build by -DCMAKE_BUILD_TYPE=<Debug or Release>.

    • Debug build is slower, but gives much more useful output in a debugger.
  • If you build a bare server you don't need to have the Irrlicht or IrrlichtMt library installed.

    • In that case use -DIRRLICHT_INCLUDE_DIR=/some/where/irrlicht/include.
  • Minetest will use the IrrlichtMt package that is found first, given by the following order:

    1. Specified IRRLICHTMT_BUILD_DIR CMake variable
    2. ${PROJECT_SOURCE_DIR}/lib/irrlichtmt (if existent)
    3. Installation of IrrlichtMt in the system-specific library paths
    4. For server builds with disabled BUILD_CLIENT variable, the headers from IRRLICHT_INCLUDE_DIR will be used.
    • NOTE: Changing the IrrlichtMt build directory (includes system installs) requires regenerating the CMake cache (rm CMakeCache.txt)

CMake options

General options and their default values:

BUILD_CLIENT=TRUE          - Build Minetest client
BUILD_SERVER=FALSE         - Build Minetest server
BUILD_UNITTESTS=TRUE       - Build unittest sources
CMAKE_BUILD_TYPE=Release   - Type of build (Release vs. Debug)
    Release                - Release build
    Debug                  - Debug build
    SemiDebug              - Partially optimized debug build
    RelWithDebInfo         - Release build with debug information
    MinSizeRel             - Release build with -Os passed to compiler to make executable as small as possible
ENABLE_CURL=ON             - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
ENABLE_CURSES=ON           - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
ENABLE_GETTEXT=ON          - Build with Gettext; Allows using translations
ENABLE_GLES=OFF            - Build for OpenGL ES instead of OpenGL (requires support by IrrlichtMt)
ENABLE_LEVELDB=ON          - Build with LevelDB; Enables use of LevelDB map backend
ENABLE_POSTGRESQL=ON       - Build with libpq; Enables use of PostgreSQL map backend (PostgreSQL 9.5 or greater recommended)
ENABLE_REDIS=ON            - Build with libhiredis; Enables use of Redis map backend
ENABLE_SPATIAL=ON          - Build with LibSpatial; Speeds up AreaStores
ENABLE_SOUND=ON            - Build with OpenAL, libogg & libvorbis; in-game sounds
ENABLE_LUAJIT=ON           - Build with LuaJIT (much faster than non-JIT Lua)
ENABLE_PROMETHEUS=OFF      - Build with Prometheus metrics exporter (listens on tcp/30000 by default)
ENABLE_SYSTEM_GMP=ON       - Use GMP from system (much faster than bundled mini-gmp)
ENABLE_SYSTEM_JSONCPP=ON   - Use JsonCPP from system
OPENGL_GL_PREFERENCE=LEGACY - Linux client build only; See CMake Policy CMP0072 for reference
RUN_IN_PLACE=FALSE         - Create a portable install (worlds, settings etc. in current directory)
USE_GPROF=FALSE            - Enable profiling using GProf
VERSION_EXTRA=             - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
ENABLE_TOUCH=FALSE         - Enable Touchscreen support (requires support by IrrlichtMt)

Library specific options:

CURL_DLL                        - Only if building with cURL on Windows; path to libcurl.dll
CURL_INCLUDE_DIR                - Only if building with cURL; directory where curl.h is located
CURL_LIBRARY                    - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib
EGL_INCLUDE_DIR                 - Only if building with GLES; directory that contains egl.h
EGL_LIBRARY                     - Only if building with GLES; path to libEGL.a/libEGL.so
EXTRA_DLL                       - Only on Windows; optional paths to additional DLLs that should be packaged
FREETYPE_INCLUDE_DIR_freetype2  - Directory that contains files such as ftimage.h
FREETYPE_INCLUDE_DIR_ft2build   - Directory that contains ft2build.h
FREETYPE_LIBRARY                - Path to libfreetype.a/libfreetype.so/freetype.lib
FREETYPE_DLL                    - Only on Windows; path to libfreetype-6.dll
GETTEXT_DLL                     - Only when building with gettext on Windows; paths to libintl + libiconv DLLs
GETTEXT_INCLUDE_DIR             - Only when building with gettext; directory that contains iconv.h
GETTEXT_LIBRARY                 - Only when building with gettext on Windows; path to libintl.dll.a
GETTEXT_MSGFMT                  - Only when building with gettext; path to msgfmt/msgfmt.exe
IRRLICHT_DLL                    - Only on Windows; path to IrrlichtMt.dll
IRRLICHT_INCLUDE_DIR            - Directory that contains IrrCompileConfig.h (usable for server build only)
LEVELDB_INCLUDE_DIR             - Only when building with LevelDB; directory that contains db.h
LEVELDB_LIBRARY                 - Only when building with LevelDB; path to libleveldb.a/libleveldb.so/libleveldb.dll.a
LEVELDB_DLL                     - Only when building with LevelDB on Windows; path to libleveldb.dll
PostgreSQL_INCLUDE_DIR          - Only when building with PostgreSQL; directory that contains libpq-fe.h
PostgreSQL_LIBRARY              - Only when building with PostgreSQL; path to libpq.a/libpq.so/libpq.lib
REDIS_INCLUDE_DIR               - Only when building with Redis; directory that contains hiredis.h
REDIS_LIBRARY                   - Only when building with Redis; path to libhiredis.a/libhiredis.so
SPATIAL_INCLUDE_DIR             - Only when building with LibSpatial; directory that contains spatialindex/SpatialIndex.h
SPATIAL_LIBRARY                 - Only when building with LibSpatial; path to libspatialindex_c.so/spatialindex-32.lib
LUA_INCLUDE_DIR                 - Only if you want to use LuaJIT; directory where luajit.h is located
LUA_LIBRARY                     - Only if you want to use LuaJIT; path to libluajit.a/libluajit.so
OGG_DLL                         - Only if building with sound on Windows; path to libogg.dll
OGG_INCLUDE_DIR                 - Only if building with sound; directory that contains an ogg directory which contains ogg.h
OGG_LIBRARY                     - Only if building with sound; path to libogg.a/libogg.so/libogg.dll.a
OPENAL_DLL                      - Only if building with sound on Windows; path to OpenAL32.dll
OPENAL_INCLUDE_DIR              - Only if building with sound; directory where al.h is located
OPENAL_LIBRARY                  - Only if building with sound; path to libopenal.a/libopenal.so/OpenAL32.lib
OPENGLES2_INCLUDE_DIR           - Only if building with GLES; directory that contains gl2.h
OPENGLES2_LIBRARY               - Only if building with GLES; path to libGLESv2.a/libGLESv2.so
SQLITE3_INCLUDE_DIR             - Directory that contains sqlite3.h
SQLITE3_LIBRARY                 - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib
VORBISFILE_LIBRARY              - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a
VORBIS_DLL                      - Only if building with sound on Windows; paths to vorbis DLLs
VORBIS_INCLUDE_DIR              - Only if building with sound; directory that contains a directory vorbis with vorbisenc.h inside
VORBIS_LIBRARY                  - Only if building with sound; path to libvorbis.a/libvorbis.so/libvorbis.dll.a
XXF86VM_LIBRARY                 - Only on Linux; path to libXXf86vm.a/libXXf86vm.so
ZLIB_DLL                        - Only on Windows; path to zlib1.dll
ZLIB_INCLUDE_DIR                - Directory that contains zlib.h
ZLIB_LIBRARY                    - Path to libz.a/libz.so/zlib.lib
ZSTD_DLL                        - Only on Windows; path to libzstd.dll
ZSTD_INCLUDE_DIR                - Directory that contains zstd.h
ZSTD_LIBRARY                    - Path to libzstd.a/libzstd.so/ztd.lib

Compiling on Windows using MSVC

Requirements

Compiling and installing the dependencies

It is highly recommended to use vcpkg as package manager.

After you successfully built vcpkg you can easily install the required libraries:

vcpkg install zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry --triplet x64-windows
  • Don't forget about IrrlichtMt. The easiest way is to clone it to lib/irrlichtmt as described in the Linux section.
  • curl is optional, but required to read the serverlist, curl[winssl] is required to use the content store.
  • openal-soft, libvorbis and libogg are optional, but required to use sound.
  • luajit is optional, it replaces the integrated Lua interpreter with a faster just-in-time interpreter.
  • gmp and jsoncpp are optional, otherwise the bundled versions will be compiled

There are other optional libraries, but they are not tested if they can build and link correctly.

Use --triplet to specify the target triplet, e.g. x64-windows or x86-windows.

Compile Minetest

a) Using the vcpkg toolchain and CMake GUI

  1. Start up the CMake GUI
  2. Select Browse Source... and select DIR/minetest
  3. Select Browse Build... and select DIR/minetest-build
  4. Select Configure
  5. Choose the right visual Studio version and target platform. It has to match the version of the installed dependencies
  6. Choose Specify toolchain file for cross-compiling
  7. Click Next
  8. Select the vcpkg toolchain file e.g. D:/vcpkg/scripts/buildsystems/vcpkg.cmake
  9. Click Finish
  10. Wait until cmake have generated the cash file
  11. If there are any errors, solve them and hit Configure
  12. Click Generate
  13. Click Open Project
  14. Compile Minetest inside Visual studio.

b) Using the vcpkg toolchain and the commandline

Run the following script in PowerShell:

cmake . -G"Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=OFF -DENABLE_CURSES=OFF
cmake --build . --config Release

Make sure that the right compiler is selected and the path to the vcpkg toolchain is correct.

Windows Installer using WiX Toolset

Requirements:

In the Visual Studio 2017 Installer select Optional Features -> WiX Toolset.

Build the binaries as described above, but make sure you unselect RUN_IN_PLACE.

Open the generated project file with Visual Studio. Right-click Package and choose Generate. It may take some minutes to generate the installer.

Compiling on MacOS

Requirements

Install dependencies with homebrew:

brew install cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit zstd

Download

Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:

git clone --depth 1 https://github.com/minetest/minetest.git
cd minetest

Download minetest_game (otherwise only the "Development Test" game is available) using Git:

git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game

Download Minetest's fork of Irrlicht:

git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt

Build

mkdir cmakebuild
cd cmakebuild

cmake .. \
    -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
    -DCMAKE_FIND_FRAMEWORK=LAST \
    -DCMAKE_INSTALL_PREFIX=../build/macos/ \
    -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE

make -j$(nproc)
make install

Run

open ./build/macos/minetest.app

Docker

We provide Minetest server Docker images using the GitLab mirror registry.

Images are built on each commit and available using the following tag scheme:

  • registry.gitlab.com/minetest/minetest/server:latest (latest build)
  • registry.gitlab.com/minetest/minetest/server:<branch/tag> (current branch or current tag)
  • registry.gitlab.com/minetest/minetest/server:<commit-id> (current commit id)

If you want to test it on a Docker server you can easily run:

sudo docker run registry.gitlab.com/minetest/minetest/server:<docker tag>

If you want to use it in a production environment you should use volumes bound to the Docker host to persist data and modify the configuration:

sudo docker create -v /home/minetest/data/:/var/lib/minetest/ -v /home/minetest/conf/:/etc/minetest/ registry.gitlab.com/minetest/minetest/server:master

Data will be written to /home/minetest/data on the host, and configuration will be read from /home/minetest/conf/minetest.conf.

Note: If you don't understand the previous commands please read the official Docker documentation before use.

You can also host your Minetest server inside a Kubernetes cluster. See our example implementation in misc/kubernetes.yml.

Version scheme

We use major.minor.patch since 5.0.0-dev. Prior to that we used 0.major.minor.

  • Major is incremented when the release contains breaking changes, all other numbers are set to 0.
  • Minor is incremented when the release contains new non-breaking features, patch is set to 0.
  • Patch is incremented when the release only contains bugfixes and very minor/trivial features considered necessary.

Since 5.0.0-dev and 0.4.17-dev, the dev notation refers to the next release, i.e.: 5.0.0-dev is the development version leading to 5.0.0. Prior to that we used previous_version-dev.

Comments
  • CSM causes security issues

    CSM causes security issues

    Since using Minetest 0.4.16 stable on Xanadu it has been noted that quite a few players are exploiting this feature to cheat on server by running bot-chat-text, opening ANY chest to steal items and of course finding ores without the need for digging... Something has to be done to stop this as it takes the fun out of the game entirely and has players complaining of stolen items...

    Personally I would like to see this feature disabled entirely but am aware of specific switches available on 0.5.0 to disable certain components of this, which sadly can be re-enabled by pre-compiling your own minetest client with the changes reset...

    Server security is more important,

    High priority Request / Suggestion @ Client Script API 
    opened by tenplus1 188
  • Time-of-day-dependent face shading, specular lighting

    Time-of-day-dependent face shading, specular lighting

    Adds directional lighting and (very subtle) specular on everything, including models, if shaders are enabled. Model shading requires the models to be properly exported with normals (well, obviously...)

    Shading depends on the sun (or moon) angle and changes properly during the day/night and eases smoothly during a dawn/dusk transition.

    Before/after screenshot: Before and after

    Rebase needed @ Client / Audiovisuals Feature Shaders 
    opened by kaadmy 166
  • CSM: Allowing a server to protect itself against clients running client-provided clientmods

    CSM: Allowing a server to protect itself against clients running client-provided clientmods

    I just wanted to check if this already done, or planned, or possible. If not possible i am seriously concerned.

    Client-provided clientmods that cannot be prevented by a server creates a huge potential for irritating low-level troublemakers and cheaters on a server, and makes trouble much easier to cause. There are already clientmods being distributed on the forum and servers can do nothing to protect themselves.

    Before now you would have to hack a client, now it's as easy as installing a mod. Server admin are already driven crazy by irritating client behaviour and now it will get much worse.

    I am not asking for removing the ability to use client-provided clientmods, just a way for a server to prevent any connected clients from doing so, or not allowing clients using client-provided client mods from connecting.

    Arguing that 'it is already possible with a hacked client' is no argument, it should not be made easier, and not supported and encouraged by the distribution of clientmods that servers cannot protect themselves against.

    I seem to remember someone, maybe sofar, discussing this and getting the assurance that such an ability as i request would be added. Has it been? WIll it be? Why has it not been? @sofar was this you and what is your opinion?

    /////////////

    Here's a specific example of how this will ruin a survival server ..

    The oredetect clientmod already in use effectively makes the world transparent around a player to a certain distance, any node can be detected and its co-ordinates displayed. The server cannot prevent this or even know which clients are using it. Some say the range is limited, however the valuable ores from gold to diamond are only separated by 13-17 nodes, so a detection radius half of this is enough to detect almost all valuable ores around a player.

    Players with high standards who don't want to cheat in survival will not use the mod, but then will suspect other players are using it and are gaining an advantage, this makes them feel frustrated. Players with moderate standards will see the advantage other players have and will be tempted to use the mod, the more players that use it the more pressure there is for the rest to use it. Players with low standards will use the mod to cheat, and therefore gain an advantage over other players and are rewarded for their low standards.

    The whole concept of MT is that 'you can't effectively see through solid objects', but now an unknown set of players can do this, and the server cannot choose, police or detect this in any way. This creates an atmosphere of anarchy, cheating, frustration, suspicion and mistrust, with the worst players having an advantage and being rewarded, having fun, while the server is ruined for everyone else.

    I have read the arguments that CSM is harmless because it can only read map and not write to it, however i have explained above how this alone can ruin a survival server.

    ///////////////

    For some servers unregulated client-provided clientmods is not an issue so let them, but at least allow servers to decide and protect themselves. MT has always been about the server providing and controlling anything of significance, and servers have always been able to protect themselves and police what happens.

    If it is not possible to add the abililty i request then the only thing to do is to not allow client-provided clientmods at all, as i understand it CSM was originally intended to be server-provided mods only, for very good reason. CSM will then still bring many benefits and server admin will add the reasonable clientmods that players want, but at least it is in a controlled way, it is known what is provided to all players and no-one can gain a secret advantage over anyone else.

    @celeron55 please could you consider this issue?

    @ Server / Client / Env. High priority Request / Suggestion @ Client Script API 
    opened by paramat 160
  • Move repository

    Move repository

    GitHub is being acquired by Microsoft. That means, while it will probably remain usable for a year or so, it will be changing to discourage participating in free software projects like Minetest. EDIT: and to become more β€œuser-friendly,” that is, featureless full of ads user-tracking, service. So we may have to move somewhere.

    By the way, it would be nice if you tweet GH your disappointment on the acquisition (unless you like MS, of courseβ€”but then you play MC and not MT, don’t you?)

    Request / Suggestion Discussion 
    opened by numberZero 130
  • GL_INVALID_ENUM on Android

    GL_INVALID_ENUM on Android

    Reported by NiklasGamerHD βœ” on Discord

    Minetest version
    0.4.17.2
    
    OS / Hardware

    Operating system: Android 7.0 Model: Huawei Honor 6A GPU model: unknown OpenGL version: unknown

    image

    image

    Bug @ Client / Audiovisuals Android High priority 
    opened by rubenwardy 122
  • Shadow mapping render pass

    Shadow mapping render pass

    This PR implements shadow mapping with PSM (Perspective Shadow Mapping), PCF filtering and "colored shadows". The implementation it's originally based in the XEffects shadow mapping examples.

    How this works:

    1. To be able to make it work with Irrlicht(MT) the Nodes must be added (and removed ) to a Shadow caster list to cast shadows.
    2. The draw function in RenderingCore updated to do the depth pass.
    3. Render all the nodes that casts shadow in a RTT. 3.1. Render ClientMap depth every 0.2 seconds to avoid excessive drawcalls. 3.2. Render depth for all dynamic entities 3.3. Mix both depth textures in the Shadow Texture.
    4. execute standard DrawAll, with the Shadow Texture attached.

    The textures used are (3x): irr::video::ECOLOR_FORMAT::ECF_R32F for depth irr::video::ECOLOR_FORMAT::ECF_G32R32F for depth+color(encoded)

    Both in 16bits if configured, but the tests I did, anything below 32bits causes lot's of precision problems.

    To do

    This PR is Ready for Review.

    • [x] Calculate sun POV frustum
    • [x] nodes added and removed from shadow caster list
    • [x] Render depth pass
    • [x] Write node and objects shaders
    • [x] Vanish shadow on artificial light.
    • [x] "Colored shadows"
    • [x] Different quality configurations.
    • [x] PCF & Poisson disk filtering.
    • [x] Tweak PSM distortion function for every quality.
    • [x] Wield items shadows.
    • [x] Moon shadows.

    Future improvements.

    • Check if mesh generation is able to remove the shadows encoded in the map

    • Depth shaders using standard MT shader.cpp style (I wasn't able to make it work), so we can make things like shadows for waving plants and leaves.

    • Reduce drawcalls.

    How to test

    Go to settings tabs, enable shaders, select quality from Dynamic Shadows dropdown.

    The default values are: Ultra low: -shadow_map_max_distance: 80 blocks -shadow_map_texture_size: 512 -shadow_map_color: false -filter level: 0

    Low: -shadow_map_max_distance: 120 blocks -shadow_map_texture_size: 1024 -shadow_map_color: false -filter level: 1

    Medium: -shadow_map_max_distance: 350 blocks -shadow_map_texture_size: 2048 -shadow_map_color: false -filter level: 1

    High: -shadow_map_max_distance: 350 blocks -shadow_map_texture_size: 2048 -shadow_map_color: true -filter level: 2

    Ultra High: -shadow_map_max_distance: 450 blocks -shadow_map_texture_size: 4096 -shadow_map_color: true -filter level: 2

    The values Ultra Low and Low only work when the map doesn't have too big elements, and even with normal maps it could have some artifacts.

    This PR is high demanding because the amount of drawcalls so it's only recommended for slightly modern hardware.

    The configuration can be changed within the "All Settings" section -> shadow

    Examples:

    Configuration: image

    Examples: image

    image

    image

    image

    Non-trivial @ Client / Audiovisuals >= Two approvals Feature Shaders 
    opened by 0xLiso 121
  • Android: add Android Studio support, completely redone build system and java part

    Android: add Android Studio support, completely redone build system and java part

    What does the PR do?

    1. ARM64
    2. The latest version of all dependencies
    3. Build using Linux, Windows, MacOS
    4. Build in Android Studio
    5. Significant optimization + LuaJIT!
    6. ~~Localization support~~
    7. Fix language problems in chat, inside the game, everywhere
    8. Java part improvement
    9. Improving everything you want;)
    10. Full ReDo everything from scratch!

    Did you know that the Android port in MultiCraft has been rewritten to make it proprietary? Was it spent several thousand dollars and hundreds of hours of work, tests and corrections? And then I decided to publish all the source code under the LGPL license!

    Note: comments are accepted only from players and developers with experience in developing for Android. Let mapgen-nerds, trolls and other participants silently. Thanks.

    Building on Windows for console lovers right now looks like this. ./gradlew.bat assemblerelease

    On Linux/macOS ./gradlew assemblerelease

    But the best part is Android Studio. Just open the project, connect the phone and press the Run button and after 2 minutes the game will be installed on your phone! Windows, Linux, MacOS!

    What's inside?

    Gradle clones the repository with ready deps (irrlicht, freetype, curl, etc.) Then he will kindly prepare Assets, compressing it into an archive for very fast copying from APK to sdcard Then he will compile Minetest for arm-v7a and arm-v8a Compiles Java code with support for AndroidX and AppCompat for full compatibility with Android 4.1-10 And finally he will create 2 APKs: arm-v7a and arm-v8a (of course, with different assembly numbers, to meet the requirements of Google Play).

    Is it long? Let me show the result of a clean build from my PC: BUILD SUCCESSFUL in 2m 19s 48 actionable tasks: 47 executed, 1 up-to-date https://www.youtube.com/watch?v=MJMUhECMPcY Yes, I have a powerful workstation, maybe it will be 1 minute longer on your PC! Enjoy it.


    Based on master branch (last commit at the moment).

    ARM: https://github.com/MoNTE48/minetest/releases/download/android/app-armeabi-v7a-release.apk (recommended) ARM64: https://github.com/MoNTE48/minetest/releases/download/android/app-arm64-v8a-release.apk

    Blocker @ Build Android High priority >= Two approvals Feature 
    opened by MoNTE48 111
  • Fix various problems with sneaking

    Fix various problems with sneaking

    new/changes:

    • sneaking won't actually hover you in the air, releasing shift guarantees not falling down (same as in MC)
    • sneak-jump no longer goes higher than a normal jump (^ was required for this)
    • sneaking no longer avoids fall damage
    • you can sneak on partial nodes (slabs, sideways slabs) correctly

    downsides:

    • sneaking doesn't "go out" as far anymore (0.29 instead of 0.4)
    • can't jump when sneaking out as far as possible (breaks the sneak ladder)
    @ Client / Audiovisuals >= Two approvals Controversial Bugfix 
    opened by sfan5 110
  • Hardware node coloring

    Hardware node coloring

    This request adds to possibility to colorize nodes dynamically, using hardware coloring.

    How to use: Add color = {r = <?>, g = <?>, b = <?>} to your node definition to get static color. Add palette="image.png" to let Minetest colorize the node dynamically based on the param2. You can add color = <?> to any tile too, to overwrite any global behavior (for example to only allow dynamic color for the top tile of grass).

    Advantages: Modders will be able to create colored nodes, while Minetest will not create new textures for them in the memory (unlike texture modifiers). This may make framerate higher on worlds that use a lot of colored blocks for buildings. Makes modders able to colorize nodes based on their param2.

    Disadvantage: Old clients are "colorblind". They see the textures without colorization. When shaders are disabled, memory usage is increased (Minetest has to store colors as well).

    @ Client / Audiovisuals >= Two approvals Feature 
    opened by juhdanad 105
  • Adding particle blend, glow and animation

    Adding particle blend, glow and animation

    This pull could add particle blend, glow and animation to particle and particle spawners. Solve #4232 How it looks: https://youtu.be/9y-izjlxPmE Test code: http://pastebin.com/URY3QitQ (outdated) Test texture: http://imgur.com/c5sidRL

    @ Script API @ Client / Audiovisuals >= Two approvals Controversial Feature 
    opened by Foghrye4 105
  • Allow binding dig, place actions to keys; remove LMB/RMB hardcoding

    Allow binding dig, place actions to keys; remove LMB/RMB hardcoding

    [Adopted from #6537]

    • Remove hard-coded association of dig and place actions, with LMB and RMB respectively.
      • These actions are still bound to LMB and RMB by default.
    • Allow binding actions to mouse buttons.
    • ObjectRef:get_player_control now returns dig and place fields. Note: The old LMB and RMB fields still exist alongside dig and place, to ensure backwards compatibility.

    Tested, works. This PR is ready for review.

    Video demonstration

    https://youtu.be/0Ca7nEMiq_U

    How to test

    • Suggested keymap to test this PR:
      keymap_place = KEY_KEY_L
      keymap_dig = KEY_KEY_X
      keymap_inventory = KEY_LBUTTON
      keymap_jump = KEY_RBUTTON
      
    • Tweak repeat_place_interval, and test it by selecting a place-able item (e.g. a node), pointing at a node, and holding down the "place" keybind.

    Due to code changes around keypress detection, it's advisable to also test various digging, placing, use-ing, and secondary_use-ing scenarios, and carefully observe that nothing has broken. Note that this PR doesn't modify any part of the actual digging and placing, even in a subtle manner. So if a change is noticeable, please do let me know.

    >= Two approvals Feature @ Client / Controls / Input 
    opened by ClobberXD 100
  • Fix crash on Android with IrrlichtMt9

    Fix crash on Android with IrrlichtMt9

    https://github.com/minetest/minetest/pull/12636 causes Android to crash with IrrlichtMt9, which was updated to in the Android dependencies 4 days ago

    To do

    This PR is a Ready for Review.

    How to test

    Test that you can start Minetest and launch a world on Android

    Android One approval Bugfix 
    opened by rollerozxa 2
  • CLI improve help text columns

    CLI improve help text columns

    Problem

    Garbled columns in displayed help text after minetest --help on CLI like:

      --migrate <value>           Migrate from current map backend to another (Only works when using minetestserver or with --server)
      --migrate-auth <value>      Migrate from current auth backend to another (Only works when using minetestserver or with --server)
      --migrate-mod-storage <value>Migrate from current mod storage backend to another (Only works when using minetestserver or with --server)
      --migrate-players <value>   Migrate from current players backend to another (Only works when using minetestserver or with --server)
      --name <value>              Set player name
    

    Solutions

    Supposedly amend internals of minetest --help on CLI like:

      --migrate <val>             Migrate from current map backend to another (Only works when using minetestserver or with --server)
      --migrate-auth <val>        Migrate from current auth backend to another (Only works when using minetestserver or with --server)
      --migrate-mod-storage <val> Migrate from current mod storage backend to another (Only works when using minetestserver or with --server)
      --migrate-players <val>     Migrate from current players backend to another (Only works when using minetestserver or with --server)
      --name <val>                Set player name
    

    NOTE: Supposedly changed from <value> to <val> intentionally.

    Alternatives

    Naturally the change from <value> to <val> would be more effort in the change but the MT help text on CLI is almost too broad already and thus the shorter <val> as proposed above. IMO would add to the readability and no ambiguity because <val> clearly means value, I presume..

    Further amendment:

    Please also consider changing the overlong option --migrate-mod-storage to a shorter --migrate-mods on same level of dis-ambiguity, I presume. This would require a deprecated --migrate-mod-storage during MT 5.6.2 and/or MT 5.7.0 in parallel to the shorter --migrate-mods until the latter shall become the single option with MT 5.7.1 supposedly.

    Additional context

    ref #13121

    Feature request Beginner Friendly 
    opened by Zweihorn 4
  • CLI: display the help text and exit

    CLI: display the help text and exit

    Minetest version
    MT 5.6.1_1
    

    ref the minetest port from MacPorts

    OS / Hardware

    Operating system: macOS 11.7.2 BigSur CPU: x86_64

    Summary

    CLI minetest --help should display the help text and exit.

    Furthermore, the help text should be amended from:

    --help                      Show allowed options
    

    supposedly to new help text:

    --help                      Show allowed options and exit
    

    and being consistent to the new exit after help by the improved MT program.

    However, the command starts the full MT GUI with a claimed MT world after the help text was displayed on Terminal i.e. macOS CLI. This should NOT happen, I presume.

    Usually, commands like tar --help and certainly minetest --help should display the help text and exit without further operation. This would be similar to the minetest --version and more compatible with usual CLI experience.

    Furthermore, might be linked to #13116 but this was not tested and thus not sure about keystrokes (yet).

    Steps to reproduce

    Just give it a try on CLI like:

    % /Applications/MacPorts/minetest.app/Contents/MacOS/minetest --help
    Allowed options:
      --address <value>           Address to connect to. ('' = local game)
      --color <value>             Coloured logs ('always', 'never' or 'auto'), defaults to 'auto'
      --config <value>            Load configuration from specified file
      --console                   Starts with the console (Windows only)
      --gameid <value>            Set gameid ("--gameid list" prints available ones)
      --go                        Disable main menu
      --help                      Show allowed options
      --info                      Print more information to console
      --logfile <value>           Set logfile path ('' = no logging)
      --map-dir <value>           Same as --world (deprecated)
      --migrate <value>           Migrate from current map backend to another (Only works when using minetestserver or with --server)
      --migrate-auth <value>      Migrate from current auth backend to another (Only works when using minetestserver or with --server)
      --migrate-mod-storage <value>Migrate from current mod storage backend to another (Only works when using minetestserver or with --server)
      --migrate-players <value>   Migrate from current players backend to another (Only works when using minetestserver or with --server)
      --name <value>              Set player name
      --password <value>          Set password
      --password-file <value>     Set password from contents of file
      --port <value>              Set network port (UDP)
      --quiet                     Print to console errors only
      --random-input              Enable random user input, for testing
      --recompress                Recompress the blocks of the given map database.
      --run-benchmarks            Run the benchmarks and exit
      --run-unittests             Run the unit tests and exit
      --server                    Run dedicated server
      --speedtests                Run speed tests
      --terminal                  Feature an interactive terminal (Only works when using minetestserver or with --server)
      --trace                     Print enormous amounts of information to log and console
      --verbose                   Print even more information to console
      --version                   Show version information
      --world <value>             Set world path (implies local game if used with option --go)
      --worldlist <value>         Get list of worlds ('path' lists paths, 'name' lists names, 'both' lists both)
      --worldname <value>         Set world by name (implies local game if used with option --go)
    2023-01-07 11:31:07: [Main]: Automatically selecting world at [/Users/XXX/Library/Application Support/minetest/worlds/world1]
    
    

    However, the minetest --version command works as expected:

    % /Applications/MacPorts/minetest.app/Contents/MacOS/minetest --version
    Minetest 5.6.1-MacPorts-rev1 (OSX)
    Using Irrlicht 1.9.0mt8
    Using LuaJIT 2.1.0-beta3
    BUILD_TYPE=Release
    RUN_IN_PLACE=0
    USE_CURL=1
    USE_GETTEXT=1
    USE_SOUND=1
    STATIC_SHAREDIR="minetest.app/Contents/Resources"
    STATIC_LOCALEDIR="minetest.app/Contents/Resources/locale"
    

    Hope this helps.

    Keep on the good work and prosper.

    🌻

    Unconfirmed bug macOS 
    opened by Zweihorn 3
  • "Undersampling" filtering option causes game to fail to render under opengl1.3

    Minetest version
    5.3.0
    
    OS / Hardware

    Operating system: Debian 11.6 linux 5.10.0-20-686 CPU: (Almost certainly doesn't matter but...) Pentium M @ 1.7Ghz

    GPU model:Intel 82852/82855GM OpenGL version: 1.3

    Summary

    When running under opengl 1.3 the game fails to render when the "undersampling" option is set to a value larger then 1.

    Steps to reproduce

    1.) Insure minetest runs under opengl 1.3

    2.) In the "minetest.conf" file set "undersampling" to "2" or larger.

    Please note: undersampling works properly under opengl 3.0. This is not an issue with running under non-longmode (64bit) linux.

    Possible solution: Issue a compatibility warning about "undersampling" when running under opengl1.3.

    Unconfirmed bug 
    opened by userse31 0
  • Running in the background on Android

    Running in the background on Android

    Problem

    When pressing the home button on Android, the game seemingly continues to run in the background. There is no sticky notification to indicate this, and I was entirely unaware until I had the mineclone2 world select menu open and heard music in the background. This can cause battery drain.

    Solutions

    This should probably be configurable.

    On singleplayer worlds and menus, if the user presses the home button the game should probably be paused and frozen, and on multiplayer worlds it should probably disconnect.

    Alternatives

    Alternatively, Minetest should have a sticky notification that indicates it is running.

    Feature request Android UI/UX 
    opened by easyaspi314 0
Releases(5.6.1)
Owner
Minetest
Building an open source voxel game engine and game
Minetest
Free Android 2D OpenGL Game Engine

AndEngine Donations While developing AndEngine was a lot of fun, it also also consumed many(!) months of my life. It actually continues to cost me a s

Nicolas Gramlich 3.2k Jan 5, 2023
A cross-platform Java game Engine (Framework) , support JavaFX / Android / IOS / HTML5 / Linux / MAC / Windows

Loon Game Engine (Java Game Framework) EN / KR Free Game Resources Links Download Loon Game Engine Only Android-studio Template : androidstudio-templa

cping 502 Jan 4, 2023
Korjector is a KorGE game engine-based multiplatform client for Projector.

Korjector is a KorGE game engine-based multiplatform client for Projector. An internal JetBrains Hackathon 2021 project to demonstrate that a Projector client can be created in less than 48 hours for any OS that supports decent canvas 2D API.

Sergei Bulgakov 10 Nov 20, 2021
SMBClone - SMD clone custom game engine. (Desktop + Android)

SMBClone Simple crossplatform game engine for like SMB game! Supported platforms

Victor Varenik 4 Jul 4, 2022
RemsEngine - OpenSource Kotlin/OpenGL/ECS based game engine

Game Engine: Rem's Engine Parallel to this video editor, I am developing my own

Antonio 7 Nov 3, 2022
Android Play Games Services plugin for Godot Game Engine

Google Play Games Services Plugin for Godot This is an Android Play Games Services plugin for Godot Game Engine 3.4.2 Supported features: Sign-in/Sign

Studio Adriatic 41 Dec 29, 2022
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

cocos2d 16.7k Dec 31, 2022
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

cocos2d 16.7k Jan 7, 2023
This is an application that is about an X / O game. You can enter the names of the game, and there is also a screen for those who win and there is a button to continue playing and the game determines the result of each player

Game-X-O This is an application that is about an X / O game. You can enter the names of the game, and there is also a screen for those who win and the

Mohamed Rafat 2 Aug 20, 2022
a 2d Java physics engine, native java port of the C++ physics engines Box2D and LiquidFun

jbox2d Please see the project's BountySource page to vote on issues that matter to you. Commenting/voting on issues helps me prioritize the small amou

jbox2d 1k Jan 2, 2023
Android OpenGL ES 2.0/3.0 Engine

Build Status Master Branch Status Develop Branch Status News 06/23/2017 Bombshell 1.1.970 has been released. It fixes behavior of Objects of zero size

null 2.2k Jan 9, 2023
2D physics engine for games

LiquidFun Version 1.1.0 Welcome to LiquidFun! LiquidFun is a 2D physics engine for games. Go to our landing page to browse our documentation and see s

Google 4.5k Dec 31, 2022
RPG written in Kotlin using Korge engine

TheAlchemist RPG written in Kotlin using the Korge engine Based on the template https://github.com/korlibs/korge-starter-kit-rpg, this is a simple pix

Liam 2 Jan 16, 2022
An experiment with cellular automata; Functional mod for Rem's Engine.

Cellular Automata This is an experiment with cellular automata. A functional mod for Rem's Engine. When experimenting, I found the Sierpinski Triangle

Antonio 1 Mar 21, 2022
Minosoft is an open source minecraft client, written from scratch in kotlin (and java).

Minosoft Minosoft is an open source minecraft client, written from scratch in kotlin (and java). It aims to bring more functionality and stability. No

null 151 Dec 31, 2022
OpenModInstaller is an innovative open-source application for universal Minecraft mod management.

OpenModInstaller is an innovative open-source application for universal Minecraft mod management.

OpenModInstaller 11 Dec 9, 2021
An open-source, mod-friendly Android+Desktop remake of Civ V, made with LibGDX

Unciv - FOSS Civ V for Android+Desktop What is this? An open-source, mod-friendly Android+Desktop remake of Civ V, made with LibGDX Is this any good?

Yair Morgenstern 4.7k Jan 5, 2023
Our maze game is an 2d-animation game developed using android studio.

Our maze game is an 2d-animation game developed using android studio. The game consists of a ball and a board with a hole in the center of it. We are using accelerometer as controller to guide ball towards the hole. T

Suraj Devgan 6 Nov 29, 2022
Sample source code for Android Pride Rainbow Bounding Box written in Kotlin and OpenGL πŸ³οΈβ€πŸŒˆ

Sample Code for Animated Rainbow Bounding Box in OpenGL A sample app showing how to draw a rainbow bounding box on Android with OpenGL and Kotlin. Blo

Rebecca Franks 28 May 24, 2022