GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://cubosengine.org
MIT License
83 stars 36 forks source link

feat(ecs): add Cubos::start and Cubos::update #1224

Closed RiscadoA closed 4 months ago

RiscadoA commented 4 months ago

Description

Splits the existing run method into two methods, start and update:

This is necessary for the standalone Tesseratos app, as we need to be able to run a single frame of the game inside a system of the Tesseratos application. This will probably look something like:

cubos.system("update Game").call([](Game& game) {
  if (!game.paused)
  {
    if (!game.cubos.update())
    {
      // Game stopped
    }
  }
});

Checklist

github-actions[bot] commented 4 months ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1224/ on branch gh-pages at 2024-06-04 17:01 UTC

RiscadoA commented 4 months ago

Bruh the static analysis action is bugged again. I'm not sure what's causing this or how to fix it.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.32%. Comparing base (50e078c) to head (a8a9312).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1224 +/- ## ========================================== - Coverage 40.34% 40.32% -0.03% ========================================== Files 351 351 Lines 26050 26061 +11 ========================================== - Hits 10509 10508 -1 - Misses 15541 15553 +12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RiscadoA commented 4 months ago

Ty for the reviews!