{"id":25621127,"url":"https://github.com/setanarut/coll","last_synced_at":"2026-01-21T11:00:49.196Z","repository":{"id":277903506,"uuid":"933871027","full_name":"setanarut/coll","owner":"setanarut","description":"2d collision library for Go","archived":false,"fork":false,"pushed_at":"2025-12-27T02:48:00.000Z","size":138,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T21:55:25.168Z","etag":null,"topics":["2d-collision","2d-collision-checker","2d-collision-library","aabb","axis-aligned-bounding-box","collision-detection","collision-resolution","dda-algorithm","ebiten","ebitengine","game-development","go","golang","golang-package","intersection","sat-solver","sweep-line","sweep-line-algorithm","tilemap-collision"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/setanarut/coll","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/setanarut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-16T21:40:43.000Z","updated_at":"2025-12-27T02:46:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"22f71303-38cf-44ea-a5fe-36beb90be28c","html_url":"https://github.com/setanarut/coll","commit_stats":null,"previous_names":["setanarut/coll"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/setanarut/coll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Fcoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Fcoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Fcoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Fcoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setanarut","download_url":"https://codeload.github.com/setanarut/coll/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Fcoll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-collision","2d-collision-checker","2d-collision-library","aabb","axis-aligned-bounding-box","collision-detection","collision-resolution","dda-algorithm","ebiten","ebitengine","game-development","go","golang","golang-package","intersection","sat-solver","sweep-line","sweep-line-algorithm","tilemap-collision"],"created_at":"2025-02-22T08:34:14.344Z","updated_at":"2026-01-21T11:00:49.178Z","avatar_url":"https://github.com/setanarut.png","language":"Go","readme":"[![GoDoc](https://godoc.org/github.com/setanarut/coll?status.svg)](https://pkg.go.dev/github.com/setanarut/coll)\n\n# coll - 2d collision library for Go\n\nFeatures\n\n* Collisions only - no gravity, rigid body handling, or complex solvers\n* Is data-oriented and functional\n\n## Conventions\n\n\"Sweep\" tests indicate at least 1 of the objects is moving. \nThe number indicates how many objects are moving. e.g., `box-box-sweep2` means we are comparing 2 aabbs, both of which are moving.\n\"Overlap\" tests don't take movement into account, and this is a static check to see if the 2 entities overlap.\nplural forms imply a collection. e.g., `BoxSegmentsSweep1Indexed()` checks one box segment against a set of line segments.\nIf there is more than one collision, the closest collision is set in the `h *Hit` argument.\n\n## Visualization of some (but not all) functions\n\n### Box-Box overlap\n\n![Box-Box-overlap](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-aabb-overlap.png)\n\n### Box-Box sweep 1\n\n![Box-Box sweep 1](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-aabb-sweep1.png)\n\n### Box-Box sweep 2\n\n![Box-Box sweep 2](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-aabb-sweep2.png)\n\n### Box-OrientedBox overlap\n\n![abb-obb-overlap](https://github.com/user-attachments/assets/972ae63f-6ed0-4d10-a893-ab80f0f59f00)\n\n### Box-Segment sweep 1\n\n![Box-Segment sweep 1](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-segment-sweep1.png)\n\n### Box-Segments sweep 1 indexed\n\n![Box-Segments sweep 1](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-segments-sweep1-indexed.png)\n\n### Box-Segment overlap\n\n![Box-Segment overlap](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/aabb-segment-overlap.png)\n\n### Line-Circle overlap\n\n![alt text](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/ray-circle-overlap.png)\n\n### Segment-Circle overlap\n\n![alt text](https://raw.githubusercontent.com/mreinstein/collision-2d/refs/heads/main/docs/segment-circle-overlap.png)\n\n## Examples (Ebitengine)\n\n1. Clone this repository\n2. In the terminal, change to the examples directory `cd examples`\n3. Run a folder with `go run ./foldername`. Example: `go run ./box_box_sweep1 `\n\n## Credits\n\nMost of these collision checks were adapted from existing open source repos:\n\n* [github.com/mreinstein/collision-2d](https://github.com/mreinstein/collision-2d)\n* [youtube.com/watch?v=NbSee-XM7WA](https://youtube.com/watch?v=NbSee-XM7WA) - ray-tilemap (RayTilemapDDA)\n* [jonathanwhiting.com/tutorial/collision](https://jonathanwhiting.com/tutorial/collision) - box-tilemap (TileCollider)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Fcoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetanarut%2Fcoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Fcoll/lists"}