• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JackAshwell11 / Hades / 18802797612

25 Oct 2025 12:04PM UTC coverage: 73.178% (+1.8%) from 71.41%
18802797612

push

github

JackAshwell11
Descoped the project by changing a few things:
- Removed melee and special attacks. These will be replaced with ranged attacks and a charged ranged attack.
- Merged the game options and load game scene into one so the game can be controlled before a new game is started instead of before each run.
- Removed saving functionality as this was unnecessary for the core idea of the game.
- Removed the lobby and integrated the shop directly into the game view.
- Removed many parts of the shop system so we can just focus on component unlocks. Component upgrades may be brought back at a later point, but they will need to be done via separate components.

This will allow me to focus on delivering the core parts of the game without scope creep.

1572 of 2821 branches covered (55.72%)

Branch coverage included in aggregate %.

90 of 93 new or added lines in 16 files covered. (96.77%)

52 existing lines in 6 files now uncovered.

2365 of 2559 relevant lines covered (92.42%)

15573.46 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.74
/src/hades_engine/src/game_engine.cpp
1
// Related header
2
#include "game_engine.hpp"
3

4
// Std headers
5
#include <utility>
6

7
// Local headers
8
#include "ecs/systems/armour_regen.hpp"
9
#include "ecs/systems/attacks.hpp"
10
#include "ecs/systems/effects.hpp"
11
#include "ecs/systems/inventory.hpp"
12
#include "ecs/systems/movements.hpp"
13
#include "ecs/systems/physics.hpp"
14
#include "ecs/systems/shop.hpp"
15
#include "generation/map.hpp"
16

17
namespace {
18
/// The interval in seconds between enemy generations.
19
constexpr double ENEMY_GENERATION_INTERVAL{1.0};
20
}  // namespace
21

22
GameEngine::GameEngine()
10✔
23
    : registry_(std::make_shared<Registry>()),
10✔
24
      game_state_(std::make_shared<GameState>(registry_)),
10!
25
      input_handler_(std::make_shared<InputHandler>(registry_, game_state_)) {
10!
26
  registry_->add_system<ArmourRegenSystem>();
10!
27
  registry_->add_system<AttackSystem>();
10!
28
  registry_->add_system<DamageSystem>();
10!
29
  registry_->add_system<EffectSystem>();
10!
30
  registry_->add_system<FootprintSystem>();
10!
31
  registry_->add_system<InventorySystem>();
10!
32
  registry_->add_system<KeyboardMovementSystem>();
10!
33
  registry_->add_system<PhysicsSystem>();
10!
34
  registry_->add_system<ShopSystem>();
10!
35
  registry_->add_system<SteeringMovementSystem>();
10!
36
}
10✔
37

38
void GameEngine::on_update(const double delta_time) const {
7✔
39
  game_state_->set_nearest_item(registry_->get_system<PhysicsSystem>()->get_nearest_item(game_state_->get_player_id()));
8!
40
  if (game_state_->is_player_touching_type(GameObjectType::Goal)) {
6✔
41
    if (const auto dungeon_level{game_state_->get_dungeon_level()}; dungeon_level == LevelType::FirstDungeon) {
2✔
42
      game_state_->reset_level(LevelType::SecondDungeon);
1✔
43
    } else if (dungeon_level == LevelType::SecondDungeon) {
1!
44
      game_state_->reset_level(LevelType::Boss);
1✔
45
    } else {
NEW
46
      game_state_->reset_level(LevelType::None);
×
47
    }
48
    return;
2✔
49
  }
50
  game_state_->set_enemy_generation_timer(game_state_->get_enemy_generation_timer() + delta_time);
4✔
51
  if (game_state_->get_enemy_generation_timer() >= ENEMY_GENERATION_INTERVAL &&
10!
52
      std::cmp_less(registry_->get_game_object_ids(GameObjectType::Enemy).size(),
6!
53
                    MapGenerator::get_enemy_limit(game_state_->get_game_level()))) {
1✔
54
    game_state_->generate_enemy();
1✔
55
    game_state_->set_enemy_generation_timer(0.0);
1✔
56
  }
57
}
58

59
void GameEngine::on_fixed_update(const double delta_time) const { registry_->update(delta_time); }
2✔
60

61
void GameEngine::enter_dungeon() const { game_state_->reset_level(LevelType::FirstDungeon); }
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc