Skip to content

Begin documentation on distortion world events#992

Open
Kuruyia wants to merge 1 commit intopret:mainfrom
Kuruyia:feat/document-dist-world-events
Open

Begin documentation on distortion world events#992
Kuruyia wants to merge 1 commit intopret:mainfrom
Kuruyia:feat/document-dist-world-events

Conversation

@Kuruyia
Copy link
Contributor

@Kuruyia Kuruyia commented Mar 6, 2026

This continues documentation of the distortion world overlay by beginning the documentation of the event system.

An event is defined as a trigger, which is compared against the player position; a flag condition, which allows conditional triggering of events; and a list of commands, which is the actual logic of an event. There can be at most only one running event at a time. While an event is running, player input is (always?) blocked.

An event is associated with one or multiple event commands. An event command is a bit of logic that does some operation (spawn a map object, move a platform...). Event commands are simple state machines, with one handler function per state. Event commands can optionally be passed a struct of parameters, to easily reuse a command in multiple events.

This first pass focuses on the general event management logic, by documenting functions related to detecting whether the player moved to an event trigger, and running the current event's command handler.

This also includes the preliminary work of identifying the static data associated with the events present in each distortion world map.

This continues documentation of the distortion world overlay by
beginning the documentation of the event system.

An event is defined as a trigger, which is compared against the player
position; a flag condition, which allows conditional triggering of
events; and a list of commands, which is the actual logic of an event.
There can be at most only one running event at a time. While an event is
running, player input is (always?) blocked.

An event is associated with one or multiple event commands. An event
command is a bit of logic that does some operation (spawn a map object,
move a platform...). Event commands are simple state machines, with one
handler function per state. Event commands can optionally be passed a
struct of parameters, to easily reuse a command in multiple events.

This first pass focuses on the general event management logic, by
documenting functions related to detecting whether the player moved to
an event trigger, and running the current event's command handler.

This also includes the preliminary work of identifying the static data
associated with the events present in each distortion world map.

Signed-off-by: Kuruyia <github@kuruyia.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant