I have trouble with the html5 version of my project. It works well enough if run from the editor or if bundled as a Windows application, but the html5 version hangs at a specific point (and sometimes at seemingly random other points).
Here’s a link to both version. The broken html5 version is also available on the community page.
The html5 version stops working at 16:56, which is the time where the first hungry peep reaches a food dispenser and is buying food. Advancing time by more than 5 minutes seems to trigger it as well sometimes.
I’m trying to pinpoint the bug more closely, but it’s slow, as I have to keep bundling it to test it, (Edit: Damn! I just noticed the “Build HTML5” option in the project menu. That’s going to simplify things…) so I thought I’d create this topic first and update it if I can find out what exactly is the issue.
In any case, the html5 build is behaving differently from what I see in the editor.
Edit: Forgot to mention - I’ve tried uploading a zip, building the html5 playable on the community page and running it in my browser locally. The bug is present in all of these versions. I’ve also tried building a “debug” version instead of “release” to no avail.
Update:
I’ve nearly tracked the bug down. It’s an old pal that has to do with pathfinding - the peep’s location becomes nil which breaks any functions that try to get that value. It used to plague me enough that I still have the line
print("DAMN "..peepID.." HAS A NIL ROUTE AGAIN! TIME IS "..getTime(time)..", DATE "..date)
in the code to notify me should it reappear. The bug only reappeared in the html5 build, though, so I didn’t get the memo. (BTW, is there a way to view console when running a html5 build? That would be helpful).
Anyway, it’s 1:33 AM and I need to go to work tomorrow, so finding the exact place where things go wrong is going to have to wait. Hopefully I’ll solve this with a fresh pair of eyes.