{"id":15034838,"url":"https://github.com/zergon321/cirno","last_synced_at":"2025-04-09T22:52:29.896Z","repository":{"id":56061667,"uuid":"300752782","full_name":"zergon321/cirno","owner":"zergon321","description":"An easy-to-use collision resolution library for gamedev written in pure Go.","archived":false,"fork":false,"pushed_at":"2021-08-28T16:44:42.000Z","size":3625,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T22:52:17.753Z","etag":null,"topics":["collision","collision-avoidance","collision-detection","collision-handling","gamedev","geometric-algorithms","geometry","go","golang","golang-examples","golang-library","hitbox","hitboxes","quadtree"],"latest_commit_sha":null,"homepage":"","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/zergon321.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}},"created_at":"2020-10-02T22:52:31.000Z","updated_at":"2025-03-01T12:25:06.000Z","dependencies_parsed_at":"2022-08-15T12:30:34.579Z","dependency_job_id":null,"html_url":"https://github.com/zergon321/cirno","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Fcirno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Fcirno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Fcirno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zergon321%2Fcirno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zergon321","download_url":"https://codeload.github.com/zergon321/cirno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125641,"owners_count":21051766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["collision","collision-avoidance","collision-detection","collision-handling","gamedev","geometric-algorithms","geometry","go","golang","golang-examples","golang-library","hitbox","hitboxes","quadtree"],"created_at":"2024-09-24T20:26:30.677Z","updated_at":"2025-04-09T22:52:29.871Z","avatar_url":"https://github.com/zergon321.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cirno [![GoDoc](https://godoc.org/github.com/zergon321/cirno?status.svg)](https://pkg.go.dev/github.com/zergon321/cirno)\n\nAn easy to use collision detection and resolution library written in **Go** programming language. The library is still in development and the API might change.\n\n## Installation\n\nNo **C** dependencies required to compile the library. Just use the following command to install it.\n\n```bash\ngo get github.com/zergon321/cirno\n```\n\n## Tutorial\n\nThe tutorial series explains how to use different API methods and data types of **Cirno** to handle everything related to collisions in games.\n\n- [Tutorial 01: Basic collisions](https://github.com/zergon321/cirno/wiki/Tutorial-01:-Basic-collisions)\n\n## Examples\n\nAll the example programs using the library are located  in [examples](https://github.com/zergon321/cirno/tree/master/examples) directory. [Pixel](https://github.com/faiface/pixel) is required to run any of them. The most important demos are described below.\n\n- [benchmark](https://github.com/zergon321/cirno/tree/master/examples/benchmark) - a small demo application that creates 1000 rectangles, randomly moves and rotates them and serches for collisions between them. It clearly showcases quad tree in action;\n\n- [contacts](https://github.com/zergon321/cirno/tree/master/examples/contacts) - a small demo application that showcases finding contact points between shape outlines;\n\n- [raycast](https://github.com/zergon321/cirno/tree/master/examples/raycast) - a small demo application that showcases raycast, just like [Physics2D.Raycast](https://docs.unity3d.com/ScriptReference/Physics2D.Raycast.html) from **Unity**;\n\n- [sliding](https://github.com/zergon321/cirno/tree/master/examples/sliding) - a small demo that showcases shapes movement with sliding collision.\n\n## Games\n\nThe most noteable game created with **Cirno** at the current time is a **Touhou** style [danmaku demo](https://zergon321.itch.io/touhou-game-in-go). The less noteable one is a tiny platrformer level in [examples](https://github.com/zergon321/cirno/tree/master/examples) directory.\n\n| [Danmaku](https://zergon321.itch.io/touhou-game-in-go) | [Platformer](https://github.com/zergon321/cirno/blob/master/examples/platformer) |\n| --- | --- |\n| ![Danmaku](https://github.com/zergon321/cirno/blob/master/screenshots/danmaku.png) | ![Platformer](https://github.com/zergon321/cirno/blob/master/screenshots/platformer.png) |\n\nIf you have a game using **Cirno** and you want it to be present in this list, just create a new PR with your changes to the README.\n\n## Features\n\n- Shapes to attach to game objects to detect and resolve collisions between them:\n  - circle;\n  - line segment (or just line);\n  - rectangle (OBB, oriented bounding box).\n- Quadtree space index\n- Raycast\n- Contacts finding methods\n- Normal computing methods\n- Movement and rotation approximation\n- Tag system\n\n## Contributing\n\nFor minor and unimportant errors such as typos please just create issues instead of PRs fixing them.\n\nCode changes adding features, optimizations, tests and bugfixes are welcome. All the contributions in [examples](https://github.com/zergon321/cirno/tree/master/examples) directory should be really small, preferrably one-file. If your game is quite big, consider placing links to it in the list of games in the README.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzergon321%2Fcirno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzergon321%2Fcirno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzergon321%2Fcirno/lists"}