playMaker

Author Topic: Memory use by playmaker on an empty scene. [SOLVED]  (Read 1297 times)

pelikan13

  • Playmaker Newbie
  • *
  • Posts: 6
Memory use by playmaker on an empty scene. [SOLVED]
« on: March 10, 2019, 10:40:56 AM »
I know playmaker does not officially support the Nintendo Switch but it works great in any case. However I'm having an issue and I'm trying to track it down.

Upon starting the game the first scene that contains a playmaker fsm even if it's an empty scene with only an empty fsm will cause a 20+ second delay and will cause the memory use to spike at over 3gb. If the texture files are removed form the project that will not happen.

That leads me to believe that somehow playmaker is referencing textures that are in the project but not in the scene.

Any help pointing me to the right direction is appreciated, thanks!
« Last Edit: March 10, 2019, 08:48:22 PM by Alex Chouls »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Memory use by playmaker on an empty scene.
« Reply #1 on: March 10, 2019, 06:14:20 PM »
Hi.
Have you tested with a scene that does not include an fsm.

Are the textures in a resource folder?

Do you use global variables that include the textures?

pelikan13

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Memory use by playmaker on an empty scene.
« Reply #2 on: March 10, 2019, 06:58:41 PM »
Hi.
Have you tested with a scene that does not include an fsm.

Are the textures in a resource folder?

Do you use global variables that include the textures?

It doesn't happen if the scene does not include an fsm. The textures are not in a resource folder, there is a single game object variable that refernces a prefab with textures witha total size of around 50mb.

All the textures use crunch compression, I noticed that changing some of the textures to a normal dxt5 format reduces the memory spike but the delay remains.

I also need to point out that this happens only on the Switch version and not the PC. However this was not always the case, it used to work fine on Switch which leads me to believe I must have unknowingly changed a setting.


edit- ok, so i removed the prefab from the global variable and the delay is gone, thank you so much!
« Last Edit: March 10, 2019, 07:27:15 PM by pelikan13 »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Memory use by playmaker on an empty scene. [SOLVED]
« Reply #3 on: March 11, 2019, 02:28:26 AM »
Hi.
How much % did you set the crunch?

Globals will indeed be loaded @ the start as it can be used in any scene.

You might also want to look if you could break up the texture, 50mb is pretty large.

pelikan13

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Memory use by playmaker on an empty scene. [SOLVED]
« Reply #4 on: March 11, 2019, 05:39:36 AM »
Hi.
How much % did you set the crunch?

Globals will indeed be loaded @ the start as it can be used in any scene.

You might also want to look if you could break up the texture, 50mb is pretty large.

The prefab is a player controlled character referencing hd sprites. There are 10 4k sprite sheets. Each spritesheet is around 2-2.5 mb with crunch compression at 100% and 16mb with normal dxt5 compression.

This still does not account for the big memory spike but since that fixes the issue I'm happy with it.

The solution was to assign the prefab to the empty game object global variable in game.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Memory use by playmaker on an empty scene. [SOLVED]
« Reply #5 on: March 11, 2019, 06:37:47 AM »
Hi.
Try setting the crunch lower (90-95)

I had issues before due to using 100%