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
  • 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 4.9+ Can be replaced with Clang 3.4+
CMake 3.5+
IrrlichtMt - Custom version of Irrlicht, see https://github.com/minetest/irrlicht
SQLite3 3.0+
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

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 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.
  • IrrlichtMt can also be installed somewhere that is not a standard install path.
    • In that case use -DCMAKE_PREFIX_PATH=/path/to/install_prefix
    • The path must be set so that $(CMAKE_PREFIX_PATH)/lib/cmake/IrrlichtMt exists or that $(CMAKE_PREFIX_PATH) is the path of an IrrlichtMt build folder.

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_FREETYPE=ON         - Build with FreeType2; Allows using TTF fonts
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)

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
FREETYPE_INCLUDE_DIR_freetype2  - Only if building with FreeType 2; directory that contains an freetype directory with files such as ftimage.h in it
FREETYPE_INCLUDE_DIR_ft2build   - Only if building with FreeType 2; directory that contains ft2build.h
FREETYPE_LIBRARY                - Only if building with FreeType 2; path to libfreetype.a/libfreetype.so/freetype.lib
FREETYPE_DLL                    - Only if building with FreeType 2 on Windows; path to libfreetype.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 sqlite3 freetype luajit gmp jsoncpp --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.
  • freetype is optional, it allows true-type font rendering.
  • 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.

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: (current branch or current tag)
  • registry.gitlab.com/minetest/minetest/server: (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:
   

   

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
  • CI: Decrease compilation times with Ccache

    CI: Decrease compilation times with Ccache

    I've excluded the docker build since it would probably require a modified Dockerfile, and Ccache did not work with macos and VS 2019 builds for some reason.

    • Goal of the PR: Speed up the CI
    • How does the PR work? It uses the github action cache together with Ccache to re-use previous compilations.
    • Does it resolve any reported issue? Yes, it resolves #11667.
    • Does this relate to a goal in the roadmap? I don't think so.
    • If not a bug fix, why is this PR needed? What usecases does it solve? The usecases are already mentioned in the Issue.

    How to test

    • Fork this branch
    • Enable github actions on the fork
    • Wait until the action for the forked branch completes
    • Do a change in, for example, the build.yml workflow file, create a commit and push to the forked branch
    • Wait until the action for the forked branch completes
    • Compare the times between the first and second github action runs
    @ Build Performance 
    opened by HybridDog 0
  • finishgen: Couldn't grab block we just generated

    finishgen: Couldn't grab block we just generated

    Minetest version
    Minetest 5.6.1 Android
    
    OS / Hardware

    Operating system: Android 6.0.1 (SDK/API lv 23) CPU: MediaTek

    GPU model: Mali OpenGL version: ES 3.1

    Summary

    Screenshot_20230103-154428 I see these error text keep appearing after some seconds, not only this world but other too and i dont see something like this happen in 5.5 or 5.4

    Steps to reproduce

    i dont know, try:

    1. Install Minetest 5.6.1 on Android
    2. Create a world and join
    3. wait some seconds... (if still not, try build something)
    Unconfirmed bug @ Mapgen 
    opened by oong819 1
  • Remove/redo bilinear filter settings

    Remove/redo bilinear filter settings

    Problem

    AFAIK, on magnification, the purpose of bilinear filtering is to make images blurry (aka smooth). (And on minification, it can maybe be useful to avoid certain types of aliasing if you're moving the camera, though I'm not sure if that's really the case if we also have mipmapping enabled.)

    However:

    • Most subgames and mods in minetest use 16x16 textures, and a blurry style is not wanted. We even have a texture_min_size setting (default is 64) to avoid blurriness to some degree, this is ridiculous.
    • Whether bilinear interpolation is enabled or disabled for a surface should be decided by the modder (or texture-pack creator), and not globally by the player. This is a violation of minetest's design to give the server control over content. I.e. a modder or texture-pack creator might want to enable it if it's a high resolution texture with smooth gradients.
    • Bilinear filtering can make some things more complicated. Ex1: Edges of sprites with transparent pixels look different if alpha mode clamp vs. blend. Ex2: Texture atlases are probably not as easy with bilinear filtering.
    • Also, we don't currently allow to set e.g. GL_NEAREST_MIPMAP_LINEAR minification filtering (choose nearest from mipmap level, and lin interpol between 2 levels, aka trilin without bilin). (Which should be the default imo.)

    Solutions

    Change irrlicht to allow to set any texture filtering mode, and minification and magnification separately. Then, always keep the mag filter at GL_NEAREST (we don't want blurriness after all). Add a setting to change the min filter freely. (Alternatively, interpret the current mipmap, blin and trilin settings to choose the filter. (Though trilin without bilin is technically not to be called "trilinear", but rather "linear".)) And remove the ugly hacks, like texture_min_size.

    Alternatives

    Remove the bilinear filtering setting and all our hacks associated with it. The downsides overweight.

    Additional context

    See also: https://www.khronos.org/opengl/wiki/Sampler_Object#Filtering

    @ Client / Audiovisuals Feature request Shaders 
    opened by Desour 0
  • server_description not shown in manually added servers

    server_description not shown in manually added servers

    Minetest version
    Minetest 5.6.1 (Linux)
    Using Irrlicht 1.9.0mt8
    Using Lua 5.1.5
    
    Summary

    server_description = foo is set in dedicated server conf, but it is not shown in the client's favorite list

    Steps to reproduce

    configure a server, add IP to client

    Feature request Possible close @ Mainmenu 
    opened by BobOmbuzal 1
  • Report collisionMoveSimple for client and server.

    Report collisionMoveSimple for client and server.

    collisionMoveSimple as reported in the profiler (F6) mixes client and server calls, which is both incorrect and not useful.

    This PR simply reports them separately.

    How to test

    Start any game in singleplayer mode, open the profiler, see how you now see collisionMoveSimple separately for client and server.

    Trivial Bugfix 
    opened by lhofhansl 0
  • Occlusion culling algorithm based on recursive descend

    Occlusion culling algorithm based on recursive descend

    This is inspired by portal-based occlusion culling technique (https://www.youtube.com/watch?v=8xgb-ZcZV9s).

    Every mapblock side is treated as a portal, and the map is walked recursively through the portals. Simple logical rule appled - a 'far' side of a mapblock is visible if :

    • If adjacent 'near' sides are see-through (block is not occluded, and adjacent block does not have a solid side)
    • If opposite 'near' side is see-through, and it overlaps the 'far' side (so called dominant axis in the look vector)

    A side is traversed if it's visible and not fully solid, otherwise it's marked as opaque for the next mapblock.

    To do

    This PR is Ready for Review.

    How to test

    1. Configure server parameters to send more blocks by default:
    max_block_send_distance = 40
    max_block_generate_distance = 40
    block_send_optimize_distance = 40
    client_unload_unused_data_timeout = 6000
    client_mapblock_limit = -1
    max_simultaneous_block_sends_per_client = 80
    
    1. Enter MTG and set view distance to 400-600
    2. Enable F6 profiler and F5 graphs
    3. Flip between /set occlusion_culler new and /set occlusion_culler old
    4. Mark the change in updateDrawList value, MapBlocks drawn, Time non-rendering and jitter %
    5. The game must work more smoothly even with large number of mapblocks loaded.
    @ Client / Audiovisuals Testing needed Roadmap Performance Feature 
    opened by x2048 20
Releases(5.6.1)
Owner
Minetest
Building an open source voxel game engine and game
Minetest
A voxel game/Minecraft clone for the iCE40 UP5K FPGA

FPGA craft A voxel game/Minecraft clone for the iCE40 UP5K FPGA (for the iCEBreaker board). Disclaimer Use this project at your own risk. This project

null 166 Nov 27, 2022
MAZE (My AmaZing Engine) - 🎮 Personal open-source cross-platform game engine

MAZE (My AmaZing Engine) is the self-written open-source cross-platform game engine in the active development stage. At the moment it is my main pet project, developed for the purpose of learning and preserving different game dev technologies.

Dmitriy Nosov 13 Dec 14, 2022
OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

OpenMW is an open-source open-world RPG game engine that supports playing Morrowind.

null 4.5k Jan 2, 2023
Multiplayer Voxel Survival in C99, includes a badly written implementation of LISP

Imagine a mix between Minecraft, Quake ]I[ and Emacs. Apart from that there is no clear plan for this game, just a bunch of ideas that hopefully will turn out to be fun. Some of these are stored here in this repo, others have been talked about on Twitch during dev streams.

Ben 79 Nov 21, 2022
Modding (hacking) il2cpp games by classes, methods, fields names.

ByNameModding Modding (hacking) il2cpp games by classes, methods, fields names. Status: Ready to use Why did I do it 1. In order not to update the off

null 97 Jan 2, 2023
Collections of AndLua modding related projects

AndLua Modding Projects Just my collections of AndLua modding related projects. Sorry, if I become file hoarder now, I collect everything but never us

null 11 Sep 24, 2022
Advanced modding framework for multiplayer modifications

A suite of tools and libraries to accelerate multi-player modification development.

MafiaHub 28 Dec 14, 2022
A romhack created by the Hylian Modding community as a collective project.

OotCommunityHack2022 A romhack created by the Hylian Modding community as a collective project. The structure of this repository is subject to change.

Hylian Modding 3 Aug 23, 2022
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 173 Jan 2, 2023
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World.

OpenXRay OpenXRay is an improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. S

null 2.2k Jan 1, 2023
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

Panda3D Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. Panda3D is open-source and free for a

Panda3D 3.6k Dec 31, 2022
Free, open-source, game engine and a 3D sandbox.

Work-in-Progress The official "early alpha" release should be available around April 2021 SGEEngine SGEEngine is an open source (MIT License), C++ cen

ongamex 72 Dec 7, 2022
Rogy-Engine- - My 3D game engine source code.

Rogy-Engine Development My 3D game engine. (NOT THE FINAL VERSION- Windows only) Features: PBR shading and reflection probes with parallax correction.

AlaX 97 Dec 28, 2022
Open-source, cross-platform, C++ game engine for creating 2D/3D games.

GamePlay v3.0.0 GamePlay is an open-source, cross-platform, C++ game framework/engine for creating 2D/3D mobile and desktop games. Website Wiki API De

gameplay3d 3.9k Jan 8, 2023
KlayGE is a cross-platform open source game engine with plugin-based architecture.

KlayGE KlayGE is a cross-platform open source game engine with plugin-based architecture. It's started since 2003. The explicit goal of KlayGE is: to

Minmin Gong 1.8k Dec 23, 2022
MIT Licensed Open Source version of Torque 2D game engine from GarageGames

We've moved! All torque engines have moved to a new organization, Torque Game Engines. Torque2D can be found at https://github.com/TorqueGameEngines/T

GarageGames 1.7k Dec 14, 2022
Ducktape is an Open source Light weight 2d Game Engine that gives utmost priority to user convenience.

Ducktape is an Open source Light weight 2d Game Engine that gives utmost priority to user convenience. It is written in c++ and uses SFML and Box2d for graphics and physics respectively.

Ducktape 102 Dec 30, 2022
SnaX Game Engine - Open Source

SnaX Game Engine License SnaX Game Engine - https://github.com/snaxgameengine/snax Licensed under the MIT License http://opensource.org/licenses/MIT.

SnaX Game Engine 14 Dec 1, 2022
CLUSEK-RT is a complex game engine written in C++ and the successor of the CLUSEK game engine

CLUSEK-RT is a complex game engine written in C++ and the successor of the CLUSEK game engine. This engine has been designed with a cross-platform design in mind. Thanks to Vulkan API it delivers a next-gen experience with ray tracing to both Linux and Windows platforms

Jakub Biliński 48 Dec 29, 2022