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

BreakLoop is correct in Player but broken in RPG_RT #1442

Closed
mateofio opened this issue Oct 14, 2018 · 5 comments
Closed

BreakLoop is correct in Player but broken in RPG_RT #1442

mateofio opened this issue Oct 14, 2018 · 5 comments

Comments

@mateofio
Copy link
Contributor

mateofio commented Oct 14, 2018

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:

Loop
  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?

@CherryDT
Copy link

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)...

@Ghabry
Copy link
Member

Ghabry commented Oct 14, 2018

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)

@mateofio
Copy link
Contributor Author

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.

@fdelapena
Copy link
Contributor

Related for a unified CLI and INI configuration: #627

@mateofio
Copy link
Contributor Author

mateofio commented Nov 6, 2018

Closed this in favor of #1486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants