Hi All,
I've started my computer journey with a MSX Toshiba HX-10 in 1984, when I was 9. A story that, I suppose, is very similar to your own
Emulation and retrocomputing have been always part of my hobbies.
I've recently discovered the great book "Modern MSX-BASIC Game Development" written by shalafi, I've bought it and I'm having a lot of fun!
Anyway, I've a problem playing with sprites. In chapter 5 ("collision detection") it explains the sprite off/on trick around the put sprites to avoid collision between layers of a multicolor sprite. It's pretty clear, but I have problems with it.
I've stripped the code to the minimum here:
https://msxpen.com/codes/-MuFTHZah2XJ1cui-KiL
lines 1000-1040 load data, then the mail loop is between lines 140-620. If you run it, after a few frames a collision is detected and ON SPRITE GOSUB is fired.
What's my error?
Thanks a lot!