Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add actions to set max and min FPS at runtime#7754

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ArturKrys wants to merge1 commit into4ian:master
base:master
Choose a base branch
Loading
fromArturKrys:feature-max-min-fps

Conversation

@ArturKrys
Copy link

Summary

This PR adds two new actions under Game scene (Events) in GDevelop that allow developers to dynamically configure the game's maximum and minimum frames per second (FPS) during runtime.

These settings are useful for:

  • Reducing FPS during non-interactive scenes (e.g., cutscenes).

  • Exposing FPS settings in a game’s graphics or performance menu.

Implementation Details

  • Actions are declared in TimeExtension.cpp using .AddAction(...).

  • Mapped to new JS runtime functions:

    • gdjs.evtTools.runtimeScene.setMaximumFPS
    • gdjs.evtTools.runtimeScene.setMinimumFPS
  • FPS values are applied to RuntimeGame._maxFPS and _minFPS, which affect the main game loop behavior.

Demo

2025-08-01.03-20-27.mp4

Related issue

Closes#5362

@ArturKrysArturKrys requested a review from4ian as acode ownerAugust 1, 2025 02:26
This adds two new event actions under the Time category that allowdevelopers to change the game's maximum and minimum FPS during runtime.These values are applied directly to the RuntimeGame instance andaffect the rendering loop's frame rate capping behavior.Note: No validation is currently performed. Negative values or settingminFPS greater than maxFPS may lead to undefined behavior or visualissues. Future improvements could include IDE-level validation orruntime warnings.
@4ian
Copy link
Owner

4ian commentedAug 3, 2025

Hi! Thanks for this PR :)
I think it would be nice to add:

  • methods to runtimeGame to avoid modifying a "private" property (starting with underscores) (this will be helpful in the future if changing these values imply other operations to be done)
  • validation in these new functions of the value (basically: not negative. 0 is considered unlimited already for maximum FPS).

@rstech-hub
Copy link

Add a small info icon next to the FPS settings that explains what they do

@4ian4ianforce-pushed themaster branch 3 times, most recently from8a32fc5 to846afd9CompareAugust 30, 2025 12:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@4ian4ianAwaiting requested review from 4ian4ian is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add an action to change the maximum and minimum FPS.

3 participants

@ArturKrys@4ian@rstech-hub

[8]ページ先頭

©2009-2025 Movatter.jp