If you are running the 2D kinematic demo from the Godot editor, there is lag being caused by the editor because it's being run through it.

If you export the game and then launch it, does the lag persist?

I discovered this when working on my 2D game a few weeks ago, anytime I ran the game through the editor there was noticeable lag. It all disappeared as soon as I exported my project to a .exe, ran smooth as butter.

@BinaryOrange said: If you are running the 2D kinematic demo from the Godot editor, there is lag being caused by the editor because it's being run through it.

If you export the game and then launch it, does the lag persist?

I discovered this when working on my 2D game a few weeks ago, anytime I ran the game through the editor there was noticeable lag. It all disappeared as soon as I exported my project to a .exe, ran smooth as butter.

You are right, Kinematic physics 2D runs smooth all the time in fullscreen and windows mode when it is exported instead of running in the editor.

@leonardon I exported your game, but it doesn't work. There is the main menu, when i click on "new game" nothing happens. Can you create and export of your game that works and test it ?

@BinaryOrange said: If you are running the 2D kinematic demo from the Godot editor, there is lag being caused by the editor because it's being run through it.

If you export the game and then launch it, does the lag persist?

I discovered this when working on my 2D game a few weeks ago, anytime I ran the game through the editor there was noticeable lag. It all disappeared as soon as I exported my project to a .exe, ran smooth as butter.

Perhaps we need a way to force the editor into a "low-resource" mode to maximize the smoothness of playback when the game is being run (so as to have a far better emulation of what the exported project will be like to people who download and play it)?

That could also minimize the complaints about Godot having performance issues, as many would not know about that fact.

@MagicLord said: You are right, Kinematic physics 2D runs smooth all the time in fullscreen and windows mode when it is exported instead of running in the editor.

Excellent, I'm glad that worked for you! It was a nice surprise for me, I forget who told me about it but it was someone from the discord channel. I had similar complaints about things being laggy/choppy and the other user pointed this out to me.

It really should be mentioned in the official documentation, so that other users who are newer to Godot don't pull their hair out in frustration thinking it might be something to do with their code.

@AceDragon said: Perhaps we need a way to force the editor into a "low-resource" mode to maximize the smoothness of playback when the game is being run (so as to have a far better emulation of what the exported project will be like to people who download and play it)? That could also minimize the complaints about Godot having performance issues, as many would not know about that fact.

A low-resource mode would certainly be nice, but I think some mention of exporting your project for performance testing would be one solution that would have the most beneficial effect.

Curiously, I have noticed in my experiments with 3D that 3D performance isn't as hindered by being launched from the editor, but that could change depending on the scene I have loaded in. Don't have anything bigger than a few cubes at the moment.

@leonardon, hopefully this all helps you!

@BinaryOrange said:

@MagicLord said: You are right, Kinematic physics 2D runs smooth all the time in fullscreen and windows mode when it is exported instead of running in the editor.

Excellent, I'm glad that worked for you! It was a nice surprise for me, I forget who told me about it but it was someone from the discord channel. I had similar complaints about things being laggy/choppy and the other user pointed this out to me.

It really should be mentioned in the official documentation, so that other users who are newer to Godot don't pull their hair out in frustration thinking it might be something to do with their code.

Perhaps some popup information box opening one time only during a session saying editor mode can have performance or jitter issues.

@leonardon should try export it's game (i exported it but it doesn't want to load the level from menu when exported).

@Megalomaniak said: I understand that time can be limited but if you can't share the project publicly maybe you can replicate the issue in a simple separate demo that you can share. Or since @emo10001 was able to identify similar issues perhaps he can share a simple demo for this.

I may try to do that very soon. I've been swamped with family stuff (2 teenagers and a first grader) plus a job change.

I will say this much. My laptop has 2 video cards. I did discover that the 3.0.6 version I installed was NOT running on my GTX 1050ti card, but instead the crappy intel card. I set 3.0.6 to always run with the 1050ti, and there is some improvement. However, it still has some occasional lag, just not as often or as bad.

The project I'm using is the Tutorial from the Gamedev.tv guys. I'll try to push it up.

-emo

@MagicLord said:

@BinaryOrange said: If you are running the 2D kinematic demo from the Godot editor, there is lag being caused by the editor because it's being run through it.

If you export the game and then launch it, does the lag persist?

I discovered this when working on my 2D game a few weeks ago, anytime I ran the game through the editor there was noticeable lag. It all disappeared as soon as I exported my project to a .exe, ran smooth as butter.

You are right, Kinematic physics 2D runs smooth all the time in fullscreen and windows mode when it is exported instead of running in the editor.

@leonardon I exported your game, but it doesn't work. There is the main menu, when i click on "new game" nothing happens. Can you create and export of your game that works and test it ?

Sure! I will analyse it and upload another version where we can export it and test it. I already did it but it does not change much.

It is faster thought but the lag effect is still present.

@leonardon said:

@MagicLord said:

@BinaryOrange said: If you are running the 2D kinematic demo from the Godot editor, there is lag being caused by the editor because it's being run through it.

If you export the game and then launch it, does the lag persist?

I discovered this when working on my 2D game a few weeks ago, anytime I ran the game through the editor there was noticeable lag. It all disappeared as soon as I exported my project to a .exe, ran smooth as butter.

You are right, Kinematic physics 2D runs smooth all the time in fullscreen and windows mode when it is exported instead of running in the editor.

@leonardon I exported your game, but it doesn't work. There is the main menu, when i click on "new game" nothing happens. Can you create and export of your game that works and test it ?

Sure! I will analyse it and upload another version where we can export it and test it. I already did it but it does not change much.

It is faster thought but the lag effect is still present.

When you'll upload a version that is able to export the game and able to launch the level from menu, i'll chek it.

6 days later

While I am not experiencing any lag from your exported .exe, I do believe what you are perceiving as lag has everything to do with the camera2d node.

There were a couple of small instances where the camera seemed to "jump" by a frame or so, but the character's movement was fine and did not appear laggy.

I definitely recommend learning how to create your own camera using the videos linked to earlier in this thread, and I think that will solve these issues for you, plus give you more control over your game's view in the future (and it's good practice to learn how to create your own tools, as well).

Unrelated, but I also like the art style you're going for!

not sure that all makes sense. I can implement the camera out of the player node and control it. I don`t see difficulties in doing this but I see something not working properly in this engine and I am worried to have wasted 10 months.

@leonardon said: not sure that all makes sense. I can implement the camera out of the player node and control it. I don`t see difficulties in doing this but I see something not working properly in this engine and I am worried to have wasted 10 months.

I'm using GoDot for almost two months now, everything works fine on my end. I understand your frustration. I wasted 1 year with Game Maker, 1 by learning C# and 2 years with Unity3D only to ultimately end with GoDot.I understand how you feel, you lost some time, the only thing what you can't buy meanwhile it getting smaller and smaller. Sometimes, we, humans have to lost some time to realize what we really like and what not. GoDot 3 may be little weak now, but it is on same place where was Unity 3 or UnrealEngine 2. It will grow stronger, just be patient.

About your problem, this is wonder of open source. If you think something works wrong, clone, edit, commit, push. If you don't have skills with C/C++ (like me), just open new issue, be nice and polite and someone will help you for sure. 3.1 is just around corner and it will be most epic version ever, it will be shame if you leave us now. At least try to wait for stable of 3.1. Maybe, new version restore your faith in GoDot

@leonardon said: not sure that all makes sense. I can implement the camera out of the player node and control it. I don`t see difficulties in doing this but I see something not working properly in this engine and I am worried to have wasted 10 months.

I'm not sure what you mean by "I can implement the camera out of the player node and control it."

Every single engine out there has issues and problems, and sometimes one must find their own solutions, such as creating their own camera code. It really isn't a bad solution, and ultimately will give you even more control over your entire game.

Switching to another engine, while certainly an option, is probably going to be even more of an investment time-wise, and I'll bet all of my computing power that you will run into issues nonetheless, regardless of what engine you choose.

I'm really thinking that since you still appear to have lag issues on your system, something else is at play on your end. Do you have anti-virus software running in the background? Are you using an SSD, or standard HDD?

I know what you guys mean. I am a software developer so coding is not an issue. I spent 1 year with unity3d and found their 2d module quite time consuming. Then 1 year with XNA...even more time consuming... Then managed to re-code from XNA to Godot in less then 2 months.

I quite like GoDot.

I have implented much more then you can see on the demo of course.

I have main menu, with keyboard mapping, PS4 or XO icons gamepad icons, auto save, load, settings, weapons...

So the base I developed is quite a lot.

I will try to overpass this by creating my own solution.

I will post here if I solve this.

This guys.

@BinaryOrange said:

@leonardon said: not sure that all makes sense. I can implement the camera out of the player node and control it.

I mean I will develop a script control de camera and insert the camera node out of the player node (on level ). This way I will make the camera move with my own algorithm instead of the camera follow the player automatically.

@BinaryOrange said:

Every single engine out there has issues and problems, and sometimes one must find their own solutions, such as creating their own camera code. It really isn't a bad solution, and ultimately will give you even more control over your entire game.

Yes but that mean Camera2D must be removed from the source code. The manual way will not be a workaround anymore so beginners will avoid to waste time with a buggy node.

Camera nodes do not have to be parented to the active player object, you can just have it parented to the root node and control its movement with code.

Or you rework the player scene to have a spatial node as the root and have the camera in a separate branch from the player (assuming the root doesn't move during gameplay).

@Ace Dragon said: Camera nodes do not have to be parented to the active player object, you can just have it parented to the root node and control its movement with code.

that is exactly what I mean.

We are suspecting the Camera2D Parented to the PLAYER node is causing the lag effect.

So I will try to move the Camera2D to the Scene node (or root note of the scene) and move the camera with my own code.

@leonardon said:

that is exactly what I mean.

I was responding to NeoD because of his idea of the Camera 2D node needing to be removed as a result (it doesn't because it doesn't have to be parented to the player).