- Joined
- Jun 2, 2019
- Messages
- 20
- Reaction score
- 1
- First Language
- English
- Primarily Uses
- RMVXA
I'd like to give player a slight boost in movement speed, among other things, to cut down time on backtracking.
However, setting speed to something uneven like "@move_speed = 4.2" causes their sprite to jitter back and forth a few pixels in direction of movement on occassion. Sometimes the pixel shift lingers even after movement is over, causing their graphic to be permanently displaced.
I was also using this bugfix snippet, and it made the effect much worse, the sprite now shakes during walking as if an earthquake is taking place.
What can I try to remedy this before giving up and going back to 4 speed?
However, setting speed to something uneven like "@move_speed = 4.2" causes their sprite to jitter back and forth a few pixels in direction of movement on occassion. Sometimes the pixel shift lingers even after movement is over, causing their graphic to be permanently displaced.
I was also using this bugfix snippet, and it made the effect much worse, the sprite now shakes during walking as if an earthquake is taking place.
Code:
##------
## Display rounding error fix created by Neon Black.
##
## When certain slow display panning speeds are used, events will improperly
## round floating values to determine their position on screen. This causes
## them to appear off from the tilemap by a single pixel. Though minor this is
## noticable. This snippet fixes this behaviour.
##
## This snippet may be used in any project.
##
## -- Original Topic:
## http://forums.rpgmakerweb.com/index.php?/topic/17448-event-jitter-fix-display-rounding-error-fix
##------
class Game_Map ## Rounds X and Y display values DOWN so the nearest 32 is found.
def display_x
(@display_x * 32).floor.to_f / 32
end
def display_y
(@display_y * 32).floor.to_f / 32
end
def adjust_x(x)
if loop_horizontal? && x < display_x - (width - screen_tile_x) / 2
x - display_x + @map.width
else
x - display_x
end
end
def adjust_y(y)
if loop_vertical? && y < display_y - (height - screen_tile_y) / 2
y - display_y + @map.height
else
y - display_y
end
end
end
What can I try to remedy this before giving up and going back to 4 speed?

