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.

P#27379 2016-08-26 01:30 ( Edited 2016-09-13 21:58)

Still crashes in 0.1.9, FYI.

P#28408 2016-09-12 13:26 ( Edited 2016-09-12 17:26)

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

P#28412 2016-09-12 13:57 ( Edited 2016-09-12 17:57)

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.

P#28414 2016-09-12 14:05 ( Edited 2016-09-12 18:05)

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.

P#28415 2016-09-12 14:26 ( Edited 2016-09-12 18:26)

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

P#28416 2016-09-12 15:10 ( Edited 2016-09-12 20:09)

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.

P#28473 2016-09-13 17:58 ( Edited 2016-09-13 21:58)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 23:18:39 | 0.016s | Q:30