Game lags and unresponsive after playing half the game
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.
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.
Game lags and unresponsive after playing half the game
Hi there everyone!
I'm having this issue with my project, after you have played through to the middle of the game it starts lagging and is unresponsive. You see I have checked through my script.rpy multiple times looking for a error around the point that it starts to lag and become unresponsive. I also tried running the Lint and it returned no results and I have also tried recompiling. Almost forgot to mention it does not pop a error at all when the problem begins. I'm a bit more than a novice with programming.
Here is the point in the game that the problems start. Edited out the actual dialogue but please if you see i'm handing something wrong don't hesitate to let me know!
My question is: How have you guys handled similar problems?
scene frame40 with fade
Sharon "..."
show frame401 with dissolve
Sharon "..."
show frame41 with dissolve
Sharon "..."
show frame42 with dissolve
$ renpy.pause ()
show frame43 with dissolve
Sharon "... "
Sharon "..."
show frame44 with dissolve
Sharon "..."
show frame45 with dissolve
$ renpy.pause ()
show frame46 with dissolve
Sharon "..."
scene frame47 with fade
FC "..."
show frame48 with fade
N "..."
FC "..."
show frame49 with dissolve
Sharon "..."
show frame50 with dissolve
FC "..."
show frame501 with fade
$ renpy.pause
show frame51 with fade
$ renpy.pause ()
show frame52 with dissolve
FC "..."
I'm having this issue with my project, after you have played through to the middle of the game it starts lagging and is unresponsive. You see I have checked through my script.rpy multiple times looking for a error around the point that it starts to lag and become unresponsive. I also tried running the Lint and it returned no results and I have also tried recompiling. Almost forgot to mention it does not pop a error at all when the problem begins. I'm a bit more than a novice with programming.
Here is the point in the game that the problems start. Edited out the actual dialogue but please if you see i'm handing something wrong don't hesitate to let me know!
My question is: How have you guys handled similar problems?
scene frame40 with fade
Sharon "..."
show frame401 with dissolve
Sharon "..."
show frame41 with dissolve
Sharon "..."
show frame42 with dissolve
$ renpy.pause ()
show frame43 with dissolve
Sharon "... "
Sharon "..."
show frame44 with dissolve
Sharon "..."
show frame45 with dissolve
$ renpy.pause ()
show frame46 with dissolve
Sharon "..."
scene frame47 with fade
FC "..."
show frame48 with fade
N "..."
FC "..."
show frame49 with dissolve
Sharon "..."
show frame50 with dissolve
FC "..."
show frame501 with fade
$ renpy.pause
show frame51 with fade
$ renpy.pause ()
show frame52 with dissolve
FC "..."
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Game lags and unresponsive after playing half the game
While running your game, shortly before where it normally lags out, press Shift + D and then press F4
This should bring up a small screen telling you how much memory you are using.
This should bring up a small screen telling you how much memory you are using.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Re: Game lags and unresponsive after playing half the game
Intresting! so as i approach the area i notice my textures are way high(74) and my cashe is like 58% right before it lags out.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Game lags and unresponsive after playing half the game
Does this happen gradually, or suddenly?
I suspect Ren'Py might not be performing garbage collection for some reason.
I suspect Ren'Py might not be performing garbage collection for some reason.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Re: Game lags and unresponsive after playing half the game
it slows down about 2 images, stop and unresponsive, comes back up on another image thats located 2 images ahead of the stop then continuly freezes randomly after that point.
Re: Game lags and unresponsive after playing half the game
Try to rename all your 'frame___' to 'bg frame___'-like.MrBear wrote: ↑Wed Nov 11, 2020 3:17 am...
scene frame40 with fade
Sharon "..."
show frame401 with dissolve
Sharon "..."
show frame41 with dissolve
Sharon "..."
show frame42 with dissolve
$ renpy.pause ()
show frame43 with dissolve
Sharon "... "
Sharon "..."
show frame44 with dissolve
Sharon "..."
show frame45 with dissolve
$ renpy.pause ()
show frame46 with dissolve
Sharon "..."
scene frame47 with fade
FC "..."
show frame48 with fade
N "..."
FC "..."
show frame49 with dissolve
Sharon "..."
show frame50 with dissolve
FC "..."
show frame501 with fade
$ renpy.pause
show frame51 with fade
$ renpy.pause ()
show frame52 with dissolve
FC "..."
This should make Ren'Py replace all those images onscreen, so only one of them will be shown at a time.
Re: Game lags and unresponsive after playing half the game
I'll try this fix tonight, thank you and I'll post a update later on
Edit: unfortunately this fix didn't work. I wonder if maybe there's a issue with my project and I should just start from scratch? Before I do that I'm going to try to work with the garbage collection.
Re: Game lags and unresponsive after playing half the game
Alright so I did end up starting my project over. The problem begins at frame47 so I'm guessing it has something to do with the image file itself. Next step is removing it completely to verify it is causing the problem. Time to research how/why a image would do that. Any ideas?
Re: Game lags and unresponsive after playing half the game
When you do "show frame123" it does not replace previous frame, but just show frame123 on top of frame122, frame 121 etc. This likely reason why you game is lagging.
As Alex pointed out either rename your images so renpy treat them as having same image tag or use "scene frame123" instead of "show frame123".
If you already tried that and lag still persist then likely something else to blame. Just to be sure, check your images so they all same size or at least not bigger than screen. Normally if renpy able to load image it is good enough to continue, there shouldn't be any lags due to loaded image content.
As Alex pointed out either rename your images so renpy treat them as having same image tag or use "scene frame123" instead of "show frame123".
If you already tried that and lag still persist then likely something else to blame. Just to be sure, check your images so they all same size or at least not bigger than screen. Normally if renpy able to load image it is good enough to continue, there shouldn't be any lags due to loaded image content.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
Re: Game lags and unresponsive after playing half the game
Thanks for your response! I was thinking about doing this. I will try this fix, and Thanks to everyone whose helped me with this problem!drKlauz wrote: ↑Fri Nov 13, 2020 2:54 pmWhen you do "show frame123" it does not replace previous frame, but just show frame123 on top of frame122, frame 121 etc. This likely reason why you game is lagging.
As Alex pointed out either rename your images so renpy treat them as having same image tag or use "scene frame123" instead of "show frame123".
If you already tried that and lag still persist then likely something else to blame. Just to be sure, check your images so they all same size or at least not bigger than screen. Normally if renpy able to load image it is good enough to continue, there shouldn't be any lags due to loaded image content.
Edit: Even this doesnt work
Who is online
Users browsing this forum: Google [Bot]