Collision checking

From Mario Fan Games Galaxy Wiki

Collision-checking (also collision detection) is an engine feature that, while not necessarily difficult to implement, is difficult to implement accurately. Collision-checking is a required feature; a game cannot be played if objects freely pass through another and the ground. There are various kinds of collision-checking routines that an engine may use: gravity (vertical) movement, horizontal movement, and slopes are just a few applications.

The difficulty in implementing collision-checking occurs when acceleration and deceleration are used; during an collision, these properties require the engine to "push out" objects based on their velocity at the time of the impact. This requires the engine to check every object that collides with something, and figure out how far it needs to be pushed out. In contrast, with an engine that does not feature acceleration or deceleration, objects will only "embed" themselves a certain amount every time, so the engine only needs to use a generic push-out amount.