10000 AABB bodies - 90-100 FPS (C++, SFML)

Subscribers:
6,310
Published on ● Video Link: https://www.youtube.com/watch?v=z3MffXpfgcs



Duration: 1:48
5,745 views
38


The "physics" library shown in the video: https://github.com/SuperV1234/SSVSCollision

My website: http://www.vittorioromeo.info
My game creation framework: https://github.com/SuperV1234/SSVStart
My component-based entity system: https://github.com/SuperV1234/SSVEntitySystem

---

I'm using a 2D grid as my spatial hash. Bodies can be grouped in three different ways, using string identifiers:

Groups - the groups the body belongs to
Groups to check - the groups the body will CHECK collision with (and invoke callbacks)
Groups to resolve - the groups the body will RESOLVE collision with (they won't overlap)

The library handles 10000 bodies quite well as you can see in the video, but it still lacks features. Considering 500-1000 bodies are more than enough for any simple 2D game, it's safe to say performance won't be an issue.







Tags:
c++
collision
detection
resolution
physics
aabb
c#
programming
development
gamedev
game
tutorial
devlog
vittorio
romeo
vee
open
hexagon
super
sfml
performance
stress
test
benchmark
bodies
fps