Room Reset Config Option

1. Describe your reason for requesting this feature. What problems are you running into?
I just learned that calling the finish event is the only way reset a room. In my game, I'm sending the player back to a main menu and allowing them to choose whether or not to enter the primary play area, or view high scores, etc. I didn't notice anything in the documentation clarifying that leaving and re-entering a room does not reset the room to original state.
2. How would this request improve your experience with using Pulp?
It would be great if there was an available configuration element (e.g. config.resetRooms) that allowed the developer to define room behavior globally. This would be well suited to 'mini-game' style projects with multiple independent rooms.
3. Include any other details you have relating to this request.


This is a tricky request since if rooms were reset by default then we’d get just as many requests to persist changes. I think for Pulp’s intended use (tiny narrative games) the current behavior is correct. Instead of a config I think a reset function might work better because then you could choose on a room by room basis or, if you want all rooms to reset, you could call reset in the game’s exit event handler.


That's a great compromise, @shaun . I keep forgetting that the full SDK is right around the corner and might make this a moot point, but I do think the addition of a room reset function would still be beneficial.

There isnt a chance that this happened and I missed it, right?

Really need just one of my rooms to reset for the player back to how it started, in case they make a mistake in solving the puzzle.

Something like

on exit do



Which would make the room, and all tiles in it return to the state they were first in.

That and a "reset then" option.

Like it's great that this isnt the default behavior, but I just would want to reset specific rooms optionally.

Unfortunately you didn't miss anything.

For now you can manually reset the state of the room by making swaps in the room's exit or enter events. While exit is intuitive I find enter works better as swapping tiles in a room's exit event will be visible for a single frame when leaving the room.

1 Like

Ah, I see.

I'll just have to hardcode swaps for almost every tile in the room, like everything else lol.

At least the game is almost finished.