100 Days of Code Day 4
Today’s exercise was lucky-numbers and focused on type conversion. I did get tripped up on checking for NaN. You need to use Number.isNan() instead of value == NaN.
I wanted to finish up the top-down movement code, and I think I pretty much have it. I spent quite a bit of time making a Pico-8 shim so I could keep the calls but map them to SDL and main loop updates. At one point I couldn’t get key presses to work because I had a != instead of a |=. That one made me feel bad. I finally got it working but I wasn’t colliding with anything. I then remembered that he set it up collision flags in the Pico-8 tile editor. To fix this I just marked the large flower tiles as unwalkable in the init function. Anyway, will have to think of something new for tomorrow.
I do have a gameboy development book on the way. Maybe I can port this to gameboy when it arrives and I am reading it. I did put in some fixed point math and binary shift operations to sort of prepare for that.
My smoke alarm is chirping gotta go look for batteries.
