0 votes

I made a 2D game and it stutters very noticeable.
It's like the 3rd pic here: https://docs.godotengine.org/en/stable/tutorials/misc/jitter_stutter.html

I've read there that there are 2 issues:
- The project
- The OS

The second one, the OS is Windows in my case, and running the game in Fullscreen makes nothing better.
The project itself, well I'm creating games for several years now and from my understanding I don't have a complex game.
I use a player that moves around by using "moveandcollide" and I have 7 enemies total, each one following a individual "Path2D", each one with up to 8 points.
The player can shoot, then the game creates 2 bullets per second and they get destroyed when outside of the screen.
Enemies do the same thing.
Thats it.

I made similiar projects in Unity that never had any issues with being to complex.
So maybe there's something I don't know yet.

I tested the game on 2 different pc's, both have a bit older hardware (fx 8350 with gtx 1060 gpu) and the second one (fx 4300 with gtx 1050) but from my understanding that should be more than enough, cause both can also still run games like "No Man's Sky" without problems.

Any ideas?

Godot version 3.2.3
in Engine by (44 points)

Hard to tell without seeing the code. Can you share your project somewhere? (Github, Dropbox, ...)

1 Answer

+1 vote

when you are instancing the bullets are you using load() or preload()? if you're using load() it's more resource intensive at run time than using preload(). i suggest doing something like:

const var bullet_scene = preload("res://Bullet.tscn")
func fire():
    var bullet = bullet_scene.instance()
    bullet.position = blahblahblah

also make sure your bullets are actually getting freed like you think they are using the remote Scene Tree when running your game from the editor.

by (3,870 points)
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.