Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

FPS SCRIPT

Status
Not open for further replies.
hello~ can we change the frame rate using a script? because when i run the game i am only getting 30fps.. i wonder if i could increase it using a script.

thanks
 
Wait, what? Yes you can. I'm pretty sure at least. Lemme know if I'm crazy, but I believe this is what you're looking for:
(Taken from the help file)
Code:
Graphics.frame_rate: 
In [Smooth Mode], the number of times the screen is
refreshed per second. The larger the value, the more CPU power is
required. Normally set at 40. When not in [Smooth Mode], the refresh 
rate is halved, and graphics are drawn in every other frame.
Changing this property is not recommended; however, it can be set 
anywhere from 10 to 120. Values out of range are automatically 
corrected.

So to use it you would do:
Code:
Graphics.frame_rate = {VALUE}
 
This topic has been resolved. If bojox3m or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top