How long does movements take

MilesLaer

Villager
Member
Joined
May 20, 2020
Messages
6
Reaction score
1
First Language
deutsch(german)
Primarily Uses
RMMV
Hey people,

maybe I'm to dumb to search things but I can't find the times needed for movements.
What I mean is moving left right etc take some time, right?
How long do movements take with the different speeds?
Does diagonal movement take longer?

Aynthing else interesting about this topic would be nice, too.
 

Hyouryuu-Na

Procrastinator
Veteran
Joined
Jun 15, 2017
Messages
787
Reaction score
1,764
First Language
Not English
Primarily Uses
RMMV
It's hard to determine as it depends on the distance. Even for one tile, it must be a few frames. I don't think anyone's ever measured how long it takes. What do you need the movement time for?
 

MilesLaer

Villager
Member
Joined
May 20, 2020
Messages
6
Reaction score
1
First Language
deutsch(german)
Primarily Uses
RMMV
I'm asking for one tile movements.
What I want to do currently is I have two movements and one should start walking some time after the first started walking.
I could handle it with breaking the first movement into two movement routes while the first part would be wait for completition but I would also like to know. I'm interested and wouldn't need to search another way to do it everytime something like this occurs.
So what am I asking for specifically
How long or many frames does it take to move 1 tile left, right, up, down, diagonaly with all speeds?
 

Hyouryuu-Na

Procrastinator
Veteran
Joined
Jun 15, 2017
Messages
787
Reaction score
1,764
First Language
Not English
Primarily Uses
RMMV
You could uncheck wait for completion. Then wait a little from the wait command. Then set the other half. If you give wait for completion, the other half will run after the first half has completely ended.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
685
Reaction score
378
First Language
Poland
Primarily Uses
RMMV
With basic speed movement of player moving from one tile to another takes 56~59 frames wich gives approx 0.983 second, assuming that you are not using diagonal movement plugin and game runs smoothly because in diagonal movement that time is little longer (basic geometry) - Actually I measured that time when I tried to determine optimal player movement speed, that would be most resembling to our human, regular walk speed.

Edit: for me approx measurment is good enough, but if you wish to have more precise data, then you have to make several measurments in different conditions and calculate average time from those measurements.
And how to calculate average value in case you don't know:
1st element - 4
2nd element - 5
3rd element - 9

Sum those elements and gives it 18, now divide it by number of elements ( 3 in this example), average value will be 6
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,832
Reaction score
1,292
First Language
EN
Primarily Uses
RMMZ
Frames per tile is equal to 2 to the power of (8 - moveSpeed):
JavaScript:
Game_CharacterBase.prototype.distancePerFrame = function() {
    return Math.pow(2, this.realMoveSpeed()) / 256;
};
So:
  • Speed 3 = 32 frames per tile
  • Speed 4 = 16 frames per tile (default player walk speed)
  • Speed 5 = 8 frames per tile (default player dash speed)
:kaothx:

Edit: also, a diagonal move takes exactly as long to complete as an orthogonal one:
JavaScript:
Game_CharacterBase.prototype.updateMove = function() {
    if (this._x < this._realX) {
        this._realX = Math.max(this._realX - this.distancePerFrame(), this._x);
    }
    if (this._x > this._realX) {
        this._realX = Math.min(this._realX + this.distancePerFrame(), this._x);
    }
    if (this._y < this._realY) {
        this._realY = Math.max(this._realY - this.distancePerFrame(), this._y);
    }
    if (this._y > this._realY) {
        this._realY = Math.min(this._realY + this.distancePerFrame(), this._y);
    }
    if (!this.isMoving()) {
        this.refreshBushDepth();
    }
};
 
Last edited:

MilesLaer

Villager
Member
Joined
May 20, 2020
Messages
6
Reaction score
1
First Language
deutsch(german)
Primarily Uses
RMMV
You could uncheck wait for completion. Then wait a little from the wait command. Then set the other half. If you give wait for completion, the other half will run after the first half has completely ended.
That's excatly what it should do. I'll have three movement routes than. The first movement would be broken apart into two movement routes and the second would stay how it is.
That waiting time is excatly what I'm seraching.

Actually I measured that time
That's actually a good idea but relativ to your system, too, and like you said it's and approximation.

Frames per tile is equal to 2 to the power of (8 - moveSpeed)
That's excatly what I was searching for. Thank you very much
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
685
Reaction score
378
First Language
Poland
Primarily Uses
RMMV
So, my measures have slight miscalculations, no wonder - I used timer in my watch :D
IMG_20200810_193216.jpg
Oh dang, battery discharged.
@caethyril, I also didn't know that movement is that way calculated.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I guess if you're just going solo dev, minimize features is better choice.
As close as possible, now I draw all of them with little by little needle sticking.
Welp, back to the drawing board...
Ami
--- Overused ---

Hero: (Drink 3 HP Bottle L)
F.Healer: Don't drink too much,or you got sick!
Hero: Nah,i'm okay. it's the way to repleni---
(Hero Collapse)
Hero: (Weak) Ugh...my head (Coughing Then Vomiting)
F.Healer: I told you to don't Drink 3 HP Bottle L or you're Sick. Let's go to Doctor.
Shaking off the dust. Clearing the cobwebs. Time to get back to gam-mak!

Forum statistics

Threads
103,214
Messages
998,047
Members
134,692
Latest member
Matkacharts
Top