{"id":22895971,"url":"https://github.com/maplant/mgf","last_synced_at":"2025-07-24T21:15:19.554Z","repository":{"id":57638391,"uuid":"108347588","full_name":"maplant/mgf","owner":"maplant","description":"Matt's Game Framework","archived":false,"fork":false,"pushed_at":"2020-04-27T18:57:23.000Z","size":154,"stargazers_count":65,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T13:58:54.383Z","etag":null,"topics":["3d-video-game","collision-detection","physics-engine"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maplant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-10-26T01:47:47.000Z","updated_at":"2025-01-22T07:25:38.000Z","dependencies_parsed_at":"2022-09-02T02:12:52.635Z","dependency_job_id":null,"html_url":"https://github.com/maplant/mgf","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/maplant%2Fmgf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maplant%2Fmgf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maplant%2Fmgf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maplant%2Fmgf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maplant","download_url":"https://codeload.github.com/maplant/mgf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782589,"owners_count":21803404,"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":["3d-video-game","collision-detection","physics-engine"],"created_at":"2024-12-13T23:32:59.658Z","updated_at":"2025-05-07T20:28:33.793Z","avatar_url":"https://github.com/maplant.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MGF: Matt's Game Framework\n\n[![Documentation](https://docs.rs/mgf/badge.svg)](https://docs.rs/mgf)\n[![Version](https://img.shields.io/crates/v/mgf.svg)](https://crates.io/crates/mgf)\n[![License](https://img.shields.io/crates/l/mgf.svg)](https://github.com/DataAnalysisCosby/mgf/blob/master/LICENSE)\n[![Downloads](https://img.shields.io/crates/d/mgf.svg)](https://crates.io/crates/mgf)\n\nMGF is a collision detection and physics library for use in 3D video games.\n\nMGF is intended to very light weight and uses cgmath as a math backend.\n\nThe library provides various features such as:\n\n- structures to define shapes: `Ray`, `Segment`, `AABB`, `Rectangle`, `Triangle`, `Sphere`, `Capsule`\n- dynamic shape types: `Component`, `ComponentConstructor`\n- structures to define aggregate shapes: `Mesh`, `Compound`,\n- discrete collision detection: `Overlaps`, `Contains`\n- continuous collision detection: `Intersection`, `Contact`, `LocalContact`\n- a bounding volume hierarchy: `BVH`\n- rigid body physics: `RigidBodyVec`, `ContactConstraint`, `Solver`\n- dynamic containers: `Pool`\n\nMGF is very much in its infancy and is therefore not feature complete. If you\nnotice any errors or poorly thought out interfaces be sure to let me know.\n\n## 3D only\n\nFor the time being MGF is solely designed to handle 3D video games. This \nreflects my own use of MGF. If there is enough demand for MGF to support 2D\ngames, it may in the future.\n\n## Differences between other collision detection/physics libraries\n\nMost collision detection and physics libraries provide similar to functionality\nto MGF, what differs is how they are implemented. Most libraries use the GJK\nalgorithm to perform every type of collision, including continuous ones. MGF focuses\non providing fast and accurate exact collision detection for moving geometries\ncommonly found in games, such as `Spheres` and `Capsules`, and does not and cannot\nprovide fast and accurate moving mesh on mesh collisions.\n\nAs of version 1.1, MGF provides a limited form of GJK discrete collision detection, \nalthough in its current form it is quite limited.\n\n## Things to keep in mind\n\nOne interesting result of the implementation is that the direction of the normal\nof a polygon determines the \"side\" it is facing, in a similar manner to how back-face\nculling is performed. This allows us to determine inter-object penetration much more\naccurately than we would be able to otherwise. The normal force essentially acts\nas the direction of propulsion for the object during physics resolution. \n\n## Examples\n\nYou can find working examples in the mgf_demo folder. Demos require gfx and\ngfx_glutin to display visuals. Be sure to build the demos in release mode to get\nadequate performance:\n\n```\ncargo build --release\n```\n\n[Here is a link to a video of the demo in action.](https://www.youtube.com/watch?v=bPMm2_ttSq8)\n\n## Contributing\n\nMGF is welcome to anyone's contribution, and any part of the interface is open to \ndiscussion. Although if you are going to contribute new features please do \nbe sure to include unit tests. \n\n## License \n\nThe open source version of MGF is available with the GNU LGPL version 3 license.\nThis license is quite inconvenient for game programming, so if you would like to request\na custom license for your comercial product please contact `map@maplant.com` and we can\nassign you a custom license free of charge.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaplant%2Fmgf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaplant%2Fmgf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaplant%2Fmgf/lists"}