stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

2h 16m logged

LOG 23: BATTLE LOG FOR ITEMS, BUG FIXES, BUG FIXES, BUG FIXES, BUG FIXES

FEATURE

BATTLE LOG FOR ITEMS

The previous battle log only logged attacks and the damage dealt, now the log also tracks if items are used or items deal damage

BUG FIXES

SEGFAULT

There was a segfault when trying to render the bottom of deeper rooms because the render guard had a major fault (only disjunctions no conjunctions). Because of that the game tried to reach spaces of the visible_map array out of reach of the array which resulted in a segfault when trying to go into spaces out of reach of the array. The fix was changing the guard from if ((player_y + y) < MAX_HEIGHT || (player_x + x) < MAX_WIDTH || (player_y + y ) >= 0 || (player_x + x >= 0)) to if ((player_y + y) < MAX_HEIGHT && (player_x + x) < MAX_WIDTH && (player_y + y ) >= 0 && (player_x + x >= 0)) which fixed the issue

BATTLE LOG NULL TERMINATOR FIX

There was a bug with the battle log, where ^ were printed (NUL ascii in ncurses) because the battle log printed out every part of the string character by character (including the \0 terminator). The fix was to just not print out the \0 terminator to the screen

BATTLE SELECTION BUG

There was a bug with conflicting selection variables (multiple variables where named selection which resulted in wrong selections being displayed). The fix was to give every function their own selection variable which fixed the issue

VISIBLE MAP GLITCH

Because the visible map only updated itself in the perimeter you are standing in if you moved fast enough some characters lagged behind and made it look like there were way more enemies than there actually were. The fix was to update not only the perimeter on every movement but also update everything that had already been explored

0
131

Comments 1

@Definitly-Not-Me

It seems to me that you’re trying to check boundary. In that case, perhaps you should use struct to represent the player coordinate.

struct player { float y = 0.0; float x = 0.0; };

and put let a function handle the boundary check.