Skip to content

bernardobrust/SimpleGameEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Game Engine

Version: 0.0.1 p2, "Wayland".

What

A repository I decided to make just for fun to keep software engineering sharp while grinding throu my bachelor's math classes (don't get me wrong, I love Calculus and Linear Algebra, but there isn't a lot of programming in there). Also to try out a few things:

  • Post-Modern C, a.k.a C but we use namespaces (good for organization), default function values (usefull for when the parameter has a commonly used value) and templates (when justifiable, such as data structures and math). Also STL for prototyping stuff while we don't have our own custom data structures.
  • Building a platform layer from scratch (less bloat, even tho I used lX11 for X11);
  • CPU rendering, because GPU programming is an absolute mess, so it's justifiable if it's not requiered (a.k.a nice graphics, complex geometry);
  • Data oriented design (SIMD go brrrrr) and compression oriented programming (check sources);
  • Creating a simple puzzle game (because I've been playing a lot of those recently).
  • Unit builds (a.k.a including the C++ sources directly into the entry point).

Please don't use this as an actuall engine, this is just a reference/POC/pet project.

Development cycle

Make simple game using the current version -> see how engine got in the way / should provide better support -> add that to the engine.

Platforms

GNU + Linux

There is a simple support for X11 built using lX11, I didn't want to take too much time with that as even tho it's the most used it's very old and under/un documented.

However, the wayland layer was built from scratch, as it's more modern and better documented. If you're planning on using this project I recommend you use wayland.

Either way I always test with both.

Building

Clone the repo and enter it with:

  • A C++ compiler that supports concepts (used heavily in the math library) (I've been using g++ 16.1.0, it's likely not needed but it's what has been working for me)
  • GNU Make
  • If building with GNU + Linux with X11 windowing, lX11 is also requiered

Then for a default debug build:

make -j$(nproc)

For a default release build:

make -j$(nproc) MODE=release

Configuration details: Defaults:

  • C++ compiler: g++. clang++ likely also works (I didn't test)

The defaults below can be changed with OPTION_NAME=value:

  • TARGET: editor. Other: test, benchmark (both unimplemented)
  • MODE: debug. Other: release
  • WINDOWING (only used for GNU + Linux): X11. Other: Wayland
  • OS: gnu_linux. Other: windows (unimplemented)

Tooling

A sample config for Focus Editor is provided along with the project, only requiering you to copy it to where your focus projects are and setup the absolute path to the root (compiles with F1 and runs with F2, all defaut config).

You can easily configure autobuils and runs for your platforms as well with the scripts under scripts/.

Profiling is done using perf.

References

Check sources.

Progress

Progress for each version is tracked at todo.

By version I mean feature tracking, each version has a goal and I update based on that, so a version may have parts (such as "0.0.1 beta p2").

Only the progress tab of the previous version is stored. I don't think a changelog is requiered since it's a hobby project.

About

A super simple game engine in Post-Modern C

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors