Log 10
1. Refactor
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
.
2. Add XP Points
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.
3. Fix bug with emscripten seeding the dungeon
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.
Files
Get Yet Another Roguelike tutorial with C++ and Libtcod
Yet Another Roguelike tutorial with C++ and Libtcod
Status | Prototype |
Category | Other |
Author | daniebker |
Tags | cpp, Game engine, libtcod, Roguelike, roguelikedev |
Leave a comment
Log in with itch.io to leave a comment.