• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help: Improving Game Performance

Level 11
Joined
Aug 24, 2022
Messages
434
Hello one more time! Now, I'd like some experience share from you who knows about the topic, or experienced something related and can share with me.

I was testing my current project this morning, and I've found a serious issue that I need to fix in my project: FPS drop and lag spikes.

What happened? My project, as you play it, keeps getting heavy as game is going. Before, this issue was caused by Memory Leaks (A lot of them, by the way). They've been fixed, everything is ok. Today, on the very last wave, when occurs a colossal boss fight against all bosses defeated at once (Three bosses, by the way), as heroes started to cast their ultimate abilities, and bosses started to take their effects in game, game dropped to 1 FPS, and broke the experience. Everyone died, because game just stopped. We were playing on "Hard Mode", and other game modes don't lag spike like that (Other modes also have this last epic wave, but also, they have a frame drop).

Thinking about this issue, I've evaluated some things that I have now, taking into account that each game wave has, at least, 100 enemies:

  • Some aura based items, that have a visual aura effect. So, with 2 same items, two aura effects that stack together;
  • Hero auras that can affect multiple enemies at once;
  • A lot of abilities visual effects at once, as game keep going, from new abilities that appears, new summons, etc;
  • Some auras that affect the whole arena (10.000 AoE) that shows a visual effect and that blue circle at the origin of the unit, that stacks, and late game, get that great bright effect;
  • Last Wave Only: A Banish Special effect, that takes effect on every enemy inside the arena when they get spawned; I guess this one, specific, is leaking memory.
  • Some summons with Immolation. Burned units get that fire effect, and on the Demon hero specific, he has Apocalypse, with 15 infernals at once. So, basically, all enemies get burnt at once;
  • Multiple Life Steal effects at once, as my orb effects are triggered now, and I have a huntress hero with Moon Glaive, and a Spearmaster with Vorpal Blades, both life stealing multiple times (Intended);
  • Triggered Pop-Up messages, showing Boss abilities that are being cast, Heroes ultimates being cast, amount of life stealed, occured orb effect like bash and chain lightning, etc;

With this in mind, I was thinking about how can I fix that;

  • Make only Heroes and Bosses abilities get their respective visual feedbacks;
  • Remove those useless item effects, as buffs, auras, that sort of thing, that is not that important to the game;
  • Summarize the skills from minions, so we don't get all of them casting almost all at once; Maybe changing active to passive versions of their skills, to save AI orders, and summarize their visual feedbacks;
  • Remove visual feedbacks from summoned units, as fire from immolation. Those feedbacks that can happens a lot of times at the same time;
  • Search for more memory leaks, as they just makes game heavier and heavier;


For you, this is a good starting place? This is something relatively new for me, so I used logical thinking about the problem, as If the computer doesn't need to make something, it shouldn't make. If you have something more to add, and/or want to give me a hint, I'd be grateful.

Thanks in advance.
 
Top