[Solved] Display Framerate (In FPS) In A Ren'Py Game

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Spacepiratehacker54
Newbie
Posts: 10
Joined: Sun Jul 07, 2019 10:47 am
Contact:

[Solved] Display Framerate (In FPS) In A Ren'Py Game

#1 Post by Spacepiratehacker54 »

Hello, I'm thinking of having a shooter section in my game which will require to have 100+ objects on the screen at a time (with x/y velocity/acceleration, etc). Right now everything still seems to run smooth (last test: about 60 objects on screen), but I'd like to check the performance in real time by looking at numbers, so is there an easy way to display the fps in my game (kinda like when using FRAPS) and if there isn't what kind of programs/software/etc. do you recommend to measure the fps?
Last edited by Spacepiratehacker54 on Fri Oct 04, 2019 5:27 pm, edited 1 time in total.

User avatar
RicharDann
Veteran
Posts: 286
Joined: Thu Aug 31, 2017 11:47 am
Contact:

Re: Display Framerate (In FPS) In A Ren'Py Game

#2 Post by RicharDann »

You could just run Fraps and then your game (Fraps should be able to detect and overlay the framerate in Ren'Py).

If you want to do from Ren'Py itself in realtime, I guess you could maybe do this (UNTESTED):

Code: Select all

screen fps_display():

    $ frames = renpy.get_refresh_rate()

    text "[frames]"

    timer 1 repeat True action SetScreenVariable('frames', renpy.get_refresh_rate())

label start:

    show screen fps_display
Not sure if that in itself would impact performance though.
The most important step is always the next one.

User avatar
uyjulian
Regular
Posts: 128
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Display Framerate (In FPS) In A Ren'Py Game

#3 Post by uyjulian »

Press F3.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Display Framerate (In FPS) In A Ren'Py Game

#4 Post by Remix »

... or just

Code: Select all

show screen _performance
Frameworks & Scriptlets:

Spacepiratehacker54
Newbie
Posts: 10
Joined: Sun Jul 07, 2019 10:47 am
Contact:

Re: Display Framerate (In FPS) In A Ren'Py Game

#5 Post by Spacepiratehacker54 »

F3 doesn't work for me for some reason, but Remix's suggestion did the job. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users