Ways to improve performance?
Posted: Thu Apr 14, 2016 2:21 am
A few players have reported that my game crashes at various points of the game. Mainly, it seems to be when a sound effect plays, but I imagine my animated sprites are hogging a lot of the memory.
Here's an example of the animated sprites... each one of these images is a transparent PNG about 300-400kb in size.
I wish I could get the file size down but I can't think of a way to do it unless I compromise the quality. I could save them as JPGs with the character on top the the background though. This could work, as the character's only ever on one screen in the center anyway.
I've also added this at the beginning:
Any tips?
Here's an example of the animated sprites... each one of these images is a transparent PNG about 300-400kb in size.
Code: Select all
image robin disagree:
yanchor 0.0 ypos -0.162
"sprites/disagree_01.png"
0.1
"sprites/disagree_02.png"
0.1
"sprites/disagree_03.png"
0.1
"sprites/disagree_04.png"
0.1
"sprites/disagree_05.png"
0.1
"sprites/disagree_06.png"
0.1
"sprites/disagree_07.png"
0.1
"sprites/disagree_08.png"
0.1
"sprites/disagree_09.png"
0.1
"sprites/disagree_10.png"
0.1
"sprites/disagree_11.png"
0.1
"sprites/disagree_12.png"
0.1
block:
"sprites/disagree_13.png"
0.1
"sprites/disagree_14.png"
0.1
"sprites/disagree_15.png"
0.1
repeat
I've also added this at the beginning:
As for sound effects, they vary in size quite a lot... between about 50kb and 800kb. Some sample rates are 44100, others 48000. All are 16bps WAV files.init python:
config.image_cache_size = 8
Any tips?