The game I'm working on has an entity that moves on a 2D plane with a parallax background. I've been following this thread in order to implement fixed time step and interpolation into my game, where my implementation closely mirrors the OP's version: http://www.java-gaming.org/index.php?topic=24220.0
I'm using lwjgl3, full screen mode, updating entities at 60 Hz, rendering at 60 Hz, vsync is true.
It has been a success so far and I have applied interpolation to my main player entity as well as my background -- I have very smooth movement. Now my problem is that everything else such as stationary objects that do not have their positions change(only relative to the camera) seem to stutter every now and then
. My player and parallax backgrounds don't stutter and I don't have a drop in fps, however entities that don't have interpolation applied to them look like they skip a few frames sometimes, even though they're not changing x/y positions. With that being said, time for some silly questions:
- Is there a way to apply interpolation to stationary entities in order to smooth movement out while my camera is panning?
- Is it advised to update and render at the same frequency? Do people typically leave vsync on?