Quantcast
Channel: Answers by "luniac"
Viewing all articles
Browse latest Browse all 34

Answer by luniac

$
0
0
I also noticed setting multithreaded in the build options lowered fps by 5+ I'm gonna recode a part of my game so that the 3d collider is deactivated as soon as a particle interacts with it, this way there will way less active 3d colliders at any moment in the game, a lot less actually, so that should help. In fact i'm completely removing any interactivity between zombie 3d colliders, and will make it only particle to collider collisions. It'll make a little extra overhead because ill have more particle with collision enabled, but ill minimize it so that it's less than 100 totalor so collidable particles added. The way i have it now is that a particle collides with a 3d collider, that collider becomes a trigger and zombie goes on fire, at which point another zombie 3d collider can collide with the trigger and also become a trigger and go on fire, and so on and so on. eventually when the fire disipates from any particular zombie, that 3d collider will deactivate so it cant set any other 3d colliders into a trigger and on fire. It was actually kind of elegant lol, i thought i was being proactive in utilizing one 3d collider for all that functionality by playing with the triggers. But now the 3d colider can be deactivated the entire time the zombie is on fire instead of being a trigger, and ill just have the fire be a collidable particle like my flamethrower weapon actually. I was originally trying to lower my collidable particle count because i know its inefficient but i NEVER thought that it would turn out that the 3d colliders themselves were this inefficient, even as kinematic! I'm still not sure how i'm gonna limit the 2d collisions between zombies, but technically speaking, since the turret won't be able to take too many hits, by the time enough zombies start colliding with each other, the turret will already be destroyed. I'm really not sure any other way to not have the zombies not collide with each other, i definitely don't want them to overlap and ignore any collisions because that would just look silly. I was thinking of implementing a non physics way of motion using transforms and pure scripting, but it just would just be over complicating things in my opinion at the moment. I was thinking i'll just limit the amount of zombies on screen at any moment to maybe 50 or less, and if it's too easy i can make them faster. I'm gonna play around a little more with the timestep after i'm done recoding the 3d collider part and see if maybe i missed a little fps boost somewhere. Thanks for the help guys, ill definitely write back with my final solution and fps in case anyones interested.

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>