Remove Lerping From Movement

Hey, guys, this is a fun request.

So, in some very old computer games, due to hardware limitations, all movement was done instantaneously as having interpolated movement would cause attribute clash, causing graphical bugs. I want to do this in RPG Maker too.

An example can be seen here(ish):
While the movement in the video is teleporting at half steps, I would rather have all character be instantly teleported to the next tiles when they need to go somewhere. Now, I have gotten somewhere with this idea, but the issue comes up with my code not having a pause for movement speed as that was done in lerping (probably in Game_CharacterBase.prototype.distancePerFrame), nor do I know how would I deal with that. As such, if I hold down the key, my character flies across the map. I don't want this.

My poor code that skips movement animation (original in rpg_objects.js):
Spoiler: JS
Game_CharacterBase.prototype.updateMove = function() {

this._realX = this._x;
this._realY = this._y;
if (!this.isMoving()) {
this.refreshBushDepth();
}
};

If anyone has any ideas on how to remove the lerping or could make a plugin for me to do so, let me know.
I could still use some help with this, so I'm bumping the topic. Also, I'm not the only one making a ZX-inspired game, so the plugin might be of use to several people.
Here you go!

https://github.com/agoaj/ZXMovement/blob/master/ZXMovement.js

Code:
//=============================================================================
// ZXMovement.js
//=============================================================================
/*:
 * @plugindesc Allow character movement at fixed intervals without lerping
 *
 * @author Agoaj
 *
 * @param Move Delay
 * @desc Sets the time before your character can take another step in Milliseconds.
 * Default: 100
 * @default 100
 * @help
 *
 * COMPATIBILITY
 * Replaces Game_CharacterBase.updateMove and Game_CharacterBase.isMoving
 */
 
 (function() {
    
    var parameters = PluginManager.parameters('ZXMovement');
    
    var paramMoveDelay = Number(parameters['Move Delay'] || 100)*4;
    
    Game_CharacterBase.prototype.updateMove = function() {
        if(this._realX != this._x || this._realY != this._y)
            this.movementStartedTime = SceneManager._currentTime;
        this._realX = this._x;
        this._realY = this._y;
        this.refreshBushDepth();
    };
    
    Game_CharacterBase.prototype.isMoving = function() {
        if(this._realX != this._x || this._realY != this._y)
            return true;
        if(typeof this.movementStartedTime === 'undefined')
            return false;
        if(this.movementStartedTime + paramMoveDelay / this._moveSpeed <= SceneManager._currentTime)
            return false;
        if(this.movementStartedTime > SceneManager._currentTime)
            return true;
        return true;
    };
    
 })();

You are a legend among men, this is the perfect plugin.

EDIT: Actually, it's having issues with events. I have a Below Characters on Player Touch event that warps you to another map without any sort of fade, but when I have this plugin, it's not set off. Hm, why would that be?

EDIT 2: More creative eventing fixed the stutter, this is perfect.
I love this Agoaj but event movement is really jerky, like it lags behind ever so slightly, it's a shame because for me it breaks the ZX immersion and it looks annoying to the eye too. Maybe something needs to be done to some update frequency too?
I love this Agoaj but event movement is really jerky, like it lags behind ever so slightly, it's a shame because for me it breaks the ZX immersion and it looks annoying to the eye too. Maybe something needs to be done to some update frequency too?

Try increasing the movement frequency.
Really sorry to necro this, but I decided to look further into the Below Characters on Player Touch event... thing. If the event is below characters, the player physically cannot trigger the event. I've tried to merge the code to have this.movementStartedTime be around and the rest of it be from rpg_objects.js, but even that change alone broke the event trigger code. Removing this.movementStartedTime and keeping the rest of the code from your plugin also breaks the event triggers. Looks like ANY change made to this somehow makes it impossible to set off below character events, and it's honestly confusing me. So, yeah, anyone using this in the future: right now, you can't have events underneath your character. I'd personally really like to see this fixed some day, but it's breaking SOMETHING and I don't know what or how.
@MoonMoonGames In my experience, below character events require the player to have stepped on the tile to trigger them. Since you are teleporting to the location, it is not triggering. Maybe if you teleported to one tile before the event, then manually walked the last step?
@bgillisp Looking at the code, it just removes the animation for movement. Even when I copy and paste the original code from rpg_objects.js and keep the forced stutter from the plugin above, it doesn't function properly.
I was pointed towards this plugin from a similar request I made. I'm also encountering the issue MoonMoonGames is having. In addition, random battles don't appear to work either.
I was pointed towards this plugin from a similar request I made. I'm also encountering the issue MoonMoonGames is having. In addition, random battles don't appear to work either.
Place this parallel event and it can give you random battles (just call a common event with the random pool you want, use a temp variable and a series of if/switch/conditional statements to see which event you'll trigger), but I can't think of a way for that to work with below player events.

VpVIbFE.png
I've been looking around rpg.objects. Could the plugin be interfering in anyway with Game_Player? agoaj claims that it's just replacing updateMove and isMoving in Game_Character, but there's a bunch of stuff in Game_Player that affects Touch action and even random encounters, I think. My coding knowledge is not very good, but I'm just trying to explore ideas why these two problems are occurring.
I honestly wish I knew.

I figured out a hack for below characters - player touch, but it will require it to act as same characters - player touch. You act it as same characters - player touch, and then immediately move the event off screen. It's not great since you'll effectively have to force the player into touching the event instead of just stepping on it, but it's better than nothing.
Okay, I've been digging around more, and I think I found what is causing the issue. Bear in mind my coding knowledge is next to zero so I've been brute forcing it and don't know how to apply a permanent fix.

I believe the issue is this bit of code in rpg.objects, starting at line 7753:

Code:
Game_Player.prototype.updateNonmoving = function(wasMoving) {
    if (!$gameMap.isEventRunning()) {
        if (wasMoving) {
            $gameParty.onPlayerWalk();
            this.checkEventTriggerHere([1,2]);
            if ($gameMap.setupStartingEvent()) {
                return;
            }
        }
        if (this.triggerAction()) {
            return;
        }
        if (wasMoving) {
            this.updateEncounterCount();
        } else {
            $gameTemp.clearDestination();
        }
    }
};

If I add "this.checkEventTriggerHere([1,2])" and " this.updateEncounterCount();" to agoaj's plugin, I'm actually able to get random encounters and touch below events to work. However if I move more than 2 steps, it crashes and says they aren't functions (don't know how to fix this).

I'm guessing the code above somehow relies on the animation in normal movement (something to do with $gameParty.onPlayerWalk()???) to get encounters and touch below events to work. So when you get rid of that animation, the code stops working, perhaps???
I know this is an old post, but I've been using this plugin for a bit and just noticed an issue. If you save and then load the game, it acts like you're moving, but you're not, and does not allow you to move. This basically renders this plugin useless for games that aren't a one-and-done affair.

EDIT: After asking around, I found a fix to this issue!

The line:
if(this.movementStartedTime > SceneManager._currentTime) return true;

Needs to be changed to:
if(this.movementStartedTime > SceneManager._currentTime) return false;

Original thread: https://forums.rpgmakerweb.com/threads/remove-lerping-from-movement.96831/