Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Klaim/megastructures-prototypes

Repository files navigation

MEGASTRUCTURES: Prototypes

This repository contains the code and assets of the prototypes of the game MEGASTRUCTURES

Presentation and links

Status

github-ci

Prototype 1 - Overview

Presentation Slides

For this prototype the goal is to evaluate the C++-based techs/tools stack for the game by building a minimalistic roguelike game with the following elements being used for evaluation:

  • Bleeding-edge C++ (beyond C++ 23 where possible)
  • build2 as build-system and dependency manager, version v0.16.0 or higher.
  • View separate from model (proto1 is the executable acting as a view, proto1-model is the model library)
  • Entity Component System setup on the model (using entt as implementation)
  • C++ coroutines to implement the action-turn logic (using std::generator)

The view is implemented using SFML and Dear IMGUI.

See the presenttion above for more details.

Prototye 2 - Overview

Presentation Slides

For this prototype we will use Godot as the "view" implementation and a C++ library as the "model". The goal is mainly to evaluate how difficult it makes working on the game. Depending on the resuts, we might decide to go with Godot, or try with Unreal or switch to a C++ graphic rendering library instead.

  • proto2/ : the Godot project. It requires the GDExtension to be installed to work or even be open successfully in the Godot editor. It contains the GDScripts that provides the visual representation and input handling for the prototype. The rest comes from the other packages/libraries.
  • proto2-view/ : this is our GDExtension (Godot plugin loaded at startup of the game or editor) exposing the information necessary for the GDScripts to work, including the state of the model and ways to request actions and events resulting from them.
  • proto2-model/ : started as a copy of the model library in prototype1, this is the whole game's logic and core data. Features are first added here then handled in the two other layers.

Prototype 3 - Overview

NOTE: this prototype was not started yet.

For this prototype we will experiment with implementing a special action-turn system based on time granularity with the goal of allowing high-speed combat (including hacking).

Prototype 4 - Overview

NOTE: this prototype was not started yet.

For this prototype we will consider using an hexagonal representation of space (knowing that the final game will have a 3D grid ).

Development

As these are prototypes I (the author) will not spend too much time setting up stuffs to help with participating to this project, sorry in advance. If I decide to make the commercial game open-source I will however make all the necessary setup to ease helping the project.

However if you still want to build the project yourself, here are some instructions:

Requirements:

You need to install:

  • a toolchain: Visual Studio C++/MSVC, LLVM/clang or gcc depending on your platform and choice:
    • clang must be v17.x (or higher if you modify the build configs);
    • msvc must be the last available version from Visual Studio 2022 (or preview)
    • gcc must be 13.x or higher
  • on Windows I recommend using Git-Bash (which is installed with git) to run the commands and scripts below;
  • build2 as buildsystem and dependency manager. If you are not familiar with build2 I recommend to read at least the toolchain introduction, however you don't need to read it to proceed with the following instructions - you might need to read it if you want to submit a PR.
    • we might be using the stage (aka not finished/bleeding-edge) version of build2 for which you can find the install script there: https://stage.build2.org/0/

Then clone this repository and go with a console in the root of the clone. Then decide which way to go below.

I Just want to build and run the prototypes:

Once build2 is installed, if you just want to build and be able to run the projects:

bdep init -C build-clang-release @clang-release cc config.config.load=build2-configs/clang-release.config config.install.root=./install/
b install

If nothing goes wrong you will find the executable in ./install/. These commands gather the dependencies, build the projects and install the whole thing into that directory.

Note that due to a missing filtering feature in build2, all the headers from the libraries used by the executables will also be installed this way. Once the filtering feature is made available we will just install the executables and it's dependencies, not it's dependencies headers.

I want to develop:

  1. To create the build configurations for development and initialize all the projects in them:

    ./init-configs.sh <toolchain>

    Replace <toolchain> by msvc, clang or gcc (see the build2-configs/directory for a list of possible configs). For example:

    ./init-configs.sh clang
    ./init-configs.sh msvc

    This needs to be done only once per toolchain.

    If you want to erase all current configurations and restart from scratch, add --clean. For example:

    ./init-configs.sh clang --clean

    This script create the configurations for the toolchain and initialize all the projects in it. The first toolchain's debug configuration will be set as the default when using build2 without specifying a configuration.

    NOTE: for simplicity, we only initialize default toolchains in this script, if you want to setup a more specific way or use a specific version of a toolchain, feel free to tweak the script or use build2 commands to achieve your goal.

  2. To build the projects:

    bdep update

    This will only build in the default configuration (debug). To build in all the initialized configurations, add --all or -a. To build in specific configurations, use their alias as @<toolchain>-debug or @<toolchain>-release after replaceing <toolchain> by the toolchain name. See the build2-configs/ directory for all the possibilities.

    bdep update @msvc-debug @clang-debug  # Build in debug configurations using msvc and clang
    bdep update -a # Build in all configurations initialized
  3. To build and run the tests:

    bdep test -a # build and run all the tests of all the configurations
  4. To build and install (in ./install/) the projects:

    • Using the default build:
      b install
    • Using a specific configuration:
      b install: build-<toolchain>-<buildmode>
      For example:
      b install: build-clang-release

Read the build2 documentation for details.

About

Prototypes for the MEGASTRCUTURE roguelike game project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published