The retro PSX and stop motion look moves animations in steps, often 12 a second, with the AnimationPlayer set to Manual and advanced by hand. In our Godot 4.7 test, waiting for 1/12 s, advancing 1/12 and resetting the timer to 0 played only 8.33 s of animation in 10 s at 30 fps, and 8.92 s at 75 fps. Advancing by the whole wait kept the time but made only 100 steps at 30 fps. Keeping the leftover gave 120 steps and 10.00 s at 30, 60, 75, 144 and 165 fps.
The code
Attach the script to your AnimationPlayer and use play() as usual. It switches itself to Manual and steps 12 times a second. Change steps_per_second for a choppier or smoother look.
extends AnimationPlayer
## Plays animations in steps, like old consoles and stop motion (12 a second by
## default), without losing time between steps at any frame rate.
@export var steps_per_second := 12.0
var _acc := 0.0
func _ready() -> void:
callback_mode_process = AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL
func _process(delta: float) -> void:
_acc += delta
var step := 1.0 / steps_per_second
while _acc >= step - 0.000001: # summed deltas land just under a whole step
_acc -= step # keep the leftover, do not throw it away
advance(step)
What we measured
An animation moving 1 unit a second, played in steps for 10 s at 30, 60, 75, 144 and 165 fps. Two runs with the same numbers.
- Advance 1/12 s, reset to 0: 8.333 s of animation at 30 fps, 8.917 s at 75, 9.750 s at 165. Right at 60 and 144, where 1/12 s is a whole number of frames.
- Advance by everything waited, reset to 0: the time stays right to within one step, but the steps were 0.1 s at 30 fps, 10 a second, and 0.0933 s at 75.
- The script: 10.000 s and 120 steps at every frame rate, every step 0.0833 s, 2 to 3 frames apart at 30 fps.
Why it happens
1/12 s is 2.5 frames at 30 fps and 6.25 at 75. The timer only notices on the next whole frame, so each step waits a little too long, and resetting to 0 throws that extra away: 3 frames, 0.1 s, for a 0.0833 s step. Advancing by the whole wait keeps the time but makes the steps bigger and fewer. Subtracting one step and keeping the rest lets the next step come a frame early to catch up.
What to change
- Only some characters stepped: give each of them the script, and leave the rest on normal AnimationPlayers.
- Keep moving the camera and the physics every frame. Only the animation steps.
The same look for particles: choppy particles with fixed fps. The low resolution screen: PSX low resolution look.
Effects in the same style: PSX Retro VFX Collection for Godot 4 has 291 PS1-style effects in one project, all with low-res pixel textures: explosions, magic, gunfire, horror, weather and rewards.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: PSX Retro VFX Collection for Godot 4 has 291 PS1-style effects in one project, all with low-res pixel textures: explosions, magic, gunfire, horror, weather and rewards.
More how-tos for PSX Retro VFX Collection for Godot 4: A sharp low-resolution PS1 look · PS1 vertex wobble that is the same near and far
More how-tos: Game feel
- A swing that settles the same at any frame rate
- Screen shake that returns to center
- 3D camera shake that lands back on center
- Hit stop and slow motion
- Confetti particles with random colors
- Choppy particles: fixed_fps and interpolate
- Keep a smooth follow camera, but jump with the player when they teleport
- Make a harvested crop pop out in an arc
- Shake a rock or tree when hit, without it drifting
- Pickups that fly to the player in the same time at any frame rate
- A cooldown that waits while the game is paused
- Keep attack presses made just before the swing ends
- A dash that covers the same distance at any frame rate
- A hold-to-craft bar that takes the same time at any frame rate and finishes once