Skip to content

About

Game Engine focused on finding expressive but simple ways to build any game

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Latest commit

 

History

672 Commits

Folders and files

Repository files navigation

PaxEngine3

Language Standard Standard

PaxEngine3 is a game engine centered about designing an extensible, transparent, and intuitive API. Finding easy but sufficiently expressive ways for creating your game is the central motivation of this project. It does not provide sophisticated graphics yet but allows to integrate those at any time. Below you can find screenshots from three demo projects. The assets in these screenshots are custom or from opengameart.org, itch.io, and the Shovel Knight Press Kit.

Tiled Map Editor Import The TileDemo is a showcase for importing tile maps created in the Tiled Map Editor.

2D Platformer The Platformer is a tiny showcase for the usage of Box2D to model solid platforms. Sadly, the little green guy has no jumping implemented until today.

2D/3D Interaction Meshfold is a proof of concept for an idea where a two-dimensional game world is modelled as the surfaces of a three-dimensional shape given as a mesh.

Raymarcher Mandelbulb rendered with a small raymarcher implemented in the fragment shader.

3D Scene Small demo on rendering 3D meshes imported with the assimp library.

Architecture

PaxEngine3 is a plugin framework implemented in the libraries paxcore and paxutil. The Engine is started with a custom Game and a set of Plugins:

int PAX::Tile_main(int argc, char *argv[]) {
    int exitcode = 0;

    PAX::TileDemo::Demo game;

    PAX::SDL::SDLPlugin               sdl;
    PAX::OpenGL::OpenGLPlugin         openGL;
    PAX::SDL::OpenGL::SDLOpenGLPlugin sdlOpenGLLink;
    PAX::Tiles::Plugin                tiles;
    PAX::TileDemo::Plugin             demoPlugin;

    PAX::Engine &engine = PAX::Engine::Instance();
    engine.initialize(
            &game,
            {
                    &sdl,
                    &openGL,
                    &sdlOpenGLLink,
                    &tiles,
                    &demoPlugin
            }
    );
    exitcode = engine.run();

    return exitcode;
}

This example is taken from the TileDemo, shown in the first screenshot.

Plugins delivered with the engine can be found in the plugins directory and consist of:

  • paxassetimport: Importing of 3D assets such as meshes with assimp.
  • paxopengl: Implementation of rendering in OpenGL.
  • paxsdl: Implementation of window management via SDL. This plugin also contains the optional second plugin SDLOpenGLPlugin to link SDL against OpenGL.
  • paxphysics: Implementation of 2D rigid body physics with Box2D.
  • paxtiles: Tilemaps and importer for the Tiled map editor json format.
  • games: Directory of several demo games from which the screenshots above are taken.

paxcore

The central library of PaxEngine3, contains all primary artefacts and interfaces for extending the framework:

  • Engine: Root object of the entire software containing the game loop.
  • Game: Abstract class that is intended to be derived to setup your game! Manages all active worlds.
  • GameEntity: Describes game objects in the scene and is implemented as an Entity of our custom entity-property system Polypropylene.
  • World: Describes a scene of GameEntities and is implemented as an Entity of our custom entity-property system Polypropylene. There can be multiple acitve worlds at the same time to support offline rendering, minimaps, splitscreen, hud among others.
  • GameSystem: Interface for arbitrary systems operating on the game's state.
  • io: Contains classes for reading user input.
  • rendering: Sub-library with rendering facilities such as constructing scene graphs, camera and viewport management, framebuffers, and asset management.
  • service: Centralised management of services such as, io, resource management, allocation, instantiation of implementations for interfaces provided by plugins, window management, and important paths.

GameEntities and Worlds are implemented as entities of the custom entity-property system Polypropylene. This allows defining and changing worlds and game objects arbitrarily, flexibly, and serializable.

Building

PaxEngine3 is built with CMake, and a Nix flake provides all dependencies in pinned versions for reproducible builds on Linux and macOS.

nix build              # builds the engine with the plugins needed by Meshfold
nix build .#everything # builds all plugins and the demo games
nix develop            # development shell with all dependencies

Which plugins are built (and therefore which third-party libraries are needed) can be chosen. See doc/BUILD.md for the details, including how to use the engine in your own game and how to work on the engine and a game at the same time.

About

Game Engine focused on finding expressive but simple ways to build any game

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages