From fb23cf51040f06bfcfbaf318d7b452d76ffbedfb Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 20 Mar 2026 21:52:36 +0100 Subject: Try to initialize enemies on unique Y coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That is, our PRNG algorithm is so stupid that sometimes it cycles into the same value multiple times. While play testing, sometimes we were so unlucky that we got all enemies on the same Y screen coordinate. As funny as these situations can be, this shouldn't happen, so I have introduced an (awesomely named) function that makes a harder effort at finding a unique random number. Signed-off-by: Miquel Sabaté Solà --- .nasm/memory.txt | 3 ++- .nasm/segments.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to '.nasm') diff --git a/.nasm/memory.txt b/.nasm/memory.txt index 3603fc9..397a90b 100644 --- a/.nasm/memory.txt +++ b/.nasm/memory.txt @@ -16,6 +16,7 @@ $0E: zp_player_tile_waist $0F: zp_player_tile_bottom $10: zp_displayed $11: zp_timer +$12: zp_last_rand $20: zp_flags $21: zp_prev $22: zp_buttons @@ -80,4 +81,4 @@ $4016: m_joypad $4017: m_frame_counter --- Summary (in bytes) --- -- Internal RAM: 418/2048 (20.41%) +- Internal RAM: 419/2048 (20.46%) diff --git a/.nasm/segments.txt b/.nasm/segments.txt index 2c4877f..85c337d 100644 --- a/.nasm/segments.txt +++ b/.nasm/segments.txt @@ -1,4 +1,4 @@ - HEADER: 16/16 (100%) -- ROM0: 8253/32762 (25.19%) +- ROM0: 8276/32762 (25.26%) - ROMV: 6/6 (100%) - ROM2: 8192/8192 (100%) -- cgit v1.2.3