Collisions Status and Progress
Page 1 of 1
Collisions Status and Progress
In this post I will show the progress made on the collision side.
As of today we have the following :
What I need to work on is Entity / Entity collisions, specifically on the following main points :
The real challenge for voxel game is Entity / Entity collisions as there is potentially a lot of block intersection checks to be made for each collisions, this work being done each frame keeping interactive framerate is really the challenge.
I used a specific algorithm that should work in most of the case, I still need to detect when it is not enough and I need to resort to a brute force approach. I also spend some time on the optimization side, if you detect some lag when you are flying near another spaceship please tell me.
For those of you interested at the behind the scene here is what an optimization looks like in unity, the deep profiler is just lovely for this kind of jobs :
At first :
Then after some low level technical optimizations (the same work is done, just more efficiently) :
I might one day fight these remaining 3.7 ms as this is the bottleneck, but for that I will have to change more deeply the way chucks are stored in the entity.
Then finally with a smarter algo (less work is done), this was an obvious one to do, but the case here was super favorable for it (we fly a big ship into a very small one)
Now at the end the number shown are not representative as it was done with the profiler in deep profile on, so in the real game it is much much faster (like 5x-10x).
As of today we have the following :
- Player collisions with geometry (block + brick)
- Raycast functions on geometry, buttons and studs
- Entity / Entity collisions on translation.
What I need to work on is Entity / Entity collisions, specifically on the following main points :
- Collision check while rotating the ship.
- Collision check on children entity
- Do physics computation on impact (now the ship is simply being stuck on impact). I will try to use the unity engine and if not possible I will have to code my own solution.
- Do a check that represent better the actual geometry.
The real challenge for voxel game is Entity / Entity collisions as there is potentially a lot of block intersection checks to be made for each collisions, this work being done each frame keeping interactive framerate is really the challenge.
I used a specific algorithm that should work in most of the case, I still need to detect when it is not enough and I need to resort to a brute force approach. I also spend some time on the optimization side, if you detect some lag when you are flying near another spaceship please tell me.
For those of you interested at the behind the scene here is what an optimization looks like in unity, the deep profiler is just lovely for this kind of jobs :
At first :
Then after some low level technical optimizations (the same work is done, just more efficiently) :
I might one day fight these remaining 3.7 ms as this is the bottleneck, but for that I will have to change more deeply the way chucks are stored in the entity.
Then finally with a smarter algo (less work is done), this was an obvious one to do, but the case here was super favorable for it (we fly a big ship into a very small one)
Now at the end the number shown are not representative as it was done with the profiler in deep profile on, so in the real game it is much much faster (like 5x-10x).
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum