Skip to content
/ ump Public

An AABB collision detection library for Go

License

Notifications You must be signed in to change notification settings

tanema/ump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ump

Go collision-detection library for axis-aligned rectangles. Its main features are:

  • ump only does axis-aligned bounding-box (AABB) collisions. If you need anything more complicated than that (circles, polygons, etc.) give box2dlite a look.
  • Handles tunnelling - all items are treated as "bullets". The fact that we only use AABBs allows doing this fast.
  • Strives to be fast while being economic in memory
  • It's centered on detection, but it also offers some (minimal & basic) collision response
  • Can also return the items that touch a point, a segment or a rectangular zone.
  • ump is gameistic instead of realistic.

The demos are Amore based, but this library can be used in any Go program.

ump is ideal for:

  • Tile-based games, and games where most entities can be represented as axis-aligned rectangles.
  • Games which require some physics, but not a full realistic simulation - like a platformer.
  • Examples of genres: top-down games (Zelda), Shoot-em-ups, fighting games (Street Fighter), platformers (Super Mario).

ump is not a good match for:

  • Games that require polygons for the collision detection
  • Games that require highly realistic simulations of physics - things "stacking up", "rolling over slides", etc.
  • Games that require very fast objects colliding reallistically against each other (in ump, being gameistic, objects are moved and collided one at a time)
  • Simulations where the order in which the collisions are resolved isn't known.

Example

For full example usage please see the amore example platformer

About

An AABB collision detection library for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages