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 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.nasm/memory.txt') 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%) -- cgit v1.2.3