Page 1 of 1

Why is my game slow?

Posted: Sun Jan 14, 2018 3:56 pm
by PyTom
So, here's a new thing.

If your game skips a frame, I want to know why. It might be a problem with Ren'Py itself, or it might be a problem with your game. Either way, I'll want to track it down and figure out why.

Some rules:

0) Make sure the problem exists in the latest Ren'Py! 6.99.14 should massively improve performance.
1) Please prepare your game for me to look at by putting a jump from the start label to right before the problem.
2) Make a post here.
3) Send me your unpacked game. Either attach it here, or email it to pytom@bishoujo.us.

As part of this, I want to pick apart the programming styles that Ren'Py creators have been using, since I suspect some of them might contribute to speed problems. I'll suggest alternative ways of doing things, fix the engine - whatever it takes. While not every suggestion might be immediately applicable, my hope is that fairly soon we'll be able to stamp out styles of programming that make Ren'Py slow.

Re: Why is my game slow?

Posted: Sun Jan 14, 2018 6:58 pm
by Farryn
Sent you an email - thank you!

Re: Why is my game slow?

Posted: Mon Jan 15, 2018 4:30 am
by Arowana
Thanks for doing this, it sounds really helpful! If you do figure out which programming styles that are causing performance issues, please let us know. I've gotten multiple reports of lag for my game, so I'm interested in tips for making it run more smoothly. :D

I do think that updating to 6.99.14 has helped, though some parts still occasionally seem slow. Would you be interested in taking a look even if the lag isn't consistently reproducible? I have some general ideas about which parts tend to lag more than others, but it seems to vary between machines and playthroughs.

Re: Why is my game slow?

Posted: Mon Jan 15, 2018 1:04 pm
by PyTom
Yes, I can look even if it's not totally reproducible, within reason. I can look for things like unexpected disk access and garbage collection, as well as frames that are marginal on time.

Re: Why is my game slow?

Posted: Mon Jan 15, 2018 8:25 pm
by Arowana
PyTom wrote: Mon Jan 15, 2018 1:04 pm Yes, I can look even if it's not totally reproducible, within reason. I can look for things like unexpected disk access and garbage collection, as well as frames that are marginal on time.
That would be great! I'll send you an email with my game. :)

Re: Why is my game slow?

Posted: Mon Jan 15, 2018 8:55 pm
by zankizuna
Slow game coz my pic was like over 2000 pixels long and wide, but I kept zooming it down, while using LiveComposite

Re: Why is my game slow?

Posted: Tue Jan 16, 2018 2:01 am
by Corynth
Sent an email with our latest beta.
Thank you for taking the time to do this!

Re: Why is my game slow?

Posted: Tue Jan 16, 2018 2:13 am
by trooper6
Hello PyTom! I'll send you an email with a link to my game...which has delays, dropped frames and is slow.

Re: Why is my game slow?

Posted: Mon May 21, 2018 1:51 pm
by SONTSE
So glad you care, PyTom! Here is my example. Suffering a nasty lag trying to implement pixellation censorship.
UPD: Just received different and more effective approach from Remix. No longer the issue, i think ^^

Re: Why is my game slow?

Posted: Tue Jun 19, 2018 3:27 pm
by Czero
Best of luck! :)

Re: Why is my game slow?

Posted: Wed Apr 03, 2019 6:48 am
by Flowersoft Gamedev
My game become slow when I launch via launcher on renpy 7.2.0 but I attribute it to the large file size of the asset we use, but also maybe because of technical limitation on the PC we use.

Is this thread still active for the new release of the renpy program, or only for 6.9.... version?

Re: Why is my game slow?

Posted: Mon Jun 24, 2019 5:29 pm
by xeesus
Is this still a thing? Either way, thanks for caring, as has been said before!

Our team has recently decided to update to 7.3 (from 6.9) and amongside some troubles caused by our own 'poor but working' code we've encountered a very interesting problem. Our gallery now works at 4 fps, although on all previous updates (tested on basically all versions from 6.99.14.1 to 7.2.2) it works at 144 or 60 fps. It uses a lot of python, most of which is probably inefficiently written and is likely the cause of the lag.

I've sent you an email with the game, thanks in advance for any help or advice and thanks for creating the Ren'Py engine in the first place!

animations perhaps?

Posted: Sat Aug 03, 2019 3:26 am
by trajano
xeesus wrote: Mon Jun 24, 2019 5:29 pm
Our gallery now works at 4 fps, although on all previous updates (tested on basically all versions from 6.99.14.1 to 7.2.2) it works at 144 or 60 fps. It uses a lot of python, most of which is probably inefficiently written and is likely the cause of the lag.
@xeesus are you using a lot of animations? I am finding that large frequent animations can slow things down on Ren'py much more noticeable on a mobile device. I thought it was simply a problem of my mobile device being one year old already. However, I played the same large 30fps 1440p webm videos concurrently on a webview and it works well.