Category : 2d-games

I’m building a 2D platformer game, and every entity in my game inherits from class Entity. I have a std::vector<std::unique_ptr<Entity>> entities to dynamically allocate these entities. I want to also polymorphically check for collision from the driver code: for(int i = 0; i < entities.size();i++){ for(int j = 0; j < entities.size();j++) entities[i]->checkCollision(*j); } The ..

Read more