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.
- Posts: 120
- Joined: Sat May 11, 2013 3:20 pm
- Completed: Elvine, The Life Threads, Helena's Flowers, Dr. Frank's Build-A-Boyfriend, Beyond the Deep, The Bog's Heart, The Girl With the Gray Hair Awakens
- Projects: The Far Rings, NB107A
- Tumblr: heidengames
- itch: Heiden
I've run into a problem where my game will slow down pretty significantly when I'm using screens with 5 or 6 different items you can click on.
I've made a point and click game based on screens where you click on imagebuttons to send you to different labels.
I've been looking through previous thread posts looking to see if anyone else has run into this issue (I found a few) and if anyone was able to find a solution for this.
I've tried increasing image cache size as well as forcing Renpy to dump its memory cache every so often, but neither have worked. Also using shift + d and forcing the game into Direct X also doesn't help the lag.
I'm using Renpy 6.99.
(And I'm sorry I don't have much experience with programming (never the less programming dealing with performance issues) so I don't really know... how to approach this.)
(I ran out of URLs I can have in my sig haha, you can find all the games listed on my itch.io page!!)
- Eileen-Class Veteran
- Posts: 1307
- 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
Code: Select all
renpy.exports.get_image_load_log(age=None): """ :doc: other A generator that yields a log of image loading activity. For the last 100 image loads, this returns: * The time the image was loaded (in seconds since the epoch). * The filename of the image that was loaded. * A boolean that is true if the image was preloaded, and false if the game stalled to load it. The entries are ordered from newest to oldest. `age` If not None, only images that have been loaded in the past `age` seconds are included. The image load log is only kept if config.developer = True. """ # As a generator, you should be calling: for i in renpy.exports.get_image_load_log(): renpy.say("", "[i]") # or somesuch after the screen shows # a line or two before call/show screen... use above to test result renpy.start_predict_screen( "your screen name in quotes" ) # just after (or during is better) if renpy.has_screen( "your screen name in quotes" ): renpy.stop_predict_screen( "your screen name in quotes" ) # and possibly... before renpy.exports.start_predict( list of the images used in the screen ) # after renpy.exports.stop_predict( list of the images used in the screen )
- Finish Improved Event Handler
- Implement DragonBones animation as a Creator Defined Container
- Develop Cartoon Speech Bubble dialogue
- Finish Bitmask collision and rebound vector system
- Develop time based building mechanic
- *Find a superb artist and actually write a game*
- Lemma-Class Veteran
- Posts: 2700
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
For best performance, all screens should be defined with a parameter list. When a screen doesn't take parameters, it should be define with an empty parameter list. The screen:is faster than:
Code: Select all
screen test(): vbox: for i in range(10): text "[i]"When a screen is defined without a parameter list, any name used in that screen can be redefined when the screen is show. This requires Ren'Py to be more conservative when analyzing the screen, which can limit the optimization it performs.
Code: Select all
screen test: vbox: for i in range(10): text "[i]"
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Actually finish a project