Enhanced Camera script - Jitter error

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
There's this awful sprite jitter effect that occurs when the player keeps sprinting for more than 10-20 or so tiles (vertically or horizontally, in a straight line only) and when the movement grid isn't 32 (I tried with 4,8, and 16 - all of them seem to have the same issue). The effect gets very noticeable when the Enhanced Camera's DECELERATION_VALUE (in the module) is under 30.

Original Enhanced Camera post: https://forums.rpgmakerweb.com/index.php?threads/enhanced-camera-make-awesome-cutscenes.34778/
Archived script/demo link: https://mega.nz/#F!AMEFWKDK!8D_mqMtXkMJllECxPjV9cA (Enhanced Camera zip folder)

This was tested with two scripts that adjust the movement grid:
-One by Quasi (super hard to find a working link to the original code anymore, but it was just called Quasi Movement)
-GaryCXJk's Free Movement. (https://area91.multiverseworks.com/rmvxa/scripts/gameplay/free_movement)
Both have this same effect occur, so I believe it's something to do with the camera script exclusively.

For the sake of the demo, I use Gary's script. Demo showing this error is attached below.
 

Attachments

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
There isn't much that can be done with it not set to 32, as 32 is the tileset for the entire engine. However, I had this issue with my game even with the tileset set to 32 and I got around it by turning off the step counter. Maybe try that and see if it helps?
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
There isn't much that can be done with it not set to 32, as 32 is the tileset for the entire engine. However, I had this issue with my game even with the tileset set to 32 and I got around it by turning off the step counter. Maybe try that and see if it helps?
I'm not entirely sure what you mean by "turning off the step counter" which script/line of code are you referring to?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I don't remember, sorry. It's in the default code, I commented it out and that stopped the jitter for me.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I don't remember, sorry. It's in the default code, I commented it out and that stopped the jitter for me.
Do you remember any of the keywords to search for? Just searching for "step_counter "step_count" "count_step" in all of the scripts brings up nothing.

Don't try to offer help if you're not even sure what your solution even is.
 
Last edited:

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Found the issue, not sure how to fix it still. This applies for both ver. 1.0.1 and 1.0.2 of enhanced camera.

It's caused by Display rounding error fix:
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.
##------

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
setting all 32 values to 16 gets rid of the character sprite jitter (my project is using a collision grid of 16), but then, there is a very noticeable/jarring pixel shift issue with tiles, parallaxes, etc. Getting rid of the code snippet above doesn't do anything and the jitter issue persists. Can anyone help?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
I tried your demo.

You have VERY sensitive eyes. I can hardly notice anything wrong.
I sort of see a small vibration effect when dashing for a long time.
(had to hold my face 6 inches from my screen to see it)

I tried a few changes to see if there was a simple fix.
I think there is something to try.
Looked better to me, so maybe it will be good for you.
Line 470
changed DECELERATION_VALUE.to_f
to
DECELERATION_VALUE.to_i
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I tried your demo.

You have VERY sensitive eyes. I can hardly notice anything wrong.
I sort of see a small vibration effect when dashing for a long time.
(had to hold my face 6 inches from my screen to see it)

I tried a few changes to see if there was a simple fix.
I think there is something to try.
Looked better to me, so maybe it will be good for you.
Line 470
changed DECELERATION_VALUE.to_f
to
DECELERATION_VALUE.to_i
I hope my vision can stay good for a while, lol. Tried your edit but unfortunately it doesn't fix the issue.

Say you start dashing at x: 0, once you get to x:30 with deceleration at 16, I noticed the jitter still existing.
Lemony/Source RPG Maker made an older camera script back in 2013 or so, and for some reason that has no jitter with a non-default movement grid, so I know this is possible. But it has a major bug where it doesn't focus on the player sprite. Whatever they did in the new code just added a sprite jitter error.

If you want to look at the old script's code, it's here: https://forums.rpgmakerweb.com/index.php?threads/lemonys-camera-camera-non-centered-issue.107415/
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I had a problem with this script and the solution given to my by Source was to set the deceleration rate to 1 (yep, one) and change it when you need the camera to do e.g. panning, or focusing on an NPC or whatever, by using the code
ms_pro_cam_str(38)
at the beginning of the script call and
ms_pro_cam_str(1)
at the end.
Works fine for me.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I had a problem with this script and the solution given to my by Source was to set the deceleration rate to 1 (yep, one) and change it when you need the camera to do e.g. panning, or focusing on an NPC or whatever, by using the code
ms_pro_cam_str(38)
at the beginning of the script call and
ms_pro_cam_str(1)
at the end.
Works fine for me.
I did the same thing for a long time (just with a lower value), but design-wise it seems flawed.

1. Any camera effects done through that script when the game is otherwise at 1 deceleration feel jarring from the usual game. Personally it takes me out of the experience and it feels unpolished.
2. If I did just set it to a high deceleration rate to mask the issue: I suppose it can work for games where there is slow movement, but when sprinting with a high deceleration speed, it personally feels a bit nauseating and hard to look at. Mid to low-range deceleration looks great, but once it's above 28 it's a bit much and even then, the issue persists. You have to go to crazy high numbers for the effect to look like it's completely gone, if you use remotely bigger maps.

I'm not looking for a bandaid solution. I get the original scripter must be tired of their code (pretty sure they're gone from the RPG Maker community anyways) and some users can still work with that, but there has to be a better solution.
 

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

  • Latest Threads

    Latest Posts

    Latest Profile Posts

    Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
    Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
    Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
    How many parameters is 'too many'??
    Yay, now back in action Happy Christmas time, coming back!






    Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

    Forum statistics

    Threads
    105,857
    Messages
    1,017,015
    Members
    137,563
    Latest member
    MinyakaAeon
    Top