The PulpScript docs are a good reference for what events exist but aren't explicit about the exact order events are called.
I've created a pulp project as a playable reference. It implements all of the default events and logs when they are called. Here is a zip of the json to load into pulp: Pulp Event Reference.zip (4.1 KB)
From that, here are some useful orderings in a few situations:
LAUNCHING THE GAME
The first frames on launching the game proceed as follows:
Frame 0
- game load
- rooms load by ascending room id
- player load
- sprites/items load by asending tile id
- game start
Frame 1
- game enter
- room enter
- sprites/items enter left to right, top to bottom
- player enter
- player draw
Frame 2
- game loop
- player draw
Note that there is no game loop event called until frame 2. Frame 2 is the first frame that can handle input.
NO INPUT
If there is no input just these two events will run by default:
- game loop
- player draw
If a say, ask or menu is active the game loop event is not called.
ROOM TRANSITIONS
Room transitions are handled across two frames. If the player moves onto an exit, events proceed as follows:
First frame
- game loop
- player update
- game exit
- room exit
- sprites/items exit left to right, top to bottom
- player exit
- player draw
Second frame
- game loop
- game enter
- room enter
- sprites/items enter left to right, top to bottom
- player enter
- player draw
Note that the player update occurs before the room transition and there is no second update for the player's new position after the room transition.
FIN
If the player moves onto a fin exit, events proceed as follows:
Fin frame
- game loop
- player update
- game finish
Frames while fin text is on screen
- no events
Frame after dismissing fin text
- refer to launching the game
Note there are no exit events when a fin is triggered.
EMIT
When an event is emitted, it is handled by sprites/items in the room in the order left to right, top to bottom.
Hopefully this is a useful reference!