This simple snippet triggers a crash in PICO-8’s internal ftan2() function:
Happens on both Linux and Windows.
Also, is this a bug? atan2(1/128,1/128) return 0.875 (the expected value), but atan2(1/256,1/256) returns 0.75. Looks like a bit of precision is lost somewhere.
Guys, PICO 0.1.9 is BETA. By ALL means post errors found, but understand a new release from any product will always have glitches and 'undocumented features' - they are unavoidable.
Back in my teens I was working on a game simply called DUNGEON. It was pretty innovative in that despite a display of only 40x40 16-color pixels it had magic spells, traps, weapon types, armor types, and progressively difficult monsters to fight in the catacombs.
One night I was working on adding a new magic spell to the list when the next day about 10% of the time, a pink pixel would appear on the screen.
My friend, Brett, first noticed it. He said there was an error in the game. I asked what. He said when you touch the pink pixel, nothing happened.
I was very surprised as I didn't remember writing ANY routine with a pink pixel.
And - days later, I STILL couldn't find what was causing it.
Problem - problem, what was the solution ? I finally decided that if the player runs into a PINK pixel (of which I had no memory in writing) that the player would receive a BONUS shield !
There ya go. Turned that nasty bug into an undocumented feature. :)
Thanks, @samhocevar -- fixed for the next update. And you're right, it looks like the precision doesn't need to be that bad. It might need to become a quirk of PICO-8 in order to preserve existing cart behaviour, but I'll review it.
@dw817 The rageface definitely doesn't match the intention of the post :) fwiw, I do appreciate bug report thread bumps when a new version comes out.
[Please log in to post a comment]