git clone https://www.tausquared.net/mc4.git
Multiplayer, browser-based voxel building game inspired by Minetest
w
/a
/s
/d
: move aroundspace
: jump or fly up/downj
: toggle fastk
: toggle flyalt
(hold) : sprintr
(hold) : peek backwards in the 4th dimensionf
(hold) : peek forward in the 4th dimension[
/PageDown
(hold) : move backwards once in the 4th dimension]
/PageUp
(hold) : move forwards once in the 4th dimensiont
//
: open chate
: inventorye
/esc
: close windowe
is recommended, esc
can't relock the mouseF4
: info overlay/help
: command reference/grantme [whatever]
: give yourself a privilege/grantme fast
/grantme fly
/grantme creative
/creative on
//creative off
: creative modeThe web client is licensed under GPLv3+, and the server is AGPLv3+. See LICENSE and the top of each source code file for license information. Library and asset license files are spread throughout the source tree, links are listed below.
Install build dependencies:
# apt-get install make g++ libwebsocketpp-dev libboost-dev libsqlite3-dev libssl-dev
If your distro doesn't package libwebsocketpp-dev
, grab it from here and compile the server with something like:
$ CPPFLAGS="-I/path/to/websocketpp-x.x.x/" make -j4
The server has optional TLS support, which is strongly recommended for production use (the client-server protocol relies on it for security). If you're running locally or just testing, this is not necessary. The decision as to whether or not to use TLS must be made at compile time.
Compile without SSL/TLS enabled (recommended for testing or local use):
$ make -j4
Compile with SSL/TLS enabled (strongly recommended for production use):
$ CPPFLAGS=-DTLS make -j4
Any time you recompile with different CPPFLAGS
, be sure to make clean
first.
The server's runtime dependencies are libsqlite3
and libssl1.1
,
but these will have been installed alongside the build dependencies.
The server can be configured using an ini file (see config_example.ini) or on the command line. For example:
$ ./mc4-server --config-file config_example.ini
$ ./mc4-server -o server.port=8081
$ ./mc4-server --config-file config_example.ini -o "server.motd=-- Welcome to the server.\n-- Have a nice day."
Note that command line options are processed in the order given, so if you want to override an option from the config file, put your override after the config file.
By default, the server will run on port 8080
and store data to an SQLite database in test_map.sqlite
.
$ ./mc4-server
If you're using TLS, take a look at config_example.ini and set the appropriate options pointing to certificate files and such.
If you're more serious about running a server, take a look at the resources in server/deploy/
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See notices
at the top of each source code file for more information.
The game will probably work. It might stop working. It might have serious security vulnerabilities. No guarantees. (But if you do notice anything, please file an issue and/or pull request.)