Updating the minimap slowly reduces game fps to 0

Hello there, I’ve never asked for help before, but now I am stumped.

I am working on a racing game, where there is a minimap that uses a material and some calculations to calculate stuff like the center of the minimap and the direction the player is facing.

The problem is that after starting the build with high FPS, around 100-110, the FPS ticks down at about 1 FPS every 2 seconds or so while the game is running, so within two minutes, the game’s FPS is reduced to 0.

The issue can be tracked to the update function of the minimap. At first I used Event Tick, but now I have gone with set timer by function name, but while that does slow down the rate at which the FPS tick down (the fewer updates, the slower the FPS decay, it doesn’t stop it, the process just takes longer.

These are the calculations on the material.

And this is the update function that is supposed to collect player location and movements, send them to a material parameter collection, which can then be applied to the material, which will be reflected in the minimap widget on the HUD.

Disabling this update function completely fixes the decaying FPS so the issue must be here I just don’t understand how to stop it, any clues or insight would be highly appreciated. Also I am endlessly sorry if this was posted here already, I could not find it based on the words I was using.

Hi, can you show the function that leads to the decaying FPS?

Also since that function leads to the problem, try to refresh all nodes in it. If that does not help, try to pin it down further, so

(-) Disconnect the input pin of the function from the rest of the logic (so just execute the function without any logic). If that still gives you this problem, then most likely the blueprint got corrupted there and you can redo the function

(-) Try to pin it down to the exact node inside the function that leads to the problem.

Ah thanks very much for the ideas, I will do the refreshes and try to pinpoint the exact node causing the issue!

Thanks so much!

While pinpointing the specific node I realised the HUD was also running a create player icon script ever time the map was updated, which meant that there was probably thousands of player icons layered on top of one another which is what caused the slow decay of FPS.

Thanks for the help Chrudimer and I hope this post might help other people who google after a similar issue.

While pinpointing the specific node I realised the HUD was also running a create player icon script ever time the map was updated, which meant that there was probably thousands of player icons layered on top of one another which is what caused the slow decay of FPS.

Thanks for the help Chrudimer and I hope this post might help other people who google after a similar issue.