Skip to content
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

Messages need to be refactored. #1706

Open
40 of 50 tasks
mateofio opened this issue Mar 17, 2019 · 49 comments
Open
40 of 50 tasks

Messages need to be refactored. #1706

mateofio opened this issue Mar 17, 2019 · 49 comments

Comments

@mateofio
Copy link
Contributor

mateofio commented Mar 17, 2019

Our messaging system needs a refactor. We need to determine frame accuracy for messages and what is / is not prohibited when they are up.

Timing from Cherry:

Main update methods for common events run (they just check if they are parallel process and the condition is met and then invoke the parallel process worker for them)
Main update methods for map events run (they do a bunch of things, described in my previous post - but actually even more, because after the check for whether there is any active event page, they will run their parallel process worker and then check once more for active)
Message window updates
Timer updates
Screen effects update
Pictures update
Foreground worker runs
Panorama updates

Test cases still broken:

  • 17 - message box glitch not fully animated, need to affect on show screen.
  • 27 Test 2 - box doesn't close.
  • 42 - We don't interrupt the message
  • 43 - Currently off by 1 frame.
  • 44 - We set show_message chunk but it gets cleared every frame due to Game_Map::UpdateForegroundEvents() always calling Game_Interpreter::Clear() even when no events run.
  • 45 - Wrong timing

TBD:

  • Do another performance testing pass
  • Test performance of overflow window width.
  • Test show screen against window animation
  • Backspace timing? Peuteris Grey Intro

Things to verify from RPG_RT:

  • Move show choice continuation into message class and handle subcommand_path properly.
  • EV01: Save, EV02: Choices -> Save and load the game message window dissapears RPG_RT bug ❗
  • Interpreter execution test cases #1707 Test case 6, save game runs an extra frame while message box is closing, before the continuation triggers.
  • How is foreground interpreter execution blocked by active message?
    • Only when message is pending, not when closing
  • How is parallel interpreter execution blocked by active message?
    • Only when its own message is pending and visible
  • Behavior of "Allow other events to move"
  • What event commands blocked by an active message?
    • See Test 19
  • What active event commands / conditions block a message from starting?
    • Only other messages, with specific rules for FG and Parallel
  • How does RPG_RT handle message ownership and show_message chunk
    • Caller of message sets this chunk
    • Appears to be cleared when message ends?
  • When is face reset
    • On foreground event finish
  • How many frames to open and close message box
    • 8 frames
  • How does open and closing behave with foreground events?
    • New messages can appear instantly if created on last frame, otherwise wait for close
  • How does open and closing behave with parallel events?
    • New messages blocked until close finishes
  • Do messages have any wierd effects when triggered during pre-update?
    • No, they just wait until the first frame to start animating
    • message update not run during preupdate
  • How to messages behave when called when screen is erased?
  • When msg is updated in the main loop?
    • After all events, before timers
  • Frame timing of different message speed settings?
  • Can we cleanup and refactor the code to improve code quality?
  • When you substitute an actor name with \n[] and it has an escape character like \^?
  • Level up message timing
  • Class change message timing
  • Does the inn use show message chunk?
  • Message conditions blocking ShowMessage
  • Message conditions blocking ShowChoices
  • Message conditions blocking ShowNumberInput
  • Message conditions blocking ShowInn
  • Change EXP / Level spawning a box while other box active?
  • ChangeHP kills party while message is up?
  • Check all scenes, what about gameover?
  • Race conditions with parallel change system graphic
  • Inn cancels pending message
  • GetOnOffVehicle behavior with message up?
  • VehicleTeleport while message up?
  • Interaction with Wait For Key
  • Interaction with KeyInputProc
  • ChangeClass Message with message
  • Can FG run other commands while msg box closing?
    • yes
  • Message behavior blocking timers?
  • Test delay of full width japanese characters
  • Figure out skip frame logic for speed 1 w.r.t. wide chars vs half chars
@mateofio
Copy link
Contributor Author

Test Cases 1 - What can run while messages are up?

EV01 parallel Message \v[1] \v[2]
EV02 parallel Var1+1
EV03 autostart Var2+1

Msg V1 V2
1 0 0
2 75 10
3 134 20
4 215 30

Result:
Auto start event advances by 10 frames between each message. Parallel runs during the message. The longer you wait to close the message box, the higher var1.

  1. Change EV01 to
Wait 0.0s
Loop:
  Msg: \v[1] \v[2]
Msg V1 V2
1 1 0
2 471 9
3 567 18

Result: Var2 advances by 9 frames

@mateofio
Copy link
Contributor Author

mateofio commented Mar 17, 2019

Test Cases 2 - Message box animations

  1. parallel event Message: Hello

Result: Open, "hello", Close, Open, "hello", etc..

  1. parallel event Loop: Message: Hello

Result: Open, "hello", Close, Open, "hello", etc..

  1. autostart event Message: Hello

Result: Open, "hello", "hello", "hello", etc..

  1. autostart event Loop: Message: Hello

Result: Open, "hello", "hello", "hello", etc..

  1. autostart event
Loop: 
  Message: Hello
  Wait 0.0s

Result: Open, "hello", Close, Open, "hello", ...

Conclusion:

  • Repeated messages from autostart events don't wait for the message box to close

@mateofio
Copy link
Contributor Author

Test Cases 3 - Message box timings

  1. Set this parallel event EV01
OpenSaveMenu
Msg: \^
OpenSaveMenu
Save stop count
1 0
2 18
  1. Now add 2 more events
    EV02 parallel Var1 + 1
    EV03 autostart Var2 + 1
Save stop count Var1 Var 2
1 0 1 0
2 18 18 10

Conclusion:

  • Message box animations surely take 8 frames. As this example shows 8 + 8 + 2 frames used.
  • autostart events appear allowed to to run when message box is closing
  • parallel events run the entire time, as the variable value 18 matches stop_count

@mateofio
Copy link
Contributor Author

Test Cases 4 - Messages and Save Menu

  1. EV01 parallel
Message: Hello
Sw1 On
EraseEvent

EV02 parallel Page 1

Loop:
  OpenSaveMenu

EV02 page 2, activated by SW1

Result: Hello

  1. Change EV01 to autostart

Result: Save, Save, Hello

Conclusion:

Scene Change is blocked when messagebox is visible.

@mateofio
Copy link
Contributor Author

Test Cases 5 - Message Loadgame Bug

Ev01 parallel

OpenSaveMenu
OpenSaveMenu
EraseEvent

EV02 parallel

ShowMessage: Hello
EraseEvent
  1. Start a new game and save

Result: Save, "Hello"

Save Ev01 current command Ev02 current command EV02 show message
1 1 1 1
2 2 2 0
  1. Load the first save game

Result: Hello message box does not appear ❗

  1. Save again after loading
Save Ev01 current command Ev02 current command EV02 show message
1 2 2 0

Result: show_message chunk gets cleared

Conclusion:

Edge cases allow us to save the game while a message box is pending. The message box will appear after the save scene exits, however there are no LSD chunks for the active message. So loading this save game will cause the message to not appear ❗

The show_message chunk appears to always be cleared when there is no active message.

@mateofio
Copy link
Contributor Author

mateofio commented Aug 23, 2019

Test Cases 6 - More timing tests

EV01 parallel

Branch SW1 off
  Message: \^
  Sw1 On
Var1 + 1

Ev02 parallel

Var2 + 1
  1. After message box closes, check variables with debug menu

Result: Var2 - Var1 == 18

  • Preupdate: EV01 starts message but message not updated, EV02 ticks
  • Frame1: Message starts, blocking EV01 for 17 frames, EV02 ticks 17 frames
  1. Change EV01 to autostart

Result: Var2 - Var1 == 10

  • Preupdate: EV01 does not run, EV02 ticks
  • Frame1: EV01 starts message, Message starts, EV01 blocks for 9 frames, and then continues running while the message box is closing, EV02 ticks 9 frames
  1. Change EV01 to parallel, Add Wait0.0s inside the branch before the message

Result: Var2 - Var1 == 18

  • Preupdate: EV01 waits, EV02 ticks
  • Frame1: EV01 starts message, Message starts, blocking EV01 for 17 frames
  1. Change EV01 to parallel, Add Wait0.0s; Wait 0.0s inside the branch before the message

Result: Var2 - Var1 == 19

  • Preupdate: EV01 waits, EV02 ticks
  • Frame1: EV01 waits, EV02 ticks
  • Frame2: EV01 starts message, Message starts, blocking EV01 for 17 frames, EV02 ticks 17 frames

@mateofio
Copy link
Contributor Author

mateofio commented Aug 24, 2019

Test Cases 7 - Message speed timings

EV01 parallel

Branch SW1 off
  Wait 0.0s
  Message: TXT
  Sw1 On
Var1 + 1

Ev02 parallel

Var2 + 1
Var3 = Var2
Var3 -= Var1
Var3 -= 17
  1. Change the text to \s[N] for some speed N, followed by some number of X followed by \^

Example \s[3]XXX\^\

This table shows the value of Var3, which is the number of frames taken to render the message

Msg Speed \s[N]\^ \s[N]X\^ \s[N]XX\^ \s[N]XXX\^ \s[N]XXXX\^ \s[N]XXXXX\^ \s[N]XXXXXX\^ \s[N]XXXXXXX\^
0 1 2 2 3 3 4 4 5
1 1 2 2 3 3 4 4 5
2 2 4 6 8 10 12 14 16
3 3 5 7 9 11 13 15 17
4 4 7 10 13 16 19 22 25
5 5 8 11 14 17 20 23 26
6 6 10 14 18 22 26 30 34
7 7 11 15 19 23 27 31 35
19 19 29 39 49 59 69 79 89
20 20 31 42 53 64 75 86 97
21 20 31 42 53 64 75 86 97
  1. Other Test Cases
Msg Frames Comments
\s[5]X\s[20]\^ 23
\s[20]X\s[5]\^ 16
\s[20]\>\^ 0 Removes wait for finish message
\s[20]X\>\^ 11
\s[20]\.\^ 40
\s[20]|\^ 81
\s[20]\|\>\^ 61
\s[20]\.\>\^ 20
\>\.\^ 0 \> removes all waits
X\s[2]X\>\^ 3
\s[2]X\s[1]X\>\^ 3
XX\s[2]X\>\^ 3
X\s[2]X\s[1]X\>\^ 4 position of \s[1] characters determines whether we wait 1 frame
\s[20]$A\>\^ 21 Symbols wait longer?
\s[20]\_\>\^ 11 Half spaces are the same
\s[20] \>\^ 1 Waits 1 frame for empty lines
\s[20]X X\^ 42 11 + 11 + 20
\s[20] \^ 23 Empty lines 1 + 1 + 1 + 20
\s[20] \^ 53 Lines with spaces 11 + 11 + 11 + 20
XX\>\^ 1
$AX\>\^ 2
X$A\>\^ 2
\_\_X\>\^ 2
$AXX\>\^ 2
X$AX\>\^ 3
  1. Shift Test

Hold the Shift key while performing any of these tests

Result: Frames == 0

  1. ExFont Symbols

Test this message \s[N]$A\>\^

Speed Frames
1 1
2 3
3 4
4 5
5 6
10 11
15 16
20 21
  1. \< Symbol

Test this message \s[N]\<\>\^

Speed Frames
1 1
2 2
3 3
10 10
20 20

Conclusion

  • When speed == 1
    • we print 2 characters per frame.
    • we always increment after odd characters.
    • This only applies to half width characters, and appears to reset after seeing a full width char. So any half width character after a full width will cause a 1 frame delay.
  • When speed > 1, each character prints in speed / 2 + 1 frames.
  • When the message ends, we wait speed frames before closing the message box.
  • Speed is clamped to [1,20]
  • Shift key finishes the message instantly, including final wait.
  • The \< waits for 20 frames
  • The \. waits for 20 frames
  • The \| waits for 61 frames ❗
  • The \> skips wait for everything include \| and \.
  • When speed == 1 Symbols like $A always wait for 1 frame
  • When speed > 1 Symbols like $A wait for speed + 1 frames
  • Always waits 1 frame for empty lines
  • Non empty lines add no extra delay
  • Trailing whitespace is not skipped

@mateofio
Copy link
Contributor Author

mateofio commented Aug 24, 2019

Test Cases 8 - Testing the message end character

  1. Display this message \s[20]\^XXXXXXX

Result: "XXXXXXX"

  1. Press shift will it's displaying

Result: Entire message displays instantly

Conclusion

  • The \^ causes the message box to close, but it still waits for the entire text to be displayed before closing.
  • The shift key causes the entire message to display instantaneously

@mateofio
Copy link
Contributor Author

Test Cases 9 - Gold Window timing

Use the same machinery from earlier

  1. \s[N]\$\>\^
Speed Gold Frames
1 0 1
10 0 10
20 0 20
1 999999 1
10 999999 10
20 999999 20
  1. \s[N]X\$X\>\^
Speed Gold Frames
1 0 3
10 0 22
20 0 42
1 999999 3
10 999999 22
20 999999 42

Conclusion

  • Summon Gold window waits speed frames
  • Does not depend on how much gold you have

@mateofio
Copy link
Contributor Author

mateofio commented Aug 24, 2019

Test Cases 10 - Multiline instant text and shift tests

  1. Hold shift and display this message
\s[20]XXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX
XXXXXXXXX
XXXX\^

Result: Entire message displayed instantly.
0 frames.

  1. Hold shift and display this message
\s[20]XXXXXXXXXXXXXXXXX\<XXXX
XXXXXXXXXXXXX
XXXXXXXXX
XXXX\^

Result: First part of message up to the \< displays. Then a pause, and then the rest of the message.

20 frames ❓

  1. Display this message
\s[20]\>XXXXXXXXXX
XXXXXXXXXXXX\^

Result: First line prints immediately, second line renders slowly

152 Frames

  1. Display this message
\s[20]\>XXXXXXXXXX
\>XXXXXXXXXXXX\^

Result: Entire message prints instantly

0 Frames

  1. Display this message
\s[20]\>
\>\^

Result: Entire message prints instantly

0 Frames

Conclusions

  • Shift key is not registered while the message window is waiting. Hence the 20 frame delay. Also if you quickly hit shift while the message is rendering sometimes you'll see it won't trigger.
  • Shift key is canceled by \<
  • \< always waits speed frames
  • \> effect is cancelled at end of line, but shift key is not.
  • \> also skips 1 frame delay for empty lines

@Ghabry
Copy link
Member

Ghabry commented Aug 24, 2019

Also worth testing: Do full width characters (Japanese) render the same speed as half width.

mateofio added a commit to mateofio/Player that referenced this issue Aug 25, 2019
Various fixes for more frame accurate message rendering speed.
See EasyRPG#1706 Test Cases 7 through 10.
@mateofio
Copy link
Contributor Author

mateofio commented Aug 25, 2019

Test Cases 11 - Autostart message timings

EV01 autostart

Msg: \s[20]\v[1]\^
Var2 = Var1
Wait 0.0s
Var3 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]\^
Sw1 On
Text \v[1]
EraseEvent

EV02 parallel page 1

Var1 +1

EV02 page 2 - activated by SW1

Result: "2", "49 42 43", "166"

Frame Sequence Var1
1P EV02 Var1+=1 1
1 EV02 Var1+=1 2
1 Upd message 2
1 EV01 ShowMessage 2
2 EV02 Var1+=1 3
2 Upd message (start open) 3
9 EV02 Var1+=1 10
9 Upd message (Draw "2", Wait 11) 10
20 EV02 Var1+=1 21
20 Upd message (EndPage, Wait 20) 21
40 EV02 Var1+=1 41
40 Upd message (Finish Wait) 41
41 EV02 Var1+=1 42
41 Upd message (Start close anim, visible = false 42
41 EV01 Var2=Var1 42
41 EV01 Wait 0.0s 42
42 EV02 Var1+=1 43
42 EV01 Var3=Var1 43
48 EV02 Var1+=1 49
48 EV01 ShowMessage 49

Conclusion

  • Variables are substuted into the message when the interpreter runs, not when the message updates. This is demonstrated by the value 2 in the first message
  • If the foreground interpreter creates 2 messages one after another, the message box will not animate closed and instead go right to the next message.
  • If there is 1 frame delay or more between 2 messages in the foreground interpreter, it will wait until the first message box closes to start the next one.

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 12 - Invalid Actor tests

Create at least 12 actors.

  1. \n[1]

Result: "Alex"

  1. \n[0]

Result: "Alex"

  1. \n[A]

Result: Crash

  1. \n[2A]

Result: "Brian" - Trailing characters are discarded

  1. \n[A2]

Result: Crash

  1. \n[2A2]

Result: "Brian"

  1. Var1=11; Msg=\n[\v[1]A]

Result: "Actor11"

  1. \n[\v[0]]

Result: "Alex"

  1. Var3=999; Msg=\n[\v[3]]

Result: Crash

  1. Var3=-999; Msg=\n[\v[3]]

Result: Crash

  1. Var3=0; Msg=\n[\v[3]]

Result: "Alex"

  1. Var3=1; Msg=\n[\v[3]]

Result: "Alex"

  1. Var3=1; Msg=\n[\v[A]]

Result: "Alex"

  1. \n[]

Result: Crash

  1. \n[

Result: Crash

  1. \n[2

Result: "Brian"

  1. \n

Result: Crash

  1. Var1=1; Msg=\n[1\v[1]]

Result: "Actor11"

  1. Var1=1; Msg=\n[\v[1]\v[1]]

Result: "Actor11"

  1. Var1=1; Msg=\n[\v[1]\c[1]]

Result: "Alex]"

  1. Var1=1; Msg=\n[\v[1]\v[0]]

Result: "Actor10"

  1. \n[01]

Result: "Alex"

  1. \n[\v[A]]

Result: "Alex"

  1. \n[0\v[A]]

Result: "Alex"

  1. \n[\v[A]0]

Result: "Alex"

  1. \n[0\v[A]0]

Result: "Alex"

  1. Give actor 8 the name "X\v[1]X"

\n[8]

Result: "X[1]X"

  1. Var1=11, Var2=1, Msg=\n[\v[\v[2]]]`

Result: "Alex]"

Conclusions

  • When RPG_RT see a non-digit within brackets, it will discard it and all characters following it. Returning any numbers that were before.
  • If the value resolves to an invalid actor, RPG_RT will crash.
  • If an embedded variable query resolves to 0, instead of crashing RPG_RT will use the first actor.
  • Multiple variables can be embeded, a long with digits, and all are concatenated.
  • Actor name does not allow recursion

@mateofio
Copy link
Contributor Author

Test Cases 13 - Invalid escapes

  1. \X

Result: ""

  1. \X[123]

Result: "[123]"

Conclusions

Unsupported escape characters are ignored.

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 13 - Multiple messages delay?

  1. EV01 parallel
Msg: Hello

EV02 autostart

Msg: Goodbye

Result: Open, "Hello", "Goodbye", "Goodbye", ...

  1. Change EV02 to parallel

Result: Open, "Hello", Close, Open, "Goodbye", Close, Open, "Hello", Close, Open, "Hello", Close, Open, "Goodbye",...

  1. Change EV02 to autostart and add a Wait 0.0s before the message

Result: Open, "Hello", Close, Open, "Goodbye", Close, Open, "Goodbye", ...

Conclusions:

  • If a foreground event wants to spawn a message box on the same frame as a previous box closes, it draws the box right away with no animation
  • If the previous box is already closing, the foreground event will wait for it to close before it creates the new box.
  • Parallel event always wait for close.

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 14 - Parallel message timings

EV01 parallel

Msg: \s[20]\v[1]\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]\^
Sw1 On
Text \v[1]
EraseEvent

EV02 parallel page 1

Var1 +1

EV02 page 2 - activated by SW1

EV03 autostart

Var3 = Var1
EraseEvent

Result: "0", "48 48 41", "172"

@mateofio
Copy link
Contributor Author

Test Cases 15 - Parallel message timings (simple version)

EV01 parallel

Msg: \>\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]
EraseEvent

EV02 parallel page 1

Var1 +1

EV03 autostart

Var3 = Var1
EraseEvent

Result: "0", "17 17 10"

@mateofio
Copy link
Contributor Author

Test Cases 16 - Parallel message timings (simple version)

EV01

Var1 +1

EV02 parallel

Msg: \>\^
Var2 = Var1
Msg: \s[20]\v[1] \v[2] \v[3]
EraseEvent

EV03 autostart

Var3 = Var1
EraseEvent

Result: "0", "18 18 10"

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 17 - Messages and Scenes

Moved to #2079

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 18 - Messages and Teleport

Moved to #2079

@mateofio
Copy link
Contributor Author

mateofio commented Aug 26, 2019

Test Cases 19 - General event commands vs messages

EV01 parallel

Msg: Hello\^
Msg: \v[1]

EV02 parallel

CMD
Var1 +1
EraseEvent

Result: If CMD is blocked by the message, Var1 will not increment and we'll see the value as 0. If CMD is not blocked, we'll see Var1 == 1

CMD Blocked?
ShowText Y
DisplayTextOptions Y
ShowCoices Y
InputNumber Y
ChangeFace Y
ChangeSwitch N
ControlTimer N
ChangeGold N
ChangeItems N
ChangeParty N
ChangeEXP N
ChangeLevel N
ChangeParameters N
ChangeSkills N
ChangeEquip N
ChangeHP N
ChangeMP N
ChangeState N
RecoverAll N
DamageProcessing N
ChangeActorName N
ChangeActorNickName N
ChangeActorGraphic N
ChangeActorFace N
ChangeSYstemBGM N
ChangeSystemSE N
ChangeSystemGraphic N
ChangeSystemTransition N
BattleProcessing Y
ShopProcessing Y
InnProcess (cost 0) Y "Hello", Inn sequence, "0" ❗
InnProcess (cost > 0) N ❗
NamePrcess Y
TransferPlayer Y
GetPlayerLocation N
MoveToVariableLocation Y
GetOnOffVehicle N
SetVehicleLocation N
SetEventLocation N
SwapEventLocation N
GetTerrainID N
GetEventID N
HideScreen Y
ShowScreen Y
TintScreen N
FlashScreen N
ShakeScreen N
ScrollMap N
WeatherEffect N
Show Pic N
Move PIc N
Erase Pic N
ShowAnimation N
Show/Hide Player N
FlashEvent N
SetMoveRoute N
WaitForAllMovement N
StopAllMovement N
Wait N
Wait (WaitForKey) Y
PlayBGM N
FadeBGM N
MemorizeBGM N
PlayMemorizedBGM N
Play SE N
PlayMovie Y
KeyInputProc (NoWait) N
KeyInputProc (withWait) Y
ChangeTileset N
ChangeParallaxBack N
SetEncounterRate N
ChangeTile N
SetTeleportPoint N
Teleport On/Off N
SetEscapeLocation N
ChangeEscapeAccess N
OpenSaveMenu Y
OpenMainMenu Y
ChangeMenuAccess N
Branch N
Label N
JumpLabel N
Loop N
BreakLoop N
EndEventProcessing N
EraseEvent N
CallEvent N
Comment N
GameOver Y
ReturnToTitle Y
ChangeClass N
ChnageBattleCmds N
OpenLoadMenu N
ExitGame Y
ToggleATBMode N
ToggleFullScreen N
OpenVideoOptions Y

@mateofio
Copy link
Contributor Author

mateofio commented Aug 27, 2019

Test Cases 20 - Event blocking timing

  1. EV01 parallel
Msg: \>\^
EraseEvent

EV02 parallel

CMD
SW1On
Msg: \v[1]

EV03 parallel Page1

Var1+1

EV03 parallel Page2 activated by SW1

  1. Do with EV01 as autostart
  2. Repeat with EV02 as parallel
  3. Repeat with EV01 as autostart, add a Wait0.0s before CMD
CMD Var1 (autostart) Var1 (parallel) Var1 (autostart wait)
DisplayTextOptions 10 17 17
ChangeFace 10 17 17
BattleProcessing 18 18 18
ShopProcessing 18 18 18
NamePrcess 18 18 18
TransferPlayer 17 ❓ 17? 17
MoveToVariableLocation 17 ❓ 17? 17
HideScreen, ShowScreen 17 17 17
Wait (WaitForKey)
PlayMovie
KeyInputProc (withWait)
OpenSaveMenu 18 18 18
OpenMainMenu 18 18 18
GameOver ❓ 18? ❓ 18? ❓ 18?
ReturnToTitle ❓ 18? ❓ 18? ❓ 18?
ExitGame ❓ 18? ❓ 18? ❓ 18?
OpenVideoOptions 17 17 17

Conclusion

  • Change Text Settings and Change Face follow the same rules as ShowMessage.

@mateofio
Copy link
Contributor Author

mateofio commented Dec 31, 2019

Test Cases 41 - Non printables and new line glitch

Make EV02 parallel

Var1 += 1

Make EV01 autostart

Msg: \^
Var1 = 0
Msg: \s[2]\^[MSG]
Msg: \v[1]

With this we can print the frame timings of the following messages:

[MSG] frames
H\^ 9 ❗
\^H 7
H\_ 7
\_H 7
H\$ 9 ❗
\$H 7
H\> 7
\>H 5
H\< 9 ❗
\<H 7
H\. 23 ❗
\.H 21
H| 68 ❗
|H 66
H\c[2] 7 ❗
\c[2]H 5
H\s[2] 7 ❗
\s[2]H 5

Conclusions

  • The kill character \^ causes a delay of speed frames
  • If a non-printable character is the last character in the line, an additional delay of speed frames is added! ❗

@mateofio
Copy link
Contributor Author

mateofio commented Dec 31, 2019

Test Cases 42 - Teleport cancel glitch

Moved to #2079

mateofio added a commit to mateofio/Player that referenced this issue Dec 31, 2019
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Jan 1, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
@mateofio
Copy link
Contributor Author

mateofio commented Jan 1, 2020

Test Cases 43 - Level up msg timing tests

Create 3 actors with blank names.
Create 4 blank skills, each actor learns at levels 15, 20, 25, 30
Put all these actors in your party

Change the level up text to \>reached \^
Change the skill up text to \>was learned!\^

EV01 trigger

Msg: \^
Flash Screen
Var1 = 0
ChangeLevel: First blank actor + 30
Var2 = Var1
Msg: Time \v[1] \v[2]

EV02 parallel

Var1 += 1
  1. Talk to the event

Result:

  • Level Up + 3 skills
  • Immediate: 4th skill
  • Immediate "Time: 11 11"
  1. Change level to 25

Result:

  • Level Up + 3 skills
  • window close ❗
  • window open
  • Immediate "Time: 14 8"
  1. Change level to 20

Result:

  • Level Up + 2 skills
  • Immediate "Time: 6 6"
  1. Change the level up to 30 on entire party

Result:

  • Actor1: Level Up + 3 skills
  • Immediate: 4th skill
  • Immediate Actor2: Level Up + 3 skills
  • Immediate: 4th skill
  • Immediate Actor3: Level Up + 3 skills
  • Immediate: 4th skill
  • Immediate "Time: 33 33"

Conclusion

  • RPG_RT pushes messages using foreground event rules
  • If the last page has 4 lines, RPG_RT will block the interpreter an extra frame after the level up command. This is likely due to a timing issue around whatever mechanism RPG_RT is using to push messages.

@mateofio
Copy link
Contributor Author

mateofio commented Jan 1, 2020

Test Cases 44 - Level up chunk analysis

Use the actors and skills from previous test

EV01 parallel

Wait 0.0s
ChangeLevel: first actor + 20
EraseEvent

EV02 parallel

Wait 0.0s
OpenSaveMenu
EraseEvent

EV03 trigger

EV04 trigger

Sw1 off

Save, Save again from menu, talk to EV03, save, talk to EV04 save

Save EV01 current command EV02 current command Foreground Interpreter show message
1 3 2 1 ❓
2 3 0 1 ❗
3 3 0 1
4 4 0 0

Conclusion

  • Any interpreter causing a level up message will set the show_message chunk on the foreground interpreter, as if the foreground interpreter caused the message.
  • The show_message chunk is not cleared until the foreground interpreter runs.

mateofio added a commit to mateofio/Player that referenced this issue Jan 7, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Jan 8, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Jan 8, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
@mateofio
Copy link
Contributor Author

mateofio commented Jan 10, 2020

Test Cases 45 - Other teleport edge case

EV01 parallel

Var1 += 1

EV02 parallel

Wait 0.0s
Teleport this map
Var2 = Var1
Sw1 on
EraseEvent

EV03 autostart - SW01

Msg: \v[1] \v[2]

Result: Box pops open, teleport transitions, box closes, reopens, message says "10 2"

mateofio added a commit to mateofio/Player that referenced this issue Jan 13, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Jan 15, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Jan 15, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Feb 13, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Mar 3, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Mar 5, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Mar 5, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
mateofio added a commit to mateofio/Player that referenced this issue Mar 5, 2020
Emulates the RPG_RT behavior for EasyRPG#1706 Tests 17 & 18
@Ghabry Ghabry modified the milestones: 0.6.2, 0.6.3 Apr 9, 2020
@fdelapena fdelapena modified the milestones: 0.6.3, 0.7.0 Mar 20, 2021
@Ghabry Ghabry modified the milestones: 0.7.1, 0.7.2 May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants