-
Notifications
You must be signed in to change notification settings - Fork 199
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
Refactor messaging system #1876
Closed
Closed
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
After end loop, the next command is not Loop but instead is the first command inside the loop.
- Don't loop over choices or number input - Increment index after choices and number input (broken in earlier commit)
Various fixes for more frame accurate message rendering speed. See EasyRPG#1706 Test Cases 7 through 10.
8e3a04f
to
36b5d1b
Compare
* Update the base class *after* starting open/close animation. * Terminate the message on next frame after finishing text, but before starting and animating close. This fixes an issue where the messages would wait an extra frame on open and close. Also fixes an issue where foreground interpreters would resume a frame early.
Number window is embedded and doesn't animate closed. This code caused extra frame delays and broke RPG_RT compatibility
Remove Game_Message::owner_id
Instead of having everyone touch global variables, we pack all pending message state into an object. To push messages to the message system, one creates a PendingMessage object, populates it, and then submits it to the Game_Message system for processing. * Ensures message state is always cleared when we start a new message * Early exit due to errors before calling SetPendingMessage() doesn't affect global message state. * Removes a lot of manual work for setting things like choice_start, message_waiting, etc.. * PushPageEnd() instead of exposing `\f`
Set the continuation for choices in the messaging system and not in the interpreter.
Remove Window_Message::escape_char
* Use the new parsing functions to performan substitutions * Fixes timing issue where variable substitutions are supposed to be done when the messages are first pushed, not when the message window updates. This differece can be seen by spawning a message with \v[N] in a foreground event while a parallel event is continuously incrementing the variable each frame.
Perform '\n' insertion in Game_Message instead of Window_Message
If a foreground event tries to show a message after the previous one already started animating it's close animation, it will wait for that close to finish before executing the ShowMessage command. Also fix choices, number input, and inn to follow the same rules.
36b5d1b
to
59d9406
Compare
* Scene change requests are blocked if message is pending or visible * If a scene is requested before a message but on the same frame, the scene request is still allowed. * Still disable calling debug scene from player controls * Add IsMessageActive() helper method to reduce confusion in code.
* Teleport commands will not execute if message is active * If message requested after a pending teleport, cancel the message.
To match EasyRPG#1706 Test 19 and 20 * Face and Message Settings block the same way as ShowMessage.
All of this now has been subsumed into other message PRs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactor message window to get correct frame timings, interpreter behavior, and avoid lockups
Depends on #1742
Fix: #1873
Fix: #1781
TBD: