Open andriyDev opened 1 month ago
Thank you for trying it out and reporting this! I did notice this issue myself as well, but its fairly small on my monitors, and I havent been able to get to the route of the issue (i use a weird 2 camera system to make things pixel perfect, which makes the camera movement/player movement systems tough to align).
I tried moving the camera system to FixedUpdate as well, but I thiiink it still happens?
How bad is it on your machine, could you send a non-sped up non-zoomed video of a couple seconds?
I believe one way to test this more is limiting your game's fps severely, like 10fps or so (you might also have to tweak the fixed update rate, but I'm not sure).
Sending a non-slowed video doesn't work. The game looks fine over video (since each frame is technically correct). But in person it's the "blurred" thing I showed in the second image, and it's happening every single frame whenever I'm moving.
Actually, what do you mean by "pixel perfect" in this context? How does that relate to the camera?
ahh good point, ill try limiting the frame rate.
by pixel perfect, i mean i have the game's reoslution fixed to a set amount, as if you played it on an old monitor with a small reoslution. What this means technically for the cameras is, i have 2 cameras. The first one points at the game world normally, but has a render target set to an image that is downscaled to a fixed resolution (240px height). This image is used as a material on a cube, which is rendered on the screen, and the main pass camera (this is the second camera in the system) simply displays that cube, at full monitor resolution.
This way, my game is limited to fixed pixel amounts, and there can not be any half pixels, or art that "slides" across pixels. Things either take up the full pixel, or move to the neighbour pixel and take up that one fully, if that makes sense?
What this means for this bug however, is that due to the camera stuff i mentioned, moving the camera/player is tricky, and causes jittering (i had a lot of troubles with this in the past, it used to be very bad).
The jittering (i think) is due to the fact that things cant belong to half a pixel, and also because i have 2 cameras, so the math for moving the cameras is a bit cursed. if you're curious, its in move_camera_with_player
in input.rs
I tried v0.2.0-alpha and noticed the player has a noticeable "jitter" to them. Note I am running on a 144 hz monitor.
Here's a video that I cropped in OBS and slowed down with ffmpeg: https://github.com/user-attachments/assets/284e76e9-69ab-486a-872c-e9ea8a661487
If you look closely, you can see that the environment moves at a fairly constant rate, but the character is moving left and right every now and then.
It's hard to share a screenshot of what this looks like in person (since every frame on its own is perfectly fine), but it ends up making the character look like it's going through heavy anti-aliasing or something (since the character keeps alternating between being in the left pixel or the right pixel every frame). Here's the best I can get:
My guess is that the camera is being updated in the
Update
schedule, but your character is moving in theFixedUpdate
schedule.