{"id":19453404,"url":"https://github.com/passiomatic/platformer-physics","last_synced_at":"2025-10-24T07:38:50.419Z","repository":{"id":138158099,"uuid":"473210109","full_name":"passiomatic/platformer-physics","owner":"passiomatic","description":"Proof-of-concept platformer physics system using pixel-perfect values","archived":false,"fork":false,"pushed_at":"2024-08-29T11:04:16.000Z","size":76,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T16:38:49.715Z","etag":null,"topics":["elm","physics-2d"],"latest_commit_sha":null,"homepage":"https://lab.passiomatic.com/platformer-physics/","language":"Elm","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passiomatic.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":"2022-03-23T13:53:34.000Z","updated_at":"2024-12-09T06:49:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"24b0b485-7d90-4967-b389-2d59bd84bacd","html_url":"https://github.com/passiomatic/platformer-physics","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/passiomatic%2Fplatformer-physics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passiomatic%2Fplatformer-physics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passiomatic%2Fplatformer-physics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passiomatic%2Fplatformer-physics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passiomatic","download_url":"https://codeload.github.com/passiomatic/platformer-physics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250754589,"owners_count":21481841,"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":["elm","physics-2d"],"created_at":"2024-11-10T17:04:23.116Z","updated_at":"2025-10-24T07:38:50.322Z","avatar_url":"https://github.com/passiomatic.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Platformer physics in Elm\n\n![Game level](./assets/screenshot.png)\n\nThis is a proof-of-concept application to explore several concepts described by Maddy Thorson's post [_Celeste and TowerFall Physics_][c].\n\nAll the physics in the system are handled by two types: `Wall` and `Entity`. Walls are the collidable level geometry. Entities are physics objects, such as players, arrows, monsters, treasure chests, etc. \n\nAnything that has to move and interact with the level geometry is an entity. The system has a few simple constraints:\n\n* All colliders are axis-aligned bounding boxes (AABBs)\n* All collider positions, widths, and heights are integer numbers\n* Walls do not interact with other walls\n\nFor this demo the game graphics and logic have been kept to a minimun to focus on entity movement and collision detection/response. \n\nIf you want richer graphics while using the [WebGL Playground][w] package take a look at [Sunny Land][sl].\n\n## Run locally\n\nClone the repo and run Elm's `reactor` command:\n\n```\nelm reactor\n```\n\nThen point your browser to \u003chttp://localhost:8000/src/Main.elm\u003e\n\n## Other references \n\nThe sample Beef code modeled after the Celeste physics can be found in the [Strawberry game engine][4]. In particular look at the [`Actor`][a] and [`Player`][p] classes. \n\nOther interesting blog posts have been studied to complete the implementation:\n\n* [_Integration basics_][1] and [_Fix your timestep!_][2] by Glenn Fiedler\n* [_Collision detection: rectangle vs rectangle_][3] by Jeff Thompson\n\n[c]: https://maddythorson.medium.com/celeste-and-towerfall-physics-d24bd2ae0fc5\n[1]: https://gafferongames.com/post/integration_basics/\n[2]: https://gafferongames.com/post/fix_your_timestep/\n[3]: http://www.jeffreythompson.org/collision-detection/rect-rect.php\n[4]: https://github.com/MaddyThorson/StrawberryBF\n[p]: https://github.com/MaddyThorson/StrawberryBF/blob/bae5798f070e10f11bb633e5bc206e33859df928/SampleGame/src/Entities/Player.bf\n[a]: https://github.com/MaddyThorson/StrawberryBF/blob/bae5798f070e10f11bb633e5bc206e33859df928/SampleGame/src/Physics/Actor.bf\n[w]: https://package.elm-lang.org/packages/justgook/webgl-playground/latest/\n[sl]: https://github.com/passiomatic/sunny-land","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassiomatic%2Fplatformer-physics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassiomatic%2Fplatformer-physics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassiomatic%2Fplatformer-physics/lists"}