{"id":15014575,"url":"https://github.com/0x1ed1ce/fps","last_synced_at":"2025-04-12T08:13:00.203Z","repository":{"id":226770212,"uuid":"769178828","full_name":"0x1ED1CE/FPS","owner":"0x1ED1CE","description":"A 3D physics engine","archived":false,"fork":false,"pushed_at":"2025-04-09T15:19:12.000Z","size":33946,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T08:12:43.194Z","etag":null,"topics":["love2d","lua"],"latest_commit_sha":null,"homepage":"","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/0x1ED1CE.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":"2024-03-08T14:01:52.000Z","updated_at":"2025-04-09T15:19:17.000Z","dependencies_parsed_at":"2025-04-09T16:37:02.532Z","dependency_job_id":null,"html_url":"https://github.com/0x1ED1CE/FPS","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"7dcf2e23267b627b96526797b4780ae3f1bdf0a1"},"previous_names":["0x1ed1ce/fps"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1ED1CE%2FFPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1ED1CE%2FFPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1ED1CE%2FFPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x1ED1CE%2FFPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x1ED1CE","download_url":"https://codeload.github.com/0x1ED1CE/FPS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537144,"owners_count":21120711,"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":["love2d","lua"],"created_at":"2024-09-24T19:45:47.637Z","updated_at":"2025-04-12T08:13:00.198Z","avatar_url":"https://github.com/0x1ED1CE.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Free Physics Solver\n![LICENSE](https://img.shields.io/badge/LICENSE-MIT-green.svg) ![WIP](https://img.shields.io/badge/WIP-yellow.svg)\n\nFPS is a lite 3D physics engine intended to be used for game development.\n\n\u003cimg src=\"/screenshots/mBAgMbm.gif?raw=true\"\u003e\n\n**It is recommended to use this library with [VML](https://github.com/0x1ED1CE/VML)**\n\n## Example Code\n```C\n#define FPS_IMPLEMENTATION\n#include \"fps.h\"\n\nvoid main() {\n\t// Create dynamic bodies\n\tfps_body *body_a = fps_body_new();\n\tfps_body *body_b = fps_body_new();\n\n\t// Create (box) colliders\n\tfps_part *part_a = fps_part_new();\n\tfps_part *part_b = fps_part_new();\n\n\t// Add colliders to the bodies\n\tfps_body_part_add(body_a,part_a);\n\tfps_body_part_add(body_b,part_b);\n\n\t// Make body A a moving box\n\tfps_body_dynamic_set(body_a,FPS_TRUE);              // Body A is dynamic and can move\n\tfps_body_position_set(body_a,(ice_real[3]){0,5,0}); // You can also use fps_body_transform_set()\n\tfps_part_size_set(part_a,(fps_real[3]){1,1,1});     // Set the size to 1,1,1\n\tfps_part_solid_set(part_a,FPS_TRUE);                // Make it solid so it reacts to collisions\n\tfps_part_friction_set(part_a,0.7);                  // Friction 0 (slick) to 1 (doesn't slide)\n\tfps_part_restitution_set(part_a,0.5);               // Restitution 0 (no bounce) to 1 (bounces)\n\tfps_part_density_set(part_a,1.0);                   // Density affects the mass and inertia\n\n\t// Make body B a static floor\n\tfps_body_dynamic_set(body_b,FPS_FALSE);\n\tfps_body_position_set(body_b,(ice_real[3]){0,0,0});\n\tfps_part_size_set(part_b,(fps_real[3]){10,1,10});\n\tfps_part_solid_set(part_b,FPS_TRUE);\n\tfps_part_friction_set(part_b,0.7);\n\tfps_part_restitution_set(part_b,0.5);\n\tfps_part_density_set(part_b,1.0);\n\n\twhile (1) {\n\t\t// Apply gravity to body A\n\t\tfps_real mass = fps_body_mass_get(body_a);\n\t\tfps_body_force_apply(body_a,(fps_real[3]){0,-10.0*mass,0});\n\n\t\t// Test collision between bodies A and B\n\t\tfps_collision_test(body_a,body_b);\n\n\t\t// Step the bodies 1/60th of a second\n\t\tfps_body_step(body_a,1.0/60.0);\n\t\tfps_body_step(body_b,1.0/60.0);\n\t}\n\n\t// Cleanup\n\tfps_part_free(part_a);\n\tfps_part_free(part_b);\n\n\tfps_body_free(body_a);\n\tfps_body_free(body_b);\n}\n```\nRefer to [fps.h](fps.h) to see rest of the functions.\n\n## License\nThis software is free to use. You can modify it and redistribute it under the terms of the \nMIT license. Check [LICENSE](LICENSE) for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x1ed1ce%2Ffps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x1ed1ce%2Ffps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x1ed1ce%2Ffps/lists"}