-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game flow rework (pt 9) #2396
Merged
Merged
Game flow rework (pt 9) #2396
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rr-
added
TRX bug
A bug with TRX
Internal
The invisible stuff
Unreleased
Applies to things that aren't in a stable release.
TR2
TR1
labels
Jan 26, 2025
rr-
requested review from
lahm86,
walkawayy and
aredfan
and removed request for
a team
January 26, 2025 23:46
Broken in e04f955.
walkawayy
approved these changes
Jan 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TR1 and TR2 LGTM. Tried new games, cutscenes, FMVs, gym, and story so far in TR1.
lahm86
approved these changes
Jan 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
aredfan
approved these changes
Jan 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Internal
The invisible stuff
TR1
TR2
TRX bug
A bug with TRX
Unreleased
Applies to things that aren't in a stable release.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
play_synced_audio
event toplay_music
and its argument,audio_id
, tomusic_track
level_stats
in Gym only does a fade-outlevel_id
argument fromlevel_stats
eventsexit_to_level
event withlevel_complete
play_music
eventexit_to_title
eventlevel_stats
event fromlevel_complete
game_complete
event withgame_stats
game_complete_track
in favor ofplay_music
eventlevel_complete_track
in favor ofplay_music
eventsDisplayCredits()
hardcoded sequence with JSON gameflow eventslevel_stats
event)Next steps
I'd like to think of a way to merge both code bases via TRX next.
The biggest remaining difference between TR1 and TR2 is the presence of a separate
load_level
event in the TR1 game flow sequencer, which dictates how events such asgive_item
are internally implemented. Consolidating both code bases might require addressing this first. For now the leading idea is to introduce a separate sequence that only gets executed after a level is initialized, but before the game is played. This is similar to TR2's approach, but with a welcome reduction of global state. For TR1, it eliminates the need for theload_level
event, making it less confusing for builders. Later down the line, this could seamlessly become a sensible LUA hook.We still have
GFL_CURRENT
andGFL_DUMMY
in TR1 but I suppose we can live with this for time being.I'd rather tackle extracting gym to its own sequence once we have the majority of the game flow code in TRX.