sourencho / ungroup_game

A multiplayer game about temporary alliances written with a custom engine in C++ and SFML
13 stars 1 forks source link
2d-game cpp custom-engine game multiplayer-game sfml

ungroup

Build Status

demo

Intro

A multiplayer game where the main mechanic to win is forming temporary alliances.

Custom engine written in C++11 using the SFML framework.

Created by @sourenp and @copacetic mostly for learning purposes.

Build

Cmake variables

Variable Meaning
UNGROUP_STATIC Statically link SFML
BUILD_TESTS Build tests
ONLY_SERVER Only build server
ONLY_CLIENT Only build client

Unix

1. Clone this repo

git clone https://github.com/SourenP/ungroup_game.git
cd ungroup_game

2. Install/Download requirements

Windows

1. Clone this repo

git clone https://github.com/SourenP/ungroup_game.git
cd ungroup_game

2. Install/Download requirements

The server currently doesn't run on windows (#194)

.\build\src\server\ug-server.exe

Testing

Game Engine

Custom engine written in C++11 using the SFML framework.

Features:

Development

Playtesting

Create a new release and write notes in Wiki: Playtesting

Compiliation

Writing Tests

Todo

todo(username|#issue|date): description

Style

Debugging

Compile in debug mode

To compile in debug mode add the flag -DCMAKE_BUILD_TYPE=Debug:

cmake -DCMAKE_BUILD_TYPE=Debug -S . -B build
cmake --build build -- -j

Compiling in debug mode will give you stacktraces for segfaults and detect memory issues.

Profiling

Use gperftools (cpuprofile tutorial)

Vscode lldb

In vscode on a mac you can debug using lldb.

1. Install the extention "Native Debug"

Link: https://marketplace.visualstudio.com/items?itemName=webfreak.debug

2. Setup tasks

Set tasks.json to: https://gist.github.com/SourenP/46d3f5282de7fd7ecaf681384fc8e4dc

3. Setup launch

Set launch.json to: https://gist.github.com/SourenP/47746e0c2b39545975f8e7768e281849

4. Run tasks

Debug build:

Debug run:

Travis CI Debug Build

Run this command to enable debug mode on a specific build: https://gist.github.com/SourenP/3ae15ba0e634a3e0ccceebbb7a27a391

Resources

Game Engine

Physics

Networking

Graphics

Game Design

C++

SFML

Misc