Log 10




──────────────┤ View On GitHub ├──────────────

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

libtcod-vcpkg-template-9f960cd-windows.x64.zip 1.1 MB
Mar 02, 2024
libtcod-vcpkg-template-9f960cd-macos.x64.tar.gz 1.2 MB
Mar 02, 2024
libtcod-vcpkg-template-9f960cd-linux.x64.tar.gz 1.3 MB
Mar 02, 2024

Get Yet Another Roguelike tutorial with C++ and Libtcod

Leave a comment

Log in with itch.io to leave a comment.