{"id":28215603,"url":"https://github.com/pascalcorpsman/corp3d","last_synced_at":"2025-06-10T18:32:13.341Z","repository":{"id":291381929,"uuid":"977448161","full_name":"PascalCorpsman/CorP3D","owner":"PascalCorpsman","description":"Implements a 3D physics engine using FreePascal","archived":false,"fork":false,"pushed_at":"2025-05-23T12:13:41.000Z","size":261,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T13:50:46.829Z","etag":null,"topics":["3d","freepascal","lazarus","library","physics-engine"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PascalCorpsman.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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,"zenodo":null}},"created_at":"2025-05-04T08:30:01.000Z","updated_at":"2025-05-23T12:13:44.000Z","dependencies_parsed_at":"2025-05-23T13:46:29.947Z","dependency_job_id":"e9e1b15b-cf51-45ae-9791-852a094fce92","html_url":"https://github.com/PascalCorpsman/CorP3D","commit_stats":null,"previous_names":["pascalcorpsman/corp3d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalCorpsman%2FCorP3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalCorpsman%2FCorP3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalCorpsman%2FCorP3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalCorpsman%2FCorP3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PascalCorpsman","download_url":"https://codeload.github.com/PascalCorpsman/CorP3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PascalCorpsman%2FCorP3D/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259124212,"owners_count":22808892,"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","freepascal","lazarus","library","physics-engine"],"created_at":"2025-05-17T22:11:22.827Z","updated_at":"2025-06-10T18:32:13.326Z","avatar_url":"https://github.com/PascalCorpsman.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CorP3D\r\n\r\nCor(psman)P(hysic)3D is my try to implement a 3D-Physics engine.\r\n\r\n\u003e\r\n\u003e ! Attention !\r\n\u003e \r\n\u003e At the moment the development of this library is on hold. But there is still progress, see [FPC_cyclone-physics](https://github.com/PascalCorpsman/FPC_cyclone-physics) for actual progress.\r\n\u003e\r\n\r\n\u003c!--- \r\n\u003e\r\n\u003e ! Attention !\r\n\u003e\r\n\u003e This is a work in progress, don't expect anything to work yet, writing a 3D Physics engine\r\n\u003e is a really tough task, ..\r\n\u003e \r\n---\u003e\r\n\r\n#### Why this engine?\r\n\r\nWhen i started coding 3D games i used [Newton](http://newtondynamics.com/forum/newton.php), but since version 3 i have had to much trouble getting it to work, and the older versions are not available as source, so i was not able to continue using Newton.\r\n\r\nNext i tried [Kraft](https://github.com/BeRo1985/kraft) which is written in FreePascal and used in [Castle Game Engine](https://github.com/castle-engine/castle-engine). I even tried to create first [Examples](https://github.com/PascalCorpsman/kraft_examples) as there is barely no documentation for Kraft. Creating this examples i figured out some \"issues\" and did not get any responce from the creator. So i had no choice as to abandon this work too :/.\r\n\r\nSo what's next, well trying to write a own Physic engine ;).\r\n\r\nTo be honest i am not shure whether i will be ever able to get a working version, but at least i give it a try and even if i am not getting it to work, i hopefully will be able to learn something .. \r\n\r\n### What is the aim of this engine ?\r\n\r\n- First priority is: understanding and writing 3D physics (i am \"ok\" in IT, but with nearly no knowlege to physics 🙈)\r\n- Second priority is: bring the engine to a point where i can use it in [balanced2](https://corpsman.de/index.php?doc=projekte/balanced2)\r\n\r\n### What is the planned roadmap ?\r\n\r\n- Basic convex hull collisions using the [SAT](https://dyn4j.org/2010/01/sat/) algorithm ✅\r\n- Correct responce (Force  / Torque / Rotation)\r\n- Compound collissions (concave objects)\r\n- Support Planes ✅ (only static, not moving, not elastic)\r\n- Support spheres\r\n- Support cylinders (is that possible with SAT ?)\r\n- Support cones (is that possible with SAT ?)\r\n- Speedup the code execution by using all kind of optimizations like:\r\n  - collision spheres (before SAT) ✅ \r\n  - [octree's](https://en.wikipedia.org/wiki/Octree)\r\n  - further optimizations ?\r\n\r\n### What is actually not on the roadmap ?\r\n\r\n- joints, springs and all that high level stuff that is not needed for balanced2\r\n\r\nThis does not mean that there will be some point in far future where i include all that fancy stuff.\r\n\r\n### You found a bug or you know a good physics tutorial ?\r\n\r\nYes, please contact me, contribute to this project and help to improve it. \r\n\r\n### What is needed to compile and run the code ?\r\n\r\n1. clone this repository\r\n2. download [uvectormath.pas](https://github.com/PascalCorpsman/Examples/blob/master/data_control/uvectormath.pas)\r\n\r\nNow you have everything to compile the engine. In order to be able to compile the examples you also need to be able to use OpenGL:\r\n\r\n1. install LazOpenGLControl into the Lazarus IDE\r\n2. download [dglOpenGL.pas](https://github.com/SaschaWillems/dglOpenGL/blob/master/dglOpenGL.pas)\r\n\r\nIf you also want to compile the editor you additionally need to download:\r\n\r\n1. download [uquaternion.pas](https://github.com/PascalCorpsman/Examples/blob/master/data_control/uquaternion.pas)\r\n2. download [uopengl_camera.pas](https://github.com/PascalCorpsman/Examples/blob/master/OpenGL/uopengl_camera.pas)\r\n\r\n\r\n### Progress\r\n- 2025.05.04: created repository, readme.md and license.md\r\n- 2025.05.04: Implement basic Object structure, add plane and box, detect collisions between plane and box\r\n- 2025.05.10: SAT Algorithm detects collision between convex hulls (no valid reaction yet)\r\n- 2025.05.15: start with editor\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalcorpsman%2Fcorp3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascalcorpsman%2Fcorp3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalcorpsman%2Fcorp3d/lists"}