Cor(psman)P(hysic)3D is my try to implement a 3D-Physics engine.
! Attention !
At the moment the development of this library is on hold. But there is still progress, see FPC_cyclone-physics for actual progress.
When i started coding 3D games i used Newton, 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.
Next i tried Kraft which is written in FreePascal and used in Castle Game Engine. I even tried to create first 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 :/.
So what's next, well trying to write a own Physic engine ;).
To 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 ..
- First priority is: understanding and writing 3D physics (i am "ok" in IT, but with nearly no knowlege to physics 🙈)
- Second priority is: bring the engine to a point where i can use it in balanced2
- Basic convex hull collisions using the SAT algorithm ✅
- Correct responce (Force / Torque / Rotation)
- Compound collissions (concave objects)
- Support Planes ✅ (only static, not moving, not elastic)
- Support spheres
- Support cylinders (is that possible with SAT ?)
- Support cones (is that possible with SAT ?)
- Speedup the code execution by using all kind of optimizations like:
- collision spheres (before SAT) ✅
- octree's
- further optimizations ?
- joints, springs and all that high level stuff that is not needed for balanced2
This does not mean that there will be some point in far future where i include all that fancy stuff.
Yes, please contact me, contribute to this project and help to improve it.
- clone this repository
- download uvectormath.pas
Now 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:
- install LazOpenGLControl into the Lazarus IDE
- download dglOpenGL.pas
If you also want to compile the editor you additionally need to download:
- download uquaternion.pas
- download uopengl_camera.pas
- 2025.05.04: created repository, readme.md and license.md
- 2025.05.04: Implement basic Object structure, add plane and box, detect collisions between plane and box
- 2025.05.10: SAT Algorithm detects collision between convex hulls (no valid reaction yet)
- 2025.05.15: start with editor