Player: Mondschein: Player speed too high in cutscenes

Created on 10 Sep 2017  路  18Comments  路  Source: EasyRPG/Player

Name of the game: Mondschein (download)

Describe the issue in detail and how to reproduce it:

Start the game and watch the intro for one minute, then you run away from your mother... 馃弮

test
(left is RPG_RT, right is Player)

The same seems to happen later in the game, when you again run away from 3 girls (not verified myself, was reported on google play)

Relevant Map: 5 (erz盲hlung-weg). Both the Player and the [mother] event have a custom move route containing just "Move Left" commands at frequency 8, nothing special.

EvenInterpreter Move Routes Patch available

Most helpful comment

This can be distilled down to a very simple test case

Create 2 maps.

Map 1 has autostart event

SetMoveRoute: Player, Increase Speed, Increase Speed
Teleport to Map 2

Map 2 has autostart event

SetMoveRoute: Player, Right, Right, Right, Right, Right

In RPG_RT, the player walks at normal speed. In Player, the player walks fast.

If you change the 2nd event to parallel, the player walks normal speed in both cases.

This is probably related to the second item in #1606

All 18 comments

I guess this is caused by a page switch. In that case the moveroute speed is overwritten due to a bug.

Another turbo bug happens when stepping on the slide in Grimps - Level 4:
https://youtu.be/-R_NyRr6Sz0?t=9m32s

In Player, the slide does not work correctly and you stop midway while the actor speed is too high afterwards.

Nothing too fancy here about the "ICE" Events:
screenshot

The Mondschein bug is caused by the last move command executed in the event on the map "Schwarzer Bildschirm" which is "Increase Move Speed, Increase Move Speed" followed by a teleport. The move command is not executed on RPG_RT and the move speed stays low BECAUSE directly after the teleport another move command is executed that overwrites the buggy one. When you put a "Wait for All Movement" before the teleport the fast movement issue is also in RPG_RT.

via Event Tracer plugin I observed that no Move commands are executed during the first frame on the new map.
Even when not a single event runs on the new map the movement will be one frame late.

Fixed the problems in Grimps @carstene1ns but that was a completely different bug ^^'

This can be distilled down to a very simple test case

Create 2 maps.

Map 1 has autostart event

SetMoveRoute: Player, Increase Speed, Increase Speed
Teleport to Map 2

Map 2 has autostart event

SetMoveRoute: Player, Right, Right, Right, Right, Right

In RPG_RT, the player walks at normal speed. In Player, the player walks fast.

If you change the 2nd event to parallel, the player walks normal speed in both cases.

This is probably related to the second item in #1606

Unfortunately this is still broken in #1694

My test case, the frame timing in RPG_RT must be this:

  • Preupdate - nothing happens
  • Player updates
  • autostart sets move route on player
  • autostart initiates teleport
  • Preupdate runs on map2 - player not updated
  • Normal update - something blocks the player update route! :question:
  • Autostart runs - sets new move route for player to walk

So something is blocking the player update routine from running on the first frame of map2. Which prevents the move speed up commands from executing.

Putting a OpenSaveMenu before the move route to move right:

| Save | move speed | move route overwrite | stop count | processed | current command |
| -- | -- | -- | -- | -- | -- |
| 1 | 4 | 1 | 65535 | 1 | 1 |

Adding another parallel event with OpenSaveMenu to the second map. This runs at preupdate, showing us the player state before the blocked update routine

| Save | move speed | move route overwrite | stop count | processed | current command |
| -- | -- | -- | -- | -- | -- |
| 1 | 4 | 1 | 65535 | 1 | 2 |

Test Cases 1 - New Game

  1. EV01 parallel
Var1 + 1

EV02 autostart

Msg: \v[1]

Result "2"

  1. EV01 parallel
Var1 + 1

CE1 autostart

Msg: \v[1]

Result "2"

Conclusion

Foreground interpreter's don't run during pre-update.

Test Cases 2 - Teleport

Map1 - EV01 trigger

SW1 on
Teleport to Map2
Msg: \v[1]

Map2 EV01 parallel

Var1 + 1
  1. Talk to the event

Result: Teleport, "1"

  1. Remove the Msg from Map1 EV01

Map2 EV02 autostart

Msg: \v[1]

Result "1"

  1. Remove Map2 EV02, Add CE1 autostart, triggered by SW1
Msg: \v[1]

Result "1"

Conclusion

Foreground interpreter's do run during pre-update after teleporting!

Test Cases 3 - Teleport Skill

Map1 - EV01 trigger

SetEscapePoint Map2, SW1 on
AddSkill: Party, Escape
Enable Escape

Map2 EV01 parallel

Var1 + 1

Map2 EV02 autostart

Msg: \v[1]
  1. Cast Escape

Result: "2"

  1. Remove Map2 EV02, Add CE1 autostart, triggered by SW1
Msg: \v[1]

Result "2"

Conclusion

Foreground interpreter's do not run during pre-update after using a teleport skill.

Test Cases 4 - Picture test

Map1 EV01 trigger

Teleport Map2
  1. Map2 EV01 parallel
Show Picture

Result: Picture fades in with transition

  1. Map2 EV01 autostart
Show Picture

Result: Picture pops in after transition

Conclusion

It must be the case that foreground events run as a special step during pre-update after transition in..

Test Cases 5 - Multi-teleport test

Map1 EV01 trigger

Teleport Map2

Map2 EV01 parallel

Teleport Map3

Map2 EV02 autostart


Map3 EV01 parallel

Var2 +1

Map3 EV02 autostart

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

Result "0 1"

Conclusion

Multiple parallel teleports skip the foreground events for the intermediate maps

Did a quick and dirty test.

Adding this teleport foreground behavior along with the async transition behavior of #1784 fixes this bug.

This one also fixes #1840

Will prepare a PR

Test Cases 6 - Multi-teleport test from new game

Map1 EV01 parallel

Teleport Map2

Map1 EV01 autostart


Map2 EV01 parallel

Var2 +1

Map2 EV02 autostart

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

Result "0 2"

Conclusion

Multiple parallel teleports from new game still don't run foreground events.

Test Cases 7 - Multi-teleport (parallel) test from Escape

Map1 - EV01 trigger

SetEscapePoint Map2
AddSkill: Party, Escape
Enable Escape

Map2 EV01 parallel

Teleport Map3

Map2 EV02 autostart


Map3 EV01 parallel

Var2 +1

Map3 EV02 autostart

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

Result "1 2"

Conclusion

Foreground events don't run on multi-teleport here either!

Test Cases 8 - Multi-teleport (autostart) test from Escape

Map1 - EV01 trigger

SetEscapePoint Map2
AddSkill: Party, Escape
Enable Escape

Map2 EV01 autostart

Teleport Map3

Map2 EV02 parallel


Map3 EV01 parallel

Var2 +1

Map3 EV02 autostart

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

Result "2 1"

Conclusion

The teleport command on map 2 behaves like a normal teleport

Test Cases 9 - Triple Multi-teleport (parallel) test from Escape

Map1 - EV01 trigger

SetEscapePoint Map2
AddSkill: Party, Escape
Enable Escape

Map2 EV01 parallel

Teleport Map3

Map2 EV02 autostart


Map3 EV01 parallel

Teleport Map4

Map3 EV02 autostart


Map4 EV01 parallel

Var2 +1

Map4 EV02 autostart

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

Result "0 2 1"

Conclusion

Normal foreground event behavior is set for 2nd teleport.

Test Case 10 - The simple truth

Map2 EV01 parallel

Var1 + 1

Map2 EV02 autostart

Msg: \v[1]
  1. Map1 EV01 trigger
Teleport Other map

Result "1"

  1. Map1 EV01 trigger
SW1 On

Map1 EV02 parallel

Teleport Map2

Result "2"

  1. Delete Map1 EV02
    Add CE1 autostart
Teleport Map2

Result "1"


  1. Add CE1 parallel
Teleport Map2
Sw1 pff

Result "2"

Conclusion

  • If you teleport from a foreground event, foreground events run in preupdate
  • If you teleport from a parallel event, parallel events do not run in preupdate
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jenes2 picture jenes2  路  13Comments

akien-mga picture akien-mga  路  15Comments

chaoskagami picture chaoskagami  路  14Comments

fmatthew5876 picture fmatthew5876  路  14Comments

LucasMW picture LucasMW  路  19Comments