Changing pixel step size for "walking" sprites?

I'm playing around with a project that is intended to mimic NetHack's graphic style. One thing I'd like to know is if there's a way to disable how the player animation "slides" in to the next tile and instead just "snaps" in to a tile like how NetHack does it, while also keeping the speed of the normal movement?

To further expand on this, let's say that for the player to move from tile to tile, there's pixel movement steps as the icon moves across the map. I don't want the animation of movement at all, including how the sprite "slides" across the map. I just want it to go from tile to tile. In BYOND they called it something like "step_size".

If I turn the player movement speed up to max, at the very least it gives the illusion of the movement I want, but then the players are also running around maps at the speed of light.
Hey, @lab-lover. I don't have a foolproof solution for you, but I have made something that might help you get started. I'm using RMMZ, but I doubt the code is much different for RMVXA.

I created an event that mimics the "snap-in" mechanic you described. I've posted both pages of the event for your reference. In page 1 of the event, I set up page 2 by setting the player to wait indefinitely, and set some variables to the step size and map ID.
1707291052754.png


Page 2 is a parallel event that constantly finds the x and y coordinates of the player character on the map and is where the "snap-in" mechanic comes into play. The player is transferred around quickly using variables to give the illusion of snap-in. Depending on what directional button is being pressed, the player will be transferred to the specified map given by the Map ID variable and the specific coordinates will be given by the player's current coordinates plus or minus the Step Size of either the x or y coordinates depending on the direction.
1707291010452.png


There is of course many problems with this. For one, since the player is in a waiting state, they can't interact with anything. I found that not putting the player in a wait state makes the snap-in illusion less accurate. And this event only works on one map. You would have to make it a common event for it to work on all maps. And then you'd have to think about all the different maps to keep track of and how to prevent the player from moving through obstacles they shouldn't be able to move through...

But hey, I don't know exactly what you want for your game, so I'm going to stop there. But I hope this puts you in the right direction going forward.

EDIT: I also found this old thread about a plugin that might help too, but apparently it has some issues that may or may not have been fixed. https://forums.rpgmakerweb.com/index.php?threads/remove-lerping-from-movement.96831/
Hey, @lab-lover. I don't have a foolproof solution for you, but I have made something that might help you get started. I'm using RMMZ, but I doubt the code is much different for RMVXA.

I created an event that mimics the "snap-in" mechanic you described. I've posted both pages of the event for your reference. In page 1 of the event, I set up page 2 by setting the player to wait indefinitely, and set some variables to the step size and map ID.
View attachment 294352

Page 2 is a parallel event that constantly finds the x and y coordinates of the player character on the map and is where the "snap-in" mechanic comes into play. The player is transferred around quickly using variables to give the illusion of snap-in. Depending on what directional button is being pressed, the player will be transferred to the specified map given by the Map ID variable and the specific coordinates will be given by the player's current coordinates plus or minus the Step Size of either the x or y coordinates depending on the direction.
View attachment 294351

There is of course many problems with this. For one, since the player is in a waiting state, they can't interact with anything. I found that not putting the player in a wait state makes the snap-in illusion less accurate. And this event only works on one map. You would have to make it a common event for it to work on all maps. And then you'd have to think about all the different maps to keep track of and how to prevent the player from moving through obstacles they shouldn't be able to move through...

But hey, I don't know exactly what you want for your game, so I'm going to stop there. But I hope this puts you in the right direction going forward.

EDIT: I also found this old thread about a plugin that might help too, but apparently it has some issues that may or may not have been fixed. https://forums.rpgmakerweb.com/index.php?threads/remove-lerping-from-movement.96831/

I wanted to let you personally know that I appreciate the amount of effort you went to in order to help me. I am unsure if this is the direction I want to go in, I guess I had been really hoping there was just something under the hood or a plugin or script to help.

I smell what you're stepping in since I've already been playing with tracking player map locations in order to get around the weird limitation RPG Maker has with events crossing over one another. I'll take some time to consider your advice, but I may end up just accepting I cannot get the effect I want.

Edit: I looked at your link and yes, that's what I want to do is replicate ZX Spectrum movement, unfortunately it looks like it ended up dying out before it ever got properly fixed.
I wanted to let you personally know that I appreciate the amount of effort you went to in order to help me. I am unsure if this is the direction I want to go in, I guess I had been really hoping there was just something under the hood or a plugin or script to help.

I smell what you're stepping in since I've already been playing with tracking player map locations in order to get around the weird limitation RPG Maker has with events crossing over one another. I'll take some time to consider your advice, but I may end up just accepting I cannot get the effect I want.

Edit: I looked at your link and yes, that's what I want to do is replicate ZX Spectrum movement, unfortunately it looks like it ended up dying out before it ever got properly fixed.

Yeah, I thought it might have been unnecessary to provide that longwinded and probably unhelpful tutorial. And I'm sorry to hear that the plugin I linked won't work for you. Still, I hope you can somehow figure it out somewhere along the road, or maybe someone else will be able to help more than I could.
I recommend against misappropriating RPGmaker's event system which are built for cutscenes. If you're trying to event your movement mechanics your controls are going to be jank if they function like miniature cutscenes.

The solution is to literally just rewrite some core functionality. This preserves the root move speed, only forces all sprites to display at only at their map location, not their 'real' location. However I tested this and this movement style will look extremely laggy. There is nothing I can do about this.

Code:
Game_CharacterBase.prototype.scrolledX = function() {
    return $gameMap.adjustX(this._x);
};

Game_CharacterBase.prototype.scrolledY = function() {
    return $gameMap.adjustY(this._y);
};
recommend against misappropriating RPGmaker's event system which are built for cutscenes.
Gensun, the event system is a core functionality of RPG Maker and a huge part of it's code-less game development marketing. The event system actively enables devs to create new functionality within their games when they are unable to code themselves. This is not misappropriation of the event system, this is using it exactly as intended - even if the end result is not the best.
Events are not just built for cutscenes; that is not their sole purpose.

Your programming skills are appreciated, I just felt the need to set the record straight on that one as I don't want new users thinking that they shouldn't use the event system to create game systems and should only use it for making cutscenes.
Gensun, the event system is a core functionality of RPG Maker and a huge part of it's code-less game development marketing. The event system actively enables devs to create new functionality within their games when they are unable to code themselves. This is not misappropriation of the event system, this is using it exactly as intended - even if the end result is not the best.
Events are not just built for cutscenes; that is not their sole purpose.

Your programming skills are appreciated, I just felt the need to set the record straight on that one as I don't want new users thinking that they shouldn't use the event system to create game systems and should only use it for making cutscenes.

This isn't the topic of discussion but I wanted to add I kind of thought that was a weird, I have used the event system for everything I can and have only relied on scripts or plugins when I couldn't figure it out myself.

I recommend against misappropriating RPGmaker's event system which are built for cutscenes. If you're trying to event your movement mechanics your controls are going to be jank if they function like miniature cutscenes.

The solution is to literally just rewrite some core functionality. This preserves the root move speed, only forces all sprites to display at only at their map location, not their 'real' location. However I tested this and this movement style will look extremely laggy. There is nothing I can do about this.

Code:
Game_CharacterBase.prototype.scrolledX = function() {
    return $gameMap.adjustX(this._x);
};

Game_CharacterBase.prototype.scrolledY = function() {
    return $gameMap.adjustY(this._y);
};

I appreciate your attempt at helping me out, I sincerely want you to know that. I probably won't go in that direction due to the lag. I also realized after doing some events that had the player "jumping" that without the jumping "effect" it would look weird, like the player is teleporting instead of jumping.
Folks I appreciate everyone trying to help me, but I believe this isn't worth the effort being put fourth. I feel bad that a couple of you went out of your way and went above and beyond, thank you for your help and consideration.

Is there a way I can lock this as solved or something? At the very least if anyone else ends up trying to figure out the same thing they can see this thread.
Is there a way I can lock this as solved or something?
Clickt he "! Report" icon to the bottom left of your OP or last post in the thread and type in the reason as "Solved" and whenever a mod has a chance they'll swing by and lock it up for you.

Edit:
Said right, meant left. Directions, how do those work?

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/changing-pixel-step-size-for-walking-sprites.165531/