Collision occurs when two solid entities attempt to co-occupy the same location or locations. In some games, there is no effect other than the fact that the entities must move around each other to reach a destination goal. Other games have specific consequences for collision. Sometimes one or both entities are removed. Sometimes an attribute changes on one or both entities (ie, health attribute decreases). Entities moving on a predetermined path will often change direction when colliding with another entity. In some games, collision will allow an entity to collect another entity.
Agents can prevent other entities to prevent them from moving through the location of the agent. Successful obstruction of a location results in collision of the two entities.
An agent can intentionally collide with another entity by moving into its location. An agent may intentionally move into another entity's location for various reasons. Collision may remove the entity with which it collided. Collision may allow the agent to collect the entity with which it collided.
In Pong, the ball will change direction when it collides with a wall or a paddle. Players intentionally move their paddles in order to prevent the ball from going past them. If the paddle successfully obstructs the ball, the ball is deflected in the opposite direction. The new trajectory of the ball depends on where on the paddle it collided. If the paddle does not successfully obstruct the ball, the player that controls the other paddle scores a point.
In Space Invaders, the player-controlled ship will be removed when it collides with an alien. The alien will also be removed.
Super Mario Bros.
In Super Mario Bros., the player's coin score will increase by one when the player-controlled entity collides with a coin. The coin is removed. Their collision with bricks can cause several different actions depending on the size of Mario. Collision with ? boxes causes an item to appear. There is also the collision with hidden boxes that can reveal hidden areas and items.
In Pac-man, Pac-man can collide with ghosts. In his normal state, this will remove Pac-man. If he has recently eaten a super pellet, this will remove the ghost.