{"id":17181101,"url":"https://github.com/alan-fgr/sharpmunk","last_synced_at":"2025-10-08T22:07:57.666Z","repository":{"id":94977919,"uuid":"99228753","full_name":"Alan-FGR/SharpMunk","owner":"Alan-FGR","description":"Idiomatic and fast C# bindings for the Chipmunk physics engine","archived":false,"fork":false,"pushed_at":"2017-08-04T23:26:10.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T00:42:34.875Z","etag":null,"topics":["bindings","chipmunk","chipmunk-physics-engine","chipmunk2d"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/Alan-FGR.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}},"created_at":"2017-08-03T12:10:00.000Z","updated_at":"2020-12-13T16:11:50.000Z","dependencies_parsed_at":"2023-04-10T14:18:57.741Z","dependency_job_id":null,"html_url":"https://github.com/Alan-FGR/SharpMunk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alan-FGR/SharpMunk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alan-FGR%2FSharpMunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alan-FGR%2FSharpMunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alan-FGR%2FSharpMunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alan-FGR%2FSharpMunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alan-FGR","download_url":"https://codeload.github.com/Alan-FGR/SharpMunk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alan-FGR%2FSharpMunk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000779,"owners_count":26082851,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bindings","chipmunk","chipmunk-physics-engine","chipmunk2d"],"created_at":"2024-10-15T00:33:00.707Z","updated_at":"2025-10-08T22:07:57.634Z","avatar_url":"https://github.com/Alan-FGR.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SharpMunk\nIdiomatic and fast C# bindings for the Chipmunk physics engine\n\n# Current State\nUsable as a decent foundation to expand upon.\n\n# Tests\nThese tests are based on the [official \"Hello World\"](https://chipmunk-physics.net/release/ChipmunkLatest-Docs/#Intro-HelloChipmunk)\n\nC# Code:\n```CSharp\nstatic void Main(string[] args)\n{\n    cpSpace space = new cpSpace();\n    space.SetGravity(new cpVect(0,-100));\n\n    cpShape shape = cpShape.NewSegment(space.StaticBody, new cpVect(-20, 5), new cpVect(20, -5), 0);\n    shape.SetFriction(1);\n\n    space.AddShape(shape);\n    \n    double radius = 5;\n    double mass = 1;\n    double moment = cpUtil.MomentForCircle(mass, 0, radius, cpVect.Zero);\n\n    cpBody ballBody = new cpBody(mass, moment);\n    space.AddBody(ballBody);\n    ballBody.Position = new cpVect(0, 15);\n\n    cpShape ballShape = cpShape.NewCircle(ballBody, radius, cpVect.Zero);\n    space.AddShape(ballShape);\n    ballShape.SetFriction(0.7);\n\n    double timeStep = 1 / 60d;\n    for (double time = 0; time \u003c 2; time+=timeStep)\n    {\n        cpVect pos = ballBody.Position;\n        cpVect vel = ballBody.Velocity;\n        Console.WriteLine(\"Time is {0:F2}. ballBody is at ({1:F2}, {2:F2}). It's velocity is ({3:F2}, {4:F2})\",\n            time, pos.X, pos.Y, vel.X, vel.Y\n        );\n        space.Step(timeStep);\n    }\n}\n```\nC# Output:\n```\nTime is 0.00. ballBody is at (0.00, 15.00). It's velocity is (0.00, 0.00)\nTime is 0.02. ballBody is at (0.00, 15.00). It's velocity is (0.00, -1.67)\n[...]\nTime is 2.00. ballBody is at (28.93, -6.27). It's velocity is (26.68, -36.10)\n```\n\nC99 Code:\n```C\nint main(void) {\n\n    cpVect gravity = cpv(0, -100);\n\n    cpSpace *space = cpHastySpaceNew();\n    cpSpaceSetGravity(space, gravity);\n    cpHastySpaceSetThreads(space, 2);\n\n    cpShape *ground = cpSegmentShapeNew(space-\u003estaticBody, cpv(-20, 5), cpv(20, -5), 0);\n    cpShapeSetFriction(ground, 1);\n    cpSpaceAddShape(space, ground);\n\n    cpFloat radius = 5;\n    cpFloat mass = 1;\n    cpFloat moment = cpMomentForCircle(mass, 0, radius, cpvzero);\n\n    cpBody *ballBody = cpSpaceAddBody(space, cpBodyNew(mass, moment));\n    cpBodySetPosition(ballBody, cpv(0, 15));\n\n    cpShape *ballShape = cpSpaceAddShape(space, cpCircleShapeNew(ballBody, radius, cpvzero));\n    cpShapeSetFriction(ballShape, 0.7);\n\n    cpFloat timeStep = 1.0 / 60.0;\n    for (cpFloat time = 0; time \u003c 2; time += timeStep) {\n        cpVect pos = cpBodyGetPosition(ballBody);\n        cpVect vel = cpBodyGetVelocity(ballBody);\n        printf(\n            \"Time is %5.2f. ballBody is at (%5.2f, %5.2f). It's velocity is (%5.2f, %5.2f)\\n\",\n            time, pos.x, pos.y, vel.x, vel.y\n        );\n\n        cpHastySpaceStep(space, timeStep);\n    }\n    \n    cpShapeFree(ballShape);\n    cpShapeFree(ground);\n    cpSpaceFree(space);\n\n    return 0;\n}\n```\nC99 Output:\n```\nTime is  0.00. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00,  0.00)\nTime is  0.02. ballBody is at ( 0.00, 15.00). It's velocity is ( 0.00, -1.67)\n[...]\nTime is  2.00. ballBody is at (28.93, -6.27). It's velocity is (26.68, -36.10)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-fgr%2Fsharpmunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falan-fgr%2Fsharpmunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falan-fgr%2Fsharpmunk/lists"}