Original Post
I have been making many 2D games recently, and they all are sidescrollers, so they have collisions. I develop my games with C++ and the SDL library. The way I handle collisions right now is I go through each entity I have in my game and check if their SDL_Rect collides with eachother. But I've also run into the problem of getting exact collisions. I got a way of creating MANY SDL_Rects for a single sprite for per-pixel collisions.
So, I wanted to ask, what is the best way of handling collisions, but not using too much memory at the same time? And making sure the collisions are realistic or not?
Thanks.
So, I wanted to ask, what is the best way of handling collisions, but not using too much memory at the same time? And making sure the collisions are realistic or not?
Thanks.

