BepuPhysics1 Performance
Posted: Tue Apr 23, 2019 6:44 pm
I'm developing a fighting game 1vs1 in realtime, I'm using unity3d and bepuphysics1.
I don't have many colliders (all boxes and spheres), just the walls, some hitboxes and some hurtboxes. The scenerio is pretty simple but still the space update, or updating the colliders positions takes too much time, the logic of the game runs multiple times per frame because of the network support.
I'm thinking on getting rid of the space and checking the collisions manually, something like, is player 1 colliding with player 2, are they colliding against the walls, is any player1's hitboxes hitting any player2's hurtboxes, is this possible?
Do you have any suggestion to improve the performance in this scenerio?
I already tried splitting the colliders in multiple spaces, I have one for movement with walls, floor and 2 player colliders. And another for attacking, a couple hitboxes and hurtboxes for each player. I add and remove colliders depending on wether they are active or not, I think this option was more performant than leaving the colliders and ignoring the collision, or updating the collision rules.
I'm also using collision gorups to setup which colliders collide.
I don't have many colliders (all boxes and spheres), just the walls, some hitboxes and some hurtboxes. The scenerio is pretty simple but still the space update, or updating the colliders positions takes too much time, the logic of the game runs multiple times per frame because of the network support.
I'm thinking on getting rid of the space and checking the collisions manually, something like, is player 1 colliding with player 2, are they colliding against the walls, is any player1's hitboxes hitting any player2's hurtboxes, is this possible?
Do you have any suggestion to improve the performance in this scenerio?
I already tried splitting the colliders in multiple spaces, I have one for movement with walls, floor and 2 player colliders. And another for attacking, a couple hitboxes and hurtboxes for each player. I add and remove colliders depending on wether they are active or not, I think this option was more performant than leaving the colliders and ignoring the collision, or updating the collision rules.
I'm also using collision gorups to setup which colliders collide.