Skip to content

Open source "Minecraft-like" game with multiplayer support.

License

Notifications You must be signed in to change notification settings

dominicsherry1/open-builder

 
 

Repository files navigation

Open Builder

C++ CI

Open source Minecraft-like voxel sandbox game with multiplayer support.

More information about the project can be found in the Open Builder Wiki

This was made mostly for a YouTube series which can be found here: Lets Code A Multiplayer Voxel Game

Screenshots

Terrain gen:

player

Early screenshot: player

Project Structure

A quick overview of the code and project structure can be found in the wiki article:

Project Structure

Contributing

Please see main article here:

Contributing

Installing, Building and Running

Windows [Visual Studio]

Please use the links below:

Build With Visual Studio

Running the Unit Tests With Visual Studio

Linux

We offer an automated installer for a bunch of different Linux distributions including Debian, Arch/Manjaro and Fedora. It can be ran via

sudo bash scripts/install.sh

from the project root directory. If you are interested in the manual way of installation, check below instructions. To then finally run the application see Running below.

MacOS

First install SFML:

brew install SFML

Next, build with cmake: (from root directory)

mkdir build
cd build
cmake ..
make

Run using:

./build/open-builder

Can also run client and server separately:

./build/open-builder -server 8
./build/open-builder -client xyz

#### Manual Installation

##### Libraries

These are required for the project, and can usually be downloaded via your distribution-specific package manager:

```sh
sudo apt install libsfml-dev                # Debian/Ubuntu
sudo pacman -S sfml                         # Arch/Manjaro
sudo yum install sfml-devel                 # Fedora/RHEL

Feel free to create a pull request to add support for your system's package manager!

If there is no mirror available, then you can download and manually install them from their respective websites:

SFML Download

Building

This project uses CMake to create the build files. You can install the tool using your package manager:

sudo apt install cmake  # Debian
sudo pacman -S cmake    # Arch/Manjaro
sudo yum install cmake  # Fedora/RHEL

First clone the project and cd:

git clone https://github.com/Hopson97/open-builder.git
cd open-builder

To build, at the root of the project:

sh scripts/build.sh

Running

To run, at the root of the project:

sh scripts/run.sh               # Launches both client and server  
sh scripts/run.sh -server 8     # Launches server only, allowing upto 8 connections
sh scripts/run.sh -client xyz   # Launches client, with player name xyz

To build and run in release mode, simply add the release suffix:

sh scripts/build.sh release
sh scripts/run.sh release <args>

Unit Tests

The unit tests can be ran using

sh scripts/tests.sh

Similar Projects

This project was heavily influenced by the following projects:

Minetest

Another open source voxel sandbox game, one of the original ones. Also created using C++, and also has multiplayer support.

Website - GitHub

Terasolgy

Open source multiplayer voxel sandbox game created using Java like the original minecraft.

Website - GitHub

Craft

Minecraft clone created by Fogleman in C.

Website - GitHub

Special Thanks

D3PSI - Added GitHub actions, and created the install.sh file to automate the installation process on Linux systems

CalvinSpace - Created a lot of the textures for the blocks

History

Originally, this was going to be a Zombie game, but I got very bored of that very quickly, and so changed the project to be a voxel game instead.

As a result of this, the code was created for the zombie game, so when I decided to switch over, the code got messy very quickly.

To combat this, I did a massive refactor in just over 2 weeks, re-creating large parts of the project.

The before-refactor-project can be found here

The commit that adds the refactored code can be found here

About

Open source "Minecraft-like" game with multiplayer support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 85.2%
  • CMake 6.7%
  • Lua 3.1%
  • GLSL 2.7%
  • Shell 1.7%
  • Batchfile 0.3%
  • C 0.3%