Add Review
Subscribe
Nominate
Submit Media
RSS
Smooth Science
WolfCoder- 08/10/2014 09:45 PM
- 1619 views
Link_2112 just told me the player "stutters" as they walk, "stuttering" every tile as though it were to stop. Now this could be a problem as I want the engine to run smoothly and I had explicitly written the code to keep the player moving and prevent stuttering while holding down a direction. But this "stuttering" is a very perceptual problem. Is there a way to objectively detect and eliminate this problem?
I figured the technical definition is that the player sprite is not moving the same amount of distance each frame even though the frame rate is nearly perfectly stable (~60 or so FPS) when I checked. A job for simple science- record the time factor (to verify the frame rate is nearly perfectly stable) and the distance the player moved (at RPG Maker 2003's scale it is pixels per frame). I recorded a segment where I walk back and forth on a map:
The BLUE line is the time factor which shows the frame rate is indeed stable, but you can see in RED that the player distance is not. There's frames where the player suddenly moves slower but does not actually stop at all which will, on some systems for some people, cause stuttering.
I can now start debugging and then test to see if the problem is eliminated objectively as opposed to just looking at the screen and saying "looks ok".
Never assume your perception or assumptions are always correct.
I figured the technical definition is that the player sprite is not moving the same amount of distance each frame even though the frame rate is nearly perfectly stable (~60 or so FPS) when I checked. A job for simple science- record the time factor (to verify the frame rate is nearly perfectly stable) and the distance the player moved (at RPG Maker 2003's scale it is pixels per frame). I recorded a segment where I walk back and forth on a map:

The BLUE line is the time factor which shows the frame rate is indeed stable, but you can see in RED that the player distance is not. There's frames where the player suddenly moves slower but does not actually stop at all which will, on some systems for some people, cause stuttering.
I can now start debugging and then test to see if the problem is eliminated objectively as opposed to just looking at the screen and saying "looks ok".
Never assume your perception or assumptions are always correct.
Posts 

Pages:
1
I noticed it within the first few seconds of my first test play. Nobody else did? Hopefully it's an easy fix.
I said some systems and people. It never actually stutters much to me, but obviously the data doesn't lie.
This is all because it's using tile movement and I have to make sure the sprites always align to grid. Pixel movement is much easier to write and to make smooth. When I add pixel movement, you wouldn't ever see this.
This is all because it's using tile movement and I have to make sure the sprites always align to grid. Pixel movement is much easier to write and to make smooth. When I add pixel movement, you wouldn't ever see this.
Nope, I've tested it on several occasions and never noticed this problem. In fact, I just tested it a few moments ago to make sure I wasn't just ignoring the problem. I went out of my way to look for it and I honestly don't see it at all.
Great find though, since apparently a problem is present!
Great find though, since apparently a problem is present!
I had already tuned it up a while ago, it'll be in the next release. You might notice something. Link_2112 is the kind of person who just notices these things. He also complained about the tiny "bumps" in the LandTraveller test programs where it was loading and/or generating new chunks.
But for RPG20XX, there's no excuse at all that the video should be anything less than perfectly smooth and rapid on even slow machines. RPG Maker VX/Ace's inexplicably clunky frame rate always bothered me.
But for RPG20XX, there's no excuse at all that the video should be anything less than perfectly smooth and rapid on even slow machines. RPG Maker VX/Ace's inexplicably clunky frame rate always bothered me.
Pages:
1












