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

Improve Movement Type Cycle #1167

merged 4 commits into from May 25, 2017


None yet
4 participants

scurest commented May 17, 2017

This fixes (or at least improves) the second bullet point (and only the second bullet point) in #1115. Events with movement type cycle now prefer moving forward, if possible. Basically, the algorithm is now

  1. When we're ready to move, try moving forward (or in the default direction if we're facing the wrong way: Right for Left-Right, Down for Up-Down)
  2. If that failed for 20 frames, keep trying to move forward, but if it fails, now try moving the opposite way too.
  3. If that fails for 40 more frames, try going forward and if it fails, now move (don't just try to move) in the opposite way, and reset

By "try to move" I mean to do the same thing as doing a Move in a move route with the "Ignore if can't be moved" option toggled on. It turned out, though, that this also behaved differently in Player; even if you didn't move, the command wasn't totally ignored; you'd still turn to face the move direction. In RPG_RT, this doesn't happen. So I fixed this too.

The (probably totally useless in actual games) case of an event between two obstacles on either side that can't move should now also turn around with the same timing as in RPG_RT.

Yeah. Um. Do we know where in Deep 8 this was a problem? Probably be good to test it.

scurest added some commits May 16, 2017

Add an IgnoreIfCantMove option to Move
In RPG_RT, if a move route has "Ignore If Can't Move" checked and
a movement fails, the character's won't change. This commit brings
Player into line with this.
Increase accuracy for cycle movement
Events should move in the direction they are facing if possible
rather than retaining the direction to cycle in their state.
The delay between movements was also matched up to RPG_RT.
Particularly in the case that the event is between two obstacles
on either side and can't move, the interval in frames between
the times it turns should be correct now.

This comment has been minimized.

Show comment
Hide comment

Ghabry May 17, 2017


Looks good :D

deep8-movement-0 5 2

But I didn't capture the funny part: This map loops so after a while Chloe will pass again.


Ghabry commented May 17, 2017

Looks good :D

deep8-movement-0 5 2

But I didn't capture the funny part: This map loops so after a while Chloe will pass again.


Ghabry approved these changes May 17, 2017

@fdelapena fdelapena added this to the 0.5.2 milestone May 21, 2017

Show outdated Hide outdated src/game_event.h
Show outdated Hide outdated src/game_character.h

@carstene1ns carstene1ns merged commit 50f2941 into EasyRPG:master May 25, 2017

6 checks passed

Android (armeabi-v7a) Build finished.
GNU/Linux Build finished.
OSX Build finished.
Windows (x64) Build finished.
Windows (x86) Build finished.
web Build finished.

@scurest scurest deleted the scurest:iss1115 branch Jun 2, 2017

Ghabry pushed a commit to libretro/easyrpg-libretro that referenced this pull request May 22, 2018

Merge pull request #1167 from scurest/iss1115
Improve Movement Type Cycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment