This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I am creating a simple 2D top down moving games, where different kinds of obstacles come from top, player has to avoid obstacles and move towards coins to collect. In this case I am creating obstacles programmatically and adding it to scene tree using Instance method as follows.

var enemy1 = EnemyKindOne.instance()
add_child(enemy1)

I am creating enemy for every 1 second and adding it to scene tree. At the time of creating and adding enemy there is a noticeable jerk. Because of this game is not looking smooth, How to solve this?

in Engine by (113 points)
edited by

Finally I have profiled my game and taken screen shot of it. Can you find out the cause of issue. Thanks in advance.

Screen shot here

The profiling result looks normal. Since it occurs only on Android, have you tried using GLES2 as a renderer?

Am using GLES3.

Have you tried using GLES2. You can select it in the top right of the editor.

Tried that also. Not working. Finally I found solution for the jittery problem. I have removed all floating point value assigned for properties like Collision2D,Texture Scalling, and for Visibility notifier, now everything works fine with int value. Seems if fast moving object assigned with floating point value(3.463) for Collision2D,Visibility notifier and texture makes jittery. Better use rounded int value(3).

Thanks for the discussion on my post. Finaly I wasted 3 days of time just for floating point value. But worth it.

Please log in or register to answer this question.

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.