Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target_fps affects the editor #5332

Closed
RandomShaper opened this issue Jun 21, 2016 · 18 comments
Closed

target_fps affects the editor #5332

RandomShaper opened this issue Jun 21, 2016 · 18 comments

Comments

@RandomShaper
Copy link
Member

Operating system or device - Godot version:
Windows x64, Godot master

Issue description (what happened, and what was expected):

Setting a value for the target_fps project setting seems to affect the editor. For instance, by setting it to a very low number, like 2 (as I did for some testing), after exiting and restarting the editor it will be laggy, tooltips will fail to appear, the script editor will be anything but agile, etc.

What was expected is that it only had an effect over the running game.

Steps to reproduce:

  1. Set target_fps to 2 in Scene -> Project Settings -> Application.
  2. Exit the editor and reopen it at the same project.
  3. Although anything in the editor will be laggy, type something in the script editor to clearly see what happens.

Link to minimal example project (optional but very welcome):

N/A

@neikeq
Copy link
Contributor

neikeq commented Jun 21, 2016

@reduz This is another project setting the editor should not use. I can think of some other settings too. @akien-mga should we create a tracker issue?

@neikeq neikeq added this to the 2.1 milestone Jun 21, 2016
@reduz
Copy link
Member

reduz commented Jun 21, 2016

tracker issue would be good

On Tue, Jun 21, 2016 at 9:19 AM, Ignacio Etcheverry <
notifications@github.com> wrote:

@reduz https://github.com/reduz This is another project setting the
editor should not use. I can think of some other settings too. @akien-mga
https://github.com/akien-mga should we create a tracker issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5332 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2xROSwvKx2AnlbGrEg0BnEu8GXJqks5qN9brgaJpZM4I6mrr
.

@puppetmaster-
Copy link

On our friends surface (win10) he need to set the target_fps to 60, else the cpu runs always on full power.

@ScotFlux
Copy link
Contributor

But, I have another issue.

FPS Counter (obtained from OS.get_frames_per_second() ) never reach a value > 60. It's stuck at 60 FPS. No matter how simple / complex the project is.

In other words, FPS Counter is limited / capped at Maximum 60 FPS. While I really really need this feature to show how great HTML5 game made with Godot is to HTML5 gamedev.

@27thLiz
Copy link
Contributor

27thLiz commented Jun 23, 2016

@ScotFlux maybe you have VSync enabled?

@ScotFlux
Copy link
Contributor

ScotFlux commented Jun 23, 2016

@Hinsbart where could I find Vsync setting?

Godot Editor (Project Setting? Editor Setting) or Graphic Card Software (I have AMD Graphic Card) ?

If you refer to Scene -> Project Setting -> Display -> Use_Vsync, then I unchecked it. But, still no go, even after restarting the editor.

@ScotFlux
Copy link
Contributor

@reduz @Hinsbart >> Eureka! I think I found a solution. But it's kinda weird solution. So, here are what happen. Go to : Scene -> Project Setting -> Display -> Use_Vsync . IF :

a) Use_Vsync = unChecked + ON = Checked : FPS Capped to 60
b) Use_Vsync = unChecked + ON = unChecked : FPS Capped to 60
c) Use_Vsync = Checked + ON = Checked : FPS Capped to 60
d) Use_Vsync = Checked + ON = unChecked : FPS counter non-Capped a.k.a what I want. haha

Isn't that better if use_vsync is unchecked, then it means we don't use it at all? Or am I missing something?

@akien-mga
Copy link
Member

An unchecked value on the left side means that it won't override the default behaviour, which is here use_vsync = true. All other parameters work this way, so that you can toggle them on and off easily between default and user defined without changing the value you defined.

I agree though that for use_vsync it can appear confusing. Maybe the parameter should be renamed to disable_vsync, and its default value swapped?

@ScotFlux
Copy link
Contributor

It's a good idea, even I personally prefer :

UnChecked = Non-Active = Disabled, while Checked = Active = Enabled

Btw, my issue regarding FPS counter still present. I mean, It works when running the project from Editor (haven't tried Windows Export yet), but when I export the project for HTML5 platform, the FPS still capped up to 60 FPS.

Of course, I had already done "Copy to Platform -> HTML5" this: Use_vsync checked + ON unchecked, but still the FPS capped to 60 FPS.

Am I missing something? @vnen @akien-mga @eska014 ? 😕

@akien-mga
Copy link
Member

Your browser or GPU driver limits the FPS, like it should because it's pointless to waste resources on FPS > 60 when the monitor can only display 60 Hz.

@ScotFlux
Copy link
Contributor

Yes, I completely agree about wasting resources on FPS > 60. The one that drive me thinking about FPS of a HTML5 game made with Godot is I want to impress Local HTML5 gamedev and want to see them saying "Wow", when I show'em that shiny FPS number (while learning and making app/game with Godot, I guess I'm also promoting Godot anywhere). Because I have no idea what to impress anyone except a shiny FPS number when it comes to performance. But, I could be wrong though. 😆 lol

@reduz
Copy link
Member

reduz commented Jul 8, 2016

I am thinking of removing target_fps, or make it a debug option, because I don't think there is any real use for it on a published game

@reduz
Copy link
Member

reduz commented Jul 8, 2016

will do some changes to how the options are presented to improve this..

@reduz
Copy link
Member

reduz commented Jul 9, 2016

target_fps has been removed (moved to debug as it has no real use for games).
If you don't want a game using 100% of your CPU, set some value in the application/frame_delay_msec option

@reduz reduz closed this as completed Jul 9, 2016
@RandomShaper
Copy link
Member Author

So is there now a default target FPS of 60? Does the editor render as much FPS as possible? And the games at runtime?

How can I use frame_delay_msec. I can't find any info. I've tried, for instance, setting a value of 32 in an attempt to get 30 FPS and I get alternating FPS counts: 60, 30, 60, 30, etc.

@Calinou
Copy link
Member

Calinou commented Aug 19, 2016

So is there now a default target FPS of 60?

Games use V-Sync by default now (even on desktop platforms), but their FPS isn't inherently limited. The upside is that users with 120/144/200 Hz monitors get immediately the "right" framerate for their monitor, however V-Sync increases input lag as well as stuttering (if having less FPS than the target set by V-Sync).

Ideally, we should have adaptive V-Sync (which means V-Sync is enabled only if the FPS exceeds the target FPS, which eliminates stuttering at low framerates).

Does the editor render as much FPS as possible?

It is locked to 60 FPS. It used to be locked to 40 FPS.

How can I use frame_delay_msec.

Honestly, I'd just use the debug/force_fps_max setting, it is way less confusing to use and more accurate, especially since frame_delay_msec does not allow floating-point values. People are just more used to work using FPS units rather than MSPF (milliseconds per frame) units.

@shinyclaw
Copy link

shinyclaw commented Dec 7, 2018

This issue is also present when setting "Low Processor Mode Sleep Usec". When the value is different that default (for example 100000), after restaring the editor it is very laggy - even if "Low Processor Mode" is not checked.

godot

@tinyleolin
Copy link

The same problem still happens when setting force_fps to 2.
Furthermore, I found another issue:
When setting force_fps to 2, the delta in _process(delta) is far smaller than the actual time period between two frames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants