Skip to content

Experimental game-engine sandbox using OpenGL and ECS.

Notifications You must be signed in to change notification settings

numpad/ecs-sandbox

Repository files navigation

ecs-sandbox

Personal entity component system (ECS) sandbox. Some day this will become a fun game I want to play.

Features

  • realtime, completely destructible terrain using the marching cubes algorithm.
  • emergent gameplay trough flexible combinations of components.
  • performance. instanced rendering and efficient ecs design allow for updating and rendering hundreds of thousand entities.
  • first-class modding support using the lua programming language. if you don't like something, or are missing a feature you can always get your hands dirty and implement it yourself.
  • procedural generation. technically infinite replayability as a new, unique level is generated every run.
  • thousands of items. many different and unique base items, item combinations and random modifiers.
  • free, non-linear gameplay. you decide how you want to play, the game tries to be as emergent and permissive as possible while trying to give few restrictions. there is no hard goal or forced playstyle.

(Note: these are the features and goals I want to achieve, while the building blocks for most features are already set, nearly all of them are still WIP or not even implemented at all.)

Screenshots

A short eye-catcher showing the latest features of the game and engine, while keeping a simple history of development milestones. v0.1

Version Screenshot & Notable features
v0.1 Added basic deferred shading

Changelog

Keep track of the current development status on the feature board. Planned, in-development and implemented features will be listed there.

Less frequently updated but still important is the bug tracker. This serves as a catch-all for noting any kind of bugs appearing. While not required, a detailed description of the bug and it's cause is greatly appreciated.

v0.2 - (unreleased)

  • Added decal render system & components

v0.1 - (2020-07-10)

  • Added changelog and version tracking
  • Added deferred shading

Building

Compiling the game should be pretty straightforward, head over to the build instructions to learn more about it!
You can also simply download a prebuilt binary. Keep in mind that these get updated less frequently.

Libraries

All libraries included and/or required for the game. Some libraries are not yet used but already included as they are pretty much guaranteed to be of use.

Library Version License Description
glm 0.9.9 MIT / modified MIT The mathematics library for vectors, matrices and everything inbetween.
glfw 3.4.0 zlib Multi-platform OpenGL library for creating windows with an OpenGL context and receiving inputs.
entt 3.4.0 MIT Library for the ECS architectural pattern, also comes with a great observer pattern implementation.
dear imgui 1.82 MIT GUI library for debugging and visualization.
FastNoise 0.4.1 MIT Noise generation library with support for many different noise algorithms.
sol2 3.2.0 MIT Generating bindings for and working with Lua.
Lua ? MIT A powerful, efficient, lightweight and embeddable scripting language.
cereal 1.2 3-clause BSD A serialization library supporting many target formats, both binary and human readable.
gl3w ? public domain Simple OpenGL core profile loading library.
stb_image.h 2.22 public domain / MIT Image loading library.
FreeType 2 2.? GPLv2 / FTL Font rasterization library.
OpenAL-soft ? LGPLv2 A software implementation of the OpenAL 3D audio API.
Yoga 1.19.0 MIT Layout engine implementing flexbox.

Assets

All assets that are used in the game. Some assets currently in the project are not meant to be in the final release (because of licensing problems, or simply because they do not fit the game and are just an experiment or for debugging purposes) and will soon be completely removed. Assets listed in the table below are planned for the final release.

Asset Creator License Category
16x16 Dungeon Tileset 0x72 CC-0 texture / sprite

Resources

An (incomplete) list of the resources I used in no particular order.

Website Description
learnopengl.com The main resource I used for learning (modern) OpenGL.
docs.gl Organized version of the OpenGL reference.
OpenGL Reference Pages The official OpenGL API reference.
entt wiki The entt tutorial / API reference.
ECS back and forth An ongoing series about deeper insights into the design, implementation and usage of ECS. From the author of entt.
open.gl Another resource for learning OpenGL.
Game programming patterns Learning about architectural patterns for game engines and games in general.
opengl-tutorial.org Yet another learning resource for modern OpenGL.
The book of shaders A great book for learning more about the OpenGL shading language.
Polygonizing a scalar field. The original implementation of the marching cubes algorithm.
0fps A blog covering many topics related to game programming.
glm API documentation The glm API reference.
decals Drawing decals using deferred rendering.
more decals More information about drawing decals and their weak spots.
even more decals Even more decal information.

License

I have not yet decided on a license.
The goal of this project is mostly for learning purposes, both for me and other developers in a similar position. But as this project grows, ultimately my plan is to release it as a real game for people to buy. Therefore it is still undecided how I want to handle open-source, monetization and everything related to this. Feel free to use my project as a learning resource until I come to a decision.