Log In  


This simple snippet triggers a crash in PICO-8’s internal ftan2() function:

atan2(-1,-32768)

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.



Still crashes in 0.1.9, FYI.


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. :)

https://en.wikipedia.org/wiki/Undocumented_feature


Just because a product is in beta doesn't mean people shouldn't report issues with it. One of the worst things someone can do is to not report an issue. Developers aren't magic, they can't read your mind over the internet.


Bug reports are not criticism! I’m bumping this issue because it’s certainly very easy to fix and I assumed it probably just went under the radar.


@samhocevar but all your posts start with FUUUUU!
<- meanwhile all mine start with meh.
lol


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]