+1 vote

I humbly ask for someone to take a look at my project and try to figure out why this isnt working. I have followed many tutorials and I have no idea why this isnt working. My pixel art and animations continue to jitter. This media share has an exported version of the project Im working one if anyone has ANY advice for this problem i will be in your debt.

Heres the link: https://www.mediafire.com/folder/3sjd5jqwnmh0o/Platformer-PlsHelp

Godot version 3.4
in Engine by (33 points)

Sounds like the camera is shaking? Only "key A" working.

It still happens even if the camera is off. The camera smoothing I put in place was a pixel-perfect camera to try to fix the problem. The pixels not being uniform is continuous, and its not because of the camera. Any other ideas, if you want I can send a video without a camera in the scene.

3 Answers

+1 vote

Did you change your project settings to accomodate pixel art? there's a few to change... I think there's the Stretch/Aspect setting under Display/Window in the project settings...

Also vsync settings might be relevant.

Also, make sure none of your nodes are being scaled :P
I'm assuming the import settings on your image files are set correctly

by (1,290 points)

What does node scaling do to pixel art? For example I do have some nodes scaled but the player is not and the tileset is not. Also I just tried a test with a regular pixel art background and the effects are even more pronounced. I will paste a picture of my settings and the background. GPU Pixel snapping is also on.

Heres the pictures(sorry don't know how else to upload them): https://www.mediafire.com/folder/5vmrmpux9pg5k/pixelproblem

In theory, scaling a node down means the computer has to make decisions about what to do with the pixels, and as your game changes from frame to frame, the decisions might change in a way that causes jitter. There's different scaling algorithms that prioritize different things, and I can't remember where in godot you control these settings... i thought it was in the project settings but it might be elsewhere

Or maybe I misunderstand what you mean by jitter?

I can't tell what's wrong from the images you posted. the character looks a bit blurry, but that seems like it's just the way the art was made... and the lines look a little janky, but again, that seems normal...

The main problem with the backround player was the lines especially the orange line on the far right. You might be able to see that the pixel width is not uniform. Also if you saw the exported project, you might be able to see that the players eye pixel changes widths on the idle animation and any other animation where the sprite moves vertically. Also if you know where those settings would be I would appreciate it. I just looked at the Mediafire files and the blur is from the screenshot I took srry abt that :P

the vsync setting is in project settings / display / window / use Vsync
(you might also try Vsync via compositor which i see in godot 3.4.2... )

Also maybe high DPI settings? are you using a high dpi display?

I think that's all I've got for you :/ sorry.

Did you want me to turn off vsync? And where would one chack dpi? Thanks for all your help :)

Turn on vsync if it's off :)

display / Window / allow hidpi

p.s. There's a search button under project settings that is super helpful in finding settings!

OMG That partially worked I think! The big line on the right is now ok, but the player isn't. If you think of something else please let me know, but tysm for your help and have a good one :]

–1 vote
by (1,290 points)

I did try the solution in this but since my problem seems to happen regardless of camera this didn't help. Do you think my resolution would be causing this?

+1 vote

This answer might not be the solution to your problem however I will point out 2 things that might be related.

  • I spent hours figuring out why the UI I was creating didn't fit in the screen 50% of the times I launched the project.. the solution:
    Project Settings => Display > Window => Stretch > Mode: 2D

  • The other thing might be or may be not related but it resembles to something I read:
    Visualizations that are not that compatible with nodes, such as a tetris board. (The tetris example uses a custom draw function to draw the blocks.)
    https://docs.godotengine.org/en/stable/tutorials/2d/custom_drawing_in_2d.html

I hope that's not the case to make things easy for you

by (24 points)

I looked at the article but how would one do that for say the player sprite? Would I have to draw every pixel?

I had to add the comment just to open the possibility that might be another problem here.. I am pretty sure this is not your case there is a lot of pixel art games out there and I don't think they're all generated by script.
Honestly I thought the first suggestion could be helpful I strongly encourage you to review the project settings before start drawing, this approach is not just harder it is prone to errors.

I am sorry for not being more helpful than that but I cannot see the code and I am not using Windows, besides my experience is far behind others. I know it is hard I've been there

@Dazel77 did you tried changing the Stretch mode from viewport to 2D
Did it work?

I don't know why you're using a viewport. You're making a 2D game. Check the documentation about viewport.
Maybe can be useful to play with the camera I don't know but for now stick to 2D

Yes I tried 2D and it still did not work. I have been doing some testing and even when I open a fresh project and make a scene with just a node 2d and my test background, some of the pixels are still off. I am completely confused at this point and I cant find anyway to fix this

If you still have that new project try to set the window size higher like the default I am not sure but I think it is 1024*600 (maybe it depends or your hardware not sure) but if your assets are small and you start your 640*360 in a 1920*1200 monitor sort to speak maybe you should expect to see that kind of things. Even in a 1400*900 your default values for the screen are too low (in my opinion) not sure if that's what you want.

I don't have all the answers obviously but I hope you understand that I don't see all the details about this so I am doing my best guess

Yes I understand. I will try that. Thanks for all the help you've given and have a good day :]

Hi again. I have one more suggestion for you to try but this could be a little difficult for me to explain.
You could apply a theme to the container of your sprite. Not all nodes support themes (AFAIK), in example you cannot apply a theme in the sprite (directly).
You should apply the theme to the container of your character but this theme should be exclusive for the scene of your character, or shared with other items that have the same problem if you know what you're doing. Just remember that if you're not specific, changes to this theme will affect other assets that make use of it.
Why am I suggesting this? Because I think you could apply anti aliasing to your sprite and that could do the trick.

So before start making changes to what you have already I suggest you take a look at themes and see if it fits your needs

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.