I'm going to document everything I learn about renpy.profile_screen here. My game lags and feels clunky in the navigation, main_menu, game_menu areas on Android. I need to learn how to use profiling to debug lag in these screens. Meanwhile the default game "The Question" runs fast and responsive on Android. I need to find out what I did wrong. I've completely overhauled Ren'py, deviating far outside its norm, treating Ren'py more as Unity or Unreal Engine for the design of a near, full blown game with massive amounts of features and customizations.
I need it to analyze the main_menu, game_menu, navigation and all screens that make up the interface of the main/game menus. I'll update this thread as I progress, if anyone can offer help it would be appreciated.
Okay let's begin. I put this line in init python.
Code: Select all
init python:
#first i did this,
#renpy.profile_screen("main_menu", predict=False, show=True, update=True, request=True, time=False, debug=True, const=False)
# now I'm profiling the preferences screen
renpy.profile_screen("preferences", predict=False, show=True, update=True, request=True, time=False, debug=True, const=False)
Now I'm going to set time=True instead of False.
My game.
Code: Select all
SHOW main_menu 02:52:26.247954
* 0.99 ms
UPDATE main_menu 02:52:27.879151
* 9.97 ms
UPDATE main_menu 02:52:28.032335
* 5.98 ms
--------------------
UPDATE preferences 02:57:44.842528
* 6.98 ms
UPDATE preferences 02:57:44.931854
* 1.99 ms
Code: Select all
SHOW main_menu 02:49:13.142216
* 0.00 ms
--------------------
UPDATE preferences 02:58:10.935905
* 1.02 ms
Okay, let's see if prediction can help solve my problem. The goal is to have the main_menu, game_menu & any menu screens, before the player starts the game, not lag.
So far, it seems the only real way to figure out what causes the lag is to create a new project, and slowly port over my code to it, then compare slowly, but that's gonna take 3-4 days of dev time, but it seems I have no choice. Uggh, that means I have to customize screen navigation, build then test on android. Customize game_menu, build then test on android. This is going to be painfully slow. Add three images, build then test on android.