Rework structure
|
@ -11,11 +11,14 @@ jobs:
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y build-essential cmake libgl1-mesa-dev libglfw3-dev libglew-dev libsqlite3-dev zlib1g-dev curl zip lua5.3
|
sudo apt-get install -y build-essential cmake lua5.3 curl zip
|
||||||
- name: Build
|
- name: Build ubuntu snapshot
|
||||||
run: |
|
run: |
|
||||||
./snapshot.sh
|
./snapshot.sh
|
||||||
- name: Upload snapshot
|
- name: Build windows snapshot
|
||||||
|
run: |
|
||||||
|
./snapshot.sh mingw
|
||||||
|
- name: Upload snapshots
|
||||||
env:
|
env:
|
||||||
SECRET: ${{ secrets.ELIDRAGON_UPLOAD_TOKEN }}
|
SECRET: ${{ secrets.ELIDRAGON_UPLOAD_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,30 +1,4 @@
|
||||||
# CMake
|
build*/*
|
||||||
CMakeLists.txt.user
|
!build/debug.sh
|
||||||
CMakeCache.txt
|
!build/debug_loop.sh
|
||||||
CMakeFiles
|
dragonblocks_alpha*
|
||||||
CMakeScripts
|
|
||||||
Testing
|
|
||||||
Makefile
|
|
||||||
cmake_install.cmake
|
|
||||||
install_manifest.txt
|
|
||||||
compile_commands.json
|
|
||||||
CTestTestfile.cmake
|
|
||||||
_deps
|
|
||||||
|
|
||||||
# Binaries
|
|
||||||
dragonblocks
|
|
||||||
dragonblocks_server
|
|
||||||
dragonblocks_alpha-*.zip
|
|
||||||
dragonblocks_alpha
|
|
||||||
|
|
||||||
# Data
|
|
||||||
client.conf
|
|
||||||
server.conf
|
|
||||||
*.sqlite
|
|
||||||
*.sqlite-journal
|
|
||||||
screenshot-*.png
|
|
||||||
|
|
||||||
# Generated code
|
|
||||||
version.h
|
|
||||||
types.c
|
|
||||||
types.h
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
url = https://github.com/datenwolf/linmath.h
|
url = https://github.com/datenwolf/linmath.h
|
||||||
[submodule "deps/perlin"]
|
[submodule "deps/perlin"]
|
||||||
path = deps/perlin
|
path = deps/perlin
|
||||||
url = https://github.com/czinn/perlin
|
url = https://github.com/dragonblocks/perlin
|
||||||
[submodule "deps/stb"]
|
[submodule "deps/stb"]
|
||||||
path = deps/stb
|
path = deps/stb
|
||||||
url = https://github.com/nothings/stb
|
url = https://github.com/nothings/stb
|
||||||
|
@ -21,10 +21,28 @@
|
||||||
url = https://github.com/dragonblocks/dragonnet
|
url = https://github.com/dragonblocks/dragonnet
|
||||||
[submodule "deps/linenoise"]
|
[submodule "deps/linenoise"]
|
||||||
path = deps/linenoise
|
path = deps/linenoise
|
||||||
url = https://github.com/msteveb/linenoise
|
url = https://github.com/dragonblocks/linenoise
|
||||||
[submodule "deps/protogen"]
|
[submodule "deps/protogen"]
|
||||||
path = deps/protogen
|
path = deps/protogen
|
||||||
url = https://github.com/dragonblocks/protogen
|
url = https://github.com/dragonblocks/protogen
|
||||||
[submodule "deps/getline"]
|
[submodule "deps/getline"]
|
||||||
path = deps/getline
|
path = deps/getline
|
||||||
url = https://github.com/dragonblocks/getline
|
url = https://github.com/dragonblocks/getline
|
||||||
|
[submodule "deps/glfw"]
|
||||||
|
path = deps/glfw
|
||||||
|
url = https://github.com/glfw/glfw
|
||||||
|
[submodule "deps/glew-cmake"]
|
||||||
|
path = deps/glew-cmake
|
||||||
|
url = https://github.com/Perlmint/glew-cmake
|
||||||
|
[submodule "deps/freetype"]
|
||||||
|
path = deps/freetype
|
||||||
|
url = https://gitlab.freedesktop.org/freetype/freetype
|
||||||
|
[submodule "deps/sqlite3-cmake"]
|
||||||
|
path = deps/sqlite3-cmake
|
||||||
|
url = https://github.com/dragonblocks/sqlite3-cmake
|
||||||
|
[submodule "deps/stpcpy"]
|
||||||
|
path = deps/stpcpy
|
||||||
|
url = https://github.com/dragonblocks/stpcpy
|
||||||
|
[submodule "deps/zlib"]
|
||||||
|
path = deps/zlib
|
||||||
|
url = https://github.com/dragonblocks/zlib
|
||||||
|
|
46
BUILDING.md
|
@ -1,50 +1,34 @@
|
||||||
# Building instructions
|
# Building instructions
|
||||||
|
|
||||||
CMake is used for compiling. Make sure to clone the repository recursively:
|
## Dependencies
|
||||||
|
To build anything you need Git, CMake, Lua, Bash and GCC. Make sure these dependencies are installed on your system.
|
||||||
|
All other dependencies are included as submodules, compiled automatically and statically linked.
|
||||||
|
Make sure to clone the repository recursively:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
|
git clone --recurse-submodules https://github.com/dragonblocks/dragonblocks_alpha.git
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
To build anything you need CMake and Lua. The ZLib development library is needed as well.
|
|
||||||
The development versions of OpenGL, GLFW3, GLEW and Freetype are required to build the client.
|
|
||||||
For building the server the SQLite3 development library is required.
|
|
||||||
|
|
||||||
|
|
||||||
Ubuntu / Debian:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt install build-essential cmake zlib1g-dev libgl1-mesa-dev libglfw3-dev libglew-dev libfreetype-dev libsqlite3-dev lua5.3
|
|
||||||
```
|
|
||||||
|
|
||||||
FreeBSD:
|
|
||||||
|
|
||||||
```csh
|
|
||||||
sudo pkg install cmake gcc lzlib mesa-devel glfw glew freetype sqlite3 lua
|
|
||||||
```
|
|
||||||
|
|
||||||
OpenBSD:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo pkg_add cmake lzlib glfw glew freetype sqlite3 lua
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building a debug build
|
## Building a debug build
|
||||||
By default CMake will make a Debug build if nothing else is specified. Simply use
|
By default CMake will make a debug build if nothing else is specified. Simply use
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd src
|
cmake -B build -S src
|
||||||
cmake .
|
cd build
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
to build the dragonblocks client and server.
|
to build the dragonblocks client and server.
|
||||||
If you use a debug build, the singleplayer script should be invoked from the src/ directory, because that's where the binaries are located.
|
If you use a debug build, the singleplayer script should be invoked from the build/ directory, because that's where the binaries are located.
|
||||||
|
|
||||||
## Building a snapshot
|
## Building a release snapshot
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Native snapshot
|
||||||
./snapshot.sh
|
./snapshot.sh
|
||||||
|
|
||||||
|
# Crosscompiling for windows (requires i686-w64-mingw32-gcc-posix)
|
||||||
|
./snapshot.sh mingw
|
||||||
```
|
```
|
||||||
This script will create a snapshot zipfile.
|
|
||||||
|
Creates snapshot zipfiles.
|
||||||
|
|
49
README.md
|
@ -1,20 +1,30 @@
|
||||||
# Dragonblocks Alpha
|
# Dragonblocks Alpha
|
||||||
|
|
||||||
A multiplayer voxelgame for POSIX systems.
|
A multiplayer voxelgame for POSIX systems.
|
||||||
|
It has been ported to Linux, Windows, FreeBSD and OpenBSD, but may work on other systems.
|
||||||
|
|
||||||
Head to <https://www.elidragon.tk/dragonblocks_alpha/> for ubuntu snapshot and release builds.
|
Head to <https://www.elidragon.tk/dragonblocks_alpha/> for snapshot and release builds (CURRENTLY DOWN).
|
||||||
|
|
||||||
## Invocation
|
## Invocation
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
./DragonblocksServer <port>
|
# on posix
|
||||||
./Dragonblocks <address> <port>
|
./dragonblocks_server "[<address>]:<port>"
|
||||||
|
./dragonblocks_client "[<address>]:<port>"
|
||||||
|
|
||||||
|
# on windows
|
||||||
|
dragonblocks_server.exe "[<address>]:<port>"
|
||||||
|
dragonblocks_client.exe "[<address>]:<port>"
|
||||||
```
|
```
|
||||||
|
|
||||||
or alternatively:
|
or alternatively:
|
||||||
|
|
||||||
```bash
|
```sh
|
||||||
|
# on posix
|
||||||
./singleplayer.sh
|
./singleplayer.sh
|
||||||
|
|
||||||
|
# on windows
|
||||||
|
singleplayer.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
|
@ -35,35 +45,10 @@ or alternatively:
|
||||||
| F11 | Toggle fullscreen |
|
| F11 | Toggle fullscreen |
|
||||||
| ESC | Pause / unpause game |
|
| ESC | Pause / unpause game |
|
||||||
|
|
||||||
## Dependencies
|
## System Requirements
|
||||||
|
|
||||||
Both the client and the server depend on ZLib.
|
|
||||||
The client depends on GLFW3, OpenGL, GLEW and Freetype.
|
|
||||||
The server depends on SQLite3.
|
|
||||||
|
|
||||||
Ubuntu / Debian:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt install zlib1g libgl1-mesa-dri libglfw3 libglew2.1 libfreetype6 libsqlite3-0
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
FreeBSD:
|
|
||||||
|
|
||||||
```csh
|
|
||||||
sudo pkg install lzlib mesa-dri glfw glew freetype sqlite3
|
|
||||||
```
|
|
||||||
|
|
||||||
OpenBSD:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo pkg_add lzlib glfw glew freetype sqlite3
|
|
||||||
```
|
|
||||||
|
|
||||||
## Setup Requirements
|
|
||||||
Dragonblocks Alpha targets PCs only. Non x86-64 platforms may work, however there is no guarantee whatsoever.
|
Dragonblocks Alpha targets PCs only. Non x86-64 platforms may work, however there is no guarantee whatsoever.
|
||||||
You need a POSIX system conforming to the ISO C and POSIX 2008 standards. However, so far only GNU/Linux systems, in particular Ubuntu and Debian, have been tested.
|
You need a POSIX system conforming to the ISO C and POSIX 2008 standards. However, so far only GNU/Linux systems, in particular Ubuntu and Debian, have been tested.
|
||||||
The minimum OpenGL version is 4.6.0. Dragonblocks has been tested on Intel Integrated and NVIDIA GPUs, however other graphics cards should work as well.
|
The minimum OpenGL version is 4.2.0. Dragonblocks has been tested on Intel Integrated and NVIDIA GPUs, however other graphics cards should work as well.
|
||||||
A PC with at least 4 CPU cores is recommended, but not necessarily required.
|
A PC with at least 4 CPU cores is recommended, but not necessarily required.
|
||||||
|
|
||||||
## Current Features
|
## Current Features
|
||||||
|
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 674 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 203 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 211 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 686 B After Width: | Height: | Size: 686 B |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -37,7 +37,7 @@ alacritty -e bash -c "
|
||||||
" &
|
" &
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
|
|
||||||
gdb --command $DEBUG_DIR/client_script ./dragonblocks
|
gdb --command $DEBUG_DIR/client_script ./dragonblocks_client
|
||||||
|
|
||||||
kill `cat $DEBUG_DIR/server_pid`
|
kill `cat $DEBUG_DIR/server_pid`
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 84c7e7cb1e0a6ea4102ca785cca31a3e66f34a48
|
Subproject commit 305d3f995280196f4c88146b03f09b94191e8cca
|