Player: BreakLoop is correct in Player but broken in RPG_RT

Created on 14 Oct 2018  路  5Comments  路  Source: EasyRPG/Player

There's an interesting bug that's present in both RM2K and RM2k3 RPG_RT. I can reproduce it on the latest versions in steam.

BreakLoop doesn't work with nested loops. It always just jumps to the next EndLoop statement regardless of nesting.

Consider the following code:

  BreakLoop
  Loop
  EndLoop
  Text: Hello
EndLoop
Text: Goodbye

Anyone who has done any programming would expect to see "Goodbye" and then the code exits. But in RPG_RT this code will infinite loop on "Hello".

I see that Player handles BreakLoop correctly, but being correct is not compatible with RPG_RT.

What should we do here?

I wonder if any game really relies on this broken behavior?

EvenInterpreter

Most helpful comment

I guess someone does. Also I think some patches fixed this (maybe destiny?) and I wanted to fix it too but didn't do it yet because I thought it'd need some kind of compatibility option for existing games.

I think later this could really be a compatibility flag, and if you really have an exe analysis file some day it could determine it (and player-only games would of course have the correct behavior)...

All 5 comments

I guess someone does. Also I think some patches fixed this (maybe destiny?) and I wanted to fix it too but didn't do it yet because I thought it'd need some kind of compatibility option for existing games.

I think later this could really be a compatibility flag, and if you really have an exe analysis file some day it could determine it (and player-only games would of course have the correct behavior)...

Well, we could do this as always:
There could be a check added which detects this Loop corner case and output a debug message in the log (with event and line) and then wait for Android bug reports which contain this debug line in the logfile :D (and then manually analyze if the different behaviour breaks the game)

Maybe we need a compatibility mode with a --no-compatible command line argument. Maybe rpg_rt.ini support as well.

Compatible mode would be the default. With that we reproduce all RPG_RT bugs accurately. Games built for Player can use non compatible mode and get bugfixes.

Related for a unified CLI and INI configuration: #627

Closed this in favor of #1486

Was this page helpful?
0 / 5 - 0 ratings