How do I create many zombies without sacrfying FPS ?

Get help using Construct 2

Post » Mon Aug 21, 2017 8:04 pm

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
B
6
S
2
Posts: 32
Reputation: 575

Post » Mon Aug 21, 2017 11:06 pm

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.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Aug 22, 2017 6:17 pm

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
B
6
S
2
Posts: 32
Reputation: 575

Post » Wed Aug 23, 2017 10:00 pm

I optimised those parts that i recognise, to my best knowledge.
But with so many zombies, those civilians die in seconds.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests