Log In  

Hi there,

In my up-to-date standalone PICO-8, my score display works great; however, in the web player in the BBS, the score displays as something not-rounded and weird like 1000.232823. Is there a difference in how integers are handled?

P#20145 2016-05-04 11:28 ( Edited 2016-05-06 16:06)

I'm seeing very strange behavior around this. All the integer values that I try to print now have some residual decimal value. Is anyone having trouble printing integers?

P#20148 2016-05-04 12:36 ( Edited 2016-05-04 16:36)

Seeing it in other's cartridges, too. ".429" is appended onto integers! Weird! Is this a known issue?

P#20149 2016-05-04 12:40 ( Edited 2016-05-04 16:40)

Hey, yes this is a new issue -- thanks for the heads up.
How often does this happen? I tried playing Kid Orion through to level 5 with 43490 points and a few other carts, but didn't see it yet. Is there a way to reliably (or semi-reliably) reproduce the bug?

P#20150 2016-05-04 13:03 ( Edited 2016-05-04 17:03)

Hi Zep - thanks for the reply.

I reliably reproduce the bug in Kid Orion just by flying up (touching nothing) and landing on the first level end platform.

I also can reproduce this bug in the recent cartridge 'Shoot Stuff' -- just by starting the game Ammo is set to 40.429.

It seems most cartridges that feature number displays show this bug for me very quickly. I'm surprised it took you that long to reproduce it. I am on Chrome / OSX.

P#20152 2016-05-04 13:36 ( Edited 2016-05-04 17:36)

Similarly, in 'The Wee Dungeon', gold, once obtained, displays 3.429, 4.429, etc.

P#20153 2016-05-04 13:37 ( Edited 2016-05-04 17:37)

Inconceivable! This looks like a problem with the latest version of Chrome in particular -- or at least, it triggers some existing dormant bug. I don't get this behaviour on Firefox, or an older version of Chrome I had sitting around. This is the first time I've seen emscripten-generated code producing different behaviour on different browsers.

P#20154 2016-05-04 15:08 ( Edited 2016-05-04 19:08)

This is really strange! This bug just started occurring on my Picross game hosted on itch.io. See for yourself. The bug just started occurring today and I haven't changed any of the files for the past few days. Maybe it's a bug relating to the time? Maybe TIME() has gotten so big that it's overflowing into other parts of the RAM?
EDIT: Or maybe it's the latest version of Chrome. Ninja'd.

P#20155 2016-05-04 15:11 ( Edited 2016-05-04 19:12)

This is looks like it will be difficult to debug properly -- I'm going to try messing around with compiler options to see if it makes any difference. @_@

P#20156 2016-05-04 15:11 ( Edited 2016-05-04 19:11)

One of the biggest problems is that the bug also occurs with EXPORT-ed HTML5 players, not just on the BBS. In other words, this would need to be fixed with an update. You should probably also fix the SPLORE search function in the update. Just saying. :P

P#20157 2016-05-04 15:14 ( Edited 2016-05-04 19:15)

Also, it doesn't just seem to affect display. On my Picross game, I have the colons in the timer replaced with spaces every other second (IF SEC MOD 2 == 1), but that seems to now be broken for the first 10 seconds of every minute that the game is running. Could this be considered a Chrome bug?

P#20158 2016-05-04 15:21 ( Edited 2016-05-04 19:23)

@Fayne Yeah, if it's caused by some change in a Chrome update, unfortunately all of the cartridges exported will be affected. Bah.

time() is quite harmless -- it just returns the number of ticks since boot.

Did you happen to update Chrome recently?

P#20159 2016-05-04 15:22 ( Edited 2016-05-04 19:22)

I actually did just update. I'm running a Chromebook, but it belongs to my school, so I don't always have access to it. At home I run Chrome on Windows 10.
Edit: Also, I think I meant to say DATE(), not TIME(). Whatever function returns the current time. I don't use Lua often. :P

P#20160 2016-05-04 15:24 ( Edited 2016-05-04 19:25)

Oh, wow -- yeah, it looks like numeric operations have been broken at quite a low level. Something to do with Chrome's javascript interpreter.

P#20161 2016-05-04 15:26 ( Edited 2016-05-04 19:26)

ok, I moved to the 0.1.7 player, which is compiled with a more recent version of emscripten, and it seems to be working normally again. WEEEEIIIIIRD.

I'll try to get PICO-8 0.1.7 out soon, so that at least cartridge authors can re-export if the issue isn't resolved on Chrome's side.

P#20162 2016-05-04 15:37 ( Edited 2016-05-04 19:37)

Yay! Will the search function is SPLORE also be fixed? Also, SPLORE should only show runnable programs in the local file selector and not show other files, such as exported HTML and JS files. Also, could a function be added to change the template HTML file when exporting?

P#20163 2016-05-04 15:46 ( Edited 2016-05-04 19:46)

Splore search is fixed for 0.1.7, and I'm looking at filtering files. Specifying an alternative template wish-listed!

P#20164 2016-05-04 15:51 ( Edited 2016-05-04 19:51)

You're the man, zep!

P#20173 2016-05-04 18:07 ( Edited 2016-05-04 22:07)

Yeah, this is most definitely a Chrome bug, because this isn't the only thing affected. A chatroom I go on a lot doesn't work right on the latest update, giving up on loading after a while for no reason.

P#20192 2016-05-05 11:35 ( Edited 2016-05-05 15:35)

While you're filtering files, could you add a quick hack to respect dotfiles in the listing thing? It's not a HUGE deal but it's a little weird to see my .git folder and .gitignore within pico8.

Splore, at least, does ignore those! Yay!

P#20230 2016-05-06 12:06 ( Edited 2016-05-06 16:10)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 14:10:57 | 0.109s | Q:33