eevee / lexys-labyrinth

Chip's Challenge 2 emulator that runs in a browser
https://c.eev.ee/lexys-labyrinth/
Other
72 stars 12 forks source link

js files on Github are missing updates that the ones on eev.ee have; they make the game lock up when actors move off some terrains #101

Closed polkakitty closed 4 months ago

polkakitty commented 4 months ago

I downloaded the latest version of Lexy's Labyrinth from Github as a zip file, and used Python to host it locally. I chose to play the first level of the newly added CCLP5, and the level loaded correctly, but upon starting it, the game immediately locked up, and this error was repeatedly shown in the Javascript console:

tiletypes.js:388 Uncaught TypeError: Cannot read properties of undefined (reading 'name') at Object.blocks_leaving (tiletypes.js:388:28) at Level.can_actor_leave_cell (game.js:1550:77) at Level.check_movement (game.js:1777:18) at Level.make_actor_decision (game.js:1527:22) at Level._do_decision_phase (game.js:949:22) at Level._advance_tic_lynx (game.js:791:14) at Level.advance_tic (game.js:775:18) at Player.advance_by (main.js:1659:28) at Player.advance (main.js:1711:18)

As the stack trace suggests, this freeze happens when certain actors move off of certain terrains. I don't know the complete list of actors and terrains that can trigger this freeze (it doesn't happen when Lexy moves off a force floor, for instance,) but there are two examples that can easily be used to test it:

However, I noticed that the freeze would only happen when playing the game that I was hosting locally; when playing the game at https://c.eev.ee/lexys-labyrinth/ , it would never happen. I downloaded the copy of game.js that was being served from eev.ee, and found it was actually different to the one from Github. Then I replaced the copy of game.js I was hosting with the one from eev.ee, and found that the bug was fixed, and the game would no longer freeze on the levels I tested.

The versions of format-c2g.js, renderer-canvas.js, tileset.js, and tiletypes.js that are hosted on eev.ee are also different to the ones from Github, but none of those changes seem to affect the freeze I was seeing.

I think you must have some recent changes to js files that have been pushed to eev.ee, but still need to be pushed to Github.

polkakitty commented 4 months ago

With the update to the game.js on Github that was made on April 18, this freeze no longer happens when hosting Lexy's Labyrinth locally, so I'm closing this issue.