Skip to content

MrMetric/block_thingy

Repository files navigation

block thingy Coverity Scan Build Status

I mek GAme

What is this?

block_thingy is a Free and Open-Source voxel game engine. It is very much a work-in-progress, so don't expect to see lots of fancy features (yet). It is not a clone of Minecraft, although making a Minecraft clone with it will be possible once the required features are implemented.

Some features

  • uses cubic chunks and has no arbitrary low height limit
  • has 3-channel (RGB) flood fill lighting
  • FOSS (license is GPLv3)
  • will not delete your home folder
  • Y2K-compliant

How to clone

As this repository has submodules, you need to clone it recursively:

$ git clone --recursive https://gitlab.com/MrMetric/block_thingy.git

If you have already cloned it and did not do that, then you need to init and update submodules:

$ cd block_thingy
$ git submodule update --init --recursive

If you are using Windows, you must run fix_symlinks.bat before building or running block_thingy. This is because Git incorrectly translates each symbolic link to be just a text file with the link path as the content. If you are using Windows 10, you must enable developer mode for fix_symlinks.bat to work. Refer to this official Windows blog post for more information: Symlinks in Windows 10!.

Dependencies

thing included? license
FreeType 2 GPLv2 | FTL (compatible with GPLv3)
glad ✔ (direct) MIT
GLFW 3 zlib
GLM ✔ (submodule) MIT
libpng libpng
moodycamel::ConcurrentQueue ✔ (direct) simplified BSD | Boost
msgpack-c Boost
rhea 0.3 ✔ (submodule) MIT
strict variant ✔ (submodule) Boost
webgl-noise ✔ (submodule) MIT

GNU/Linux

Building (using CMake)

The only compilers that I guarantee will work are:

  • GCC == 8.1.0
  • Clang == 6.0.0

Other versions of these compilers might work, but I do not guarantee that they do. I also do not guarantee that any other compilers work, although I do try to stick to standard C++ and use #ifdefs around non-standard features and OS-specific things.

Make a directory to build in, and run cmake <repo root path>, along with whatever options you want CMake to use. For example, in the repo root:

$ mkdir build
$ cd build
$ cmake ..
$ make

The build type options are:

  • Debug
  • Release
  • RelWithDebInfo (default)
  • MinSizeRel

To specify Release (for example):

$ cmake .. -DCMAKE_BUILD_TYPE=release

Note: the build types are not case-sensitive.

To use a different compiler, there are two methods:

$ CC=/usr/local/bin/clang CXX=/usr/local/bin/clang++ cmake .."
$ cmake .. -DCMAKE_C_COMPILER="/usr/local/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/bin/clang++"

Running

To run, block_thingy needs to know where the game files are. It defaults to ., which is incorrect here—the folder is <repo root>/bin. Following from the above example, do this:

$ ./block_thingy ../bin

Windows

Building

I have tested building with Visual Studio Community 2017 version 15.7.2. I do not guarantee that any other version will work, but future 2017 versions and recent older versions should be fine.

Install vcpkg according to its instructions. Note that vcpkg's defaults to installing 32-bit libraries. Install the dependencies like this:

vcpkg install --triplet x64-windows freetype glfw3 libpng msgpack

If you are building for 32-bit, omit --triplet x64-windows.

Next, open projects/vc2017/block_thingy.sln with Visual Studio. Choose your desired configuration and architecture and build it (Build → Build Solution).

Running

Just run block_thingy.exe. It should automatically detect where the bin directory is. If it does not, specify the path as the first argument (refer to the GNU/Linux instructions above).

License

GPLv3, with one exception: creating non-free plugins is permitted. Opinions as to whether or not the GPL allows this vary, so I am explicitly allowing it here. If the maintainers of any GPL libraries I use object to this, let me know and I will stop using your library.

TODO

  • add a more useful error message for when game files are not found
  • make block accesses faster (this will make meshing and light propagation faster)
  • add other meshing methods [1] [2]
  • allow using image formats other than PNG (JPEG, WebP, BMP, …)
  • make physics framerate-independent
  • move the commands from Game to somewhere else
  • separate chunk data / rendering (this decouples meshing from chunking, and has the side benefit of allowing mesh dimensions to not match chunks)
  • use an event queue and use events more (look at: keypress, mousemove, …)
  • continue running when adding inotify watches fails
  • watch files on Windows®
  • add more things to the feature list
  • other stuff that I am too lazy to say here

Note

This repository exists in multiple places:

GitLab is the preferred location for posting issues and submitting merge requests (AKA pull requests)

About

A game engine based on 3D tiles (W.I.P.)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages