Why is my game slow?

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
User avatar
PyTom
Ren'Py Creator
Posts: 15256
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Why is my game slow?

#1 Post by PyTom » Sun Jan 14, 2018 3:56 pm

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Farryn
Regular
Posts: 33
Joined: Wed May 10, 2017 10:15 pm
Projects: Diplomatic Relations
IRC Nick: Farryn
Tumblr: princessdealtry
Contact:

Re: Why is my game slow?

#2 Post by Farryn » Sun Jan 14, 2018 6:58 pm

Sent you an email - thank you!

User avatar
Arowana
Miko-Class Veteran
Posts: 527
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Why is my game slow?

#3 Post by Arowana » Mon Jan 15, 2018 4:30 am

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.
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

User avatar
PyTom
Ren'Py Creator
Posts: 15256
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Why is my game slow?

#4 Post by PyTom » 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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Arowana
Miko-Class Veteran
Posts: 527
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Why is my game slow?

#5 Post by Arowana » Mon Jan 15, 2018 8:25 pm

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. :)
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

User avatar
zankizuna
Veteran
Posts: 381
Joined: Fri May 04, 2012 2:20 am
Projects: Double-Mind Detective, Softwar
Deviantart: raseru09
itch: ZanKizuna
Location: Manilaaaaaaaa
Contact:

Re: Why is my game slow?

#6 Post by zankizuna » Mon Jan 15, 2018 8:55 pm

Slow game coz my pic was like over 2000 pixels long and wide, but I kept zooming it down, while using LiveComposite

Corynth
Regular
Posts: 59
Joined: Thu Dec 01, 2011 7:59 am
Completed: Halloween Otome, Valentines Otome
Projects: Christmas Otome
Organization: Synokoria
Tumblr: synokoria
itch: synokoria
Contact:

Re: Why is my game slow?

#7 Post by Corynth » Tue Jan 16, 2018 2:01 am

Sent an email with our latest beta.
Thank you for taking the time to do this!

User avatar
trooper6
Lemma-Class Veteran
Posts: 3442
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Why is my game slow?

#8 Post by trooper6 » Tue Jan 16, 2018 2:13 am

Hello PyTom! I'll send you an email with a link to my game...which has delays, dropped frames and is slow.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
Lena_Borodach
Regular
Posts: 66
Joined: Sun Nov 24, 2013 10:49 pm
Completed: 6 VN's so far
Contact:

Re: Why is my game slow?

#9 Post by Lena_Borodach » Mon May 21, 2018 1:51 pm

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 ^^
Attachments
_mozaik.7z
(1.98 MiB) Downloaded 11 times
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)

Czero
Newbie
Posts: 15
Joined: Sun Apr 15, 2018 1:44 pm
Contact:

Re: Why is my game slow?

#10 Post by Czero » Tue Jun 19, 2018 3:27 pm

Best of luck! :)
Visual novel lover and maker...

Works in progress: Standpoint viewtopic.php?f=59&t=51369&p=493414

I'm looking for writing work viewtopic.php?f=63&t=50859

Post Reply

Who is online

Users browsing this forum: No registered users