A downloadable game for Windows


I would like to create a 2D collision system. The main feature of this system would be to detect when two or more gameObjects(with colliders) collide/overlap. A user would be able to use this system by adding a collider to their game objects and specifying which collision layer its in using a tag. The user would also have to run an update function that checks if there were any collisions that occured that frame. The user would then need to override a OnCollision function where they detail how their gameobject would react to having collided with another gameobject.


I plan on implementing a box and circle collider. The main functions that I would implement are the CollisionSystem::Update that would iterate through a list of gameObjects updating the location of their colliders and checking if any collisions occurred. I would also implement a hasCollided function that would then call the collided gameObjects’ OnCollision functions. I would also likely need to implement functions/class that would assist me in keeping track of a colliders transforms and rotations.


The biggest challenge will probably be figuring out a way to make this system usable without having to specifically use my gameObject class. I also expect that it might be a bit more difficult to implement the circle collider than it is to implement the box collider.

Stretch Goals:

The main stretch goal for me would be to implement 3D collisions as well.


2DCollision.zip 13 kB

Development log