bumpy

2d collision library for Nim.

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Tags

Installation

nimble install bumpy
choosenim install bumpy
git clone https://github.com/treeform/bumpy

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
bumpy - - - - - - -

Source

Repository https://github.com/treeform/bumpy
Homepage https://github.com/treeform/bumpy
Documentation View Documentation
Registry Source nimble_official

README

Bumpy - 2d geometry intersections library for Nim.

  • nimby install bumpy

Github Actions

API reference

About

Based on the book http://www.jeffreythompson.org/collision-detection/table_of_contents.php

Mostly used for vector 2d intersections checking for Pixie: https://github.com/treeform/pixie

Supported intersections:

Shape Point Circle Rectangle Segment Polygon Line Wedge
Point
Circle
Rectangle
Segment
Polygon
Line
Wedge

All shapes support overlaps.

if overlaps(circle, point):
  echo "Circle and point overlap"
if contains(circle, point):
  echo "Circle contains point"

And some shapes support intersects functions.

var at: Vec2
if intersects(circle, segment, at):
  echo "Circle and segment intersect at ", at
var at: Vec2
if intersects(circle, polygon, at):
  echo "Circle and polygon intersect at ", at