From ae12e4a1e97f1bb3eea67047560296096af13bef Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 5 Mar 2026 18:49:42 +0100 Subject: Don't be too tight on the player's feet for collision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/enemies.s | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/enemies.s') diff --git a/src/enemies.s b/src/enemies.s index 0279958..281519d 100644 --- a/src/enemies.s +++ b/src/enemies.s @@ -207,7 +207,7 @@ inx sta zp_enemies_pool_base, x - ;; And point to the next enemy. + ;; Point to the next enemy. inx rts @@ -244,7 +244,10 @@ ldx #0 ;; Save the player's tile coordinates now as it will be useful/faster - ;; for collision checking with each enemy. + ;; for collision checking with each enemy. Note that some of the values + ;; here are tuned down so the collision is not so aggresive (i.e. we + ;; don't want to consider the whole rectangle of the player, but a + ;; smaller area). lda Player::zp_screen_y tay lsr @@ -260,7 +263,7 @@ sta Enemies::zp_player_tile_waist tya clc - adc #Player::PLAYER_HEIGHT + adc #(Player::PLAYER_WAIST + 2) lsr lsr lsr -- cgit v1.2.3