How do I create many zombies without sacrfying FPS ?

  • Hello,

    I have a system, made with the help of some of you here, where zombies are spawing and chasing human beings. The zombies use the pathfind system.

    The problem is that when too many zombies are created, the FPS is dropping dramatically. Do you have an idea how to avoid that ?

    The Capx is here : https://www.dropbox.com/s/v8a53q5ckij48 ... .capx?dl=0

    Thanks !

    Mogador

    PS : once the game is launched, you can use arrows to move and mouse middle button to zoom out

  • Ohh i recognise a lot of events in there.

    You can do some optimisation by putting the object with the less instances first in every overlap/collision condition.

    But the biggest problem is event 101. The calculation of the obstacle map happens in 1 tick. And it is causing 3.000.000 collision checks /second. I dont know an alternative yet for a dynamic obstacle map.

    That logic flow works perfect though, nice to see those civilians run in panic away from those zombies. Gonna be hard to find another algorithm that works as nice as this one.

  • Indeed, there is a lot from you here

    Thanks again

    I tried to put a "Every 1 second" action before event 101. It makes far less collision checks /second, but the FPS still falls when there are more than 300 zombies

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I optimised those parts that i recognise, to my best knowledge.

    But with so many zombies, those civilians die in seconds.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)