Posted March 02, 2024 by daniebker
Switched to using optional refs and smart pointers. Updated some code to start passing by refs instead of chucking raw pointers everywhere. Removed things that didn’t need to be pointers. Added consts to getter functions. Made some constructors explicit. Styling, declared each variable on it’s own line. Started using std::ranges::remove_if
.
Added XP points for each monster kill. Super basic but the mechanics are there. After levelling up the player receives some stats points to spend on either attack or defence. These boost the damage you can take or give. Pressing '.' brings up the character progression screen. I rushed through this bit since the UI Mechanism needs a bit of a refactor, but it's working.
Emscripten was failing for some reason to seed the dungeon correctly on loading. Also, after refactoring and using `std::ranges::remove_id` the build was failing because it's a c++20 feature. I had to update the build pipeline to use -std=c++20
as part of the CMAKE compile options.