A seed was planted when SirCmpwn noted that he was writing a physics engine for his new game, and i insticntivly started working on my own.
Well collision was a bitch, and i went through many rewrites and many RAM clears before I even got a version that didnt crash every five seconds. The trick was to make an engine that supported an undefined amount of polygons, but enough blabbering lets get to the specs:
Supported:Rigid Body Physics Collisions
Friction between Objects and on Walls
NO Terminal velocity cap, objects can move as fast as they need to
Edge Sliding*
External Force Application
Planned:Different sized objects
Objects with different masses
Built in subs for accessing different objects
And here are 3 screenshots i made to demonstrate my engine. Note that the engine itself only handles the collision solver, anything extra like springs or buoyancy is handled by the client program. Since the engine supports full external force application, you can attach boxes with strings, submerge them, remove gravity, or give them magnetic properties and the collisions solver will compensate.
Screenie 1: Just a basic Demo with the plain engine. In the beginning you can see an example of edge sliding, where boxes close to falling off with slide a bit to the right or left. Its mostly to make box stacking more realistic because without it, boxes would stay still even if it was only partly on top of another box. I am then applying gravity with the arrow keys to make them fly around the screen.
Screenie 2: Now demonstrating the dynamic force application. The code for the spring is not inside the Zedd engine, but the solver still can take in all the resulting forces of the spring and simulate the collisions accurately. I am applying a force to one of the boxes with the arrow keys.
Screenie 3: Now demonstrating more of the dynamic global effects you can achieve with Zedd. I wrote a small bit of client code to handle buoyancy and let the boxes go into this tub of water. Zedd handles the rest! I am moving around one of the boxes and trying to stack them on top of eachother to show how well Zedd redistributes forces and transfers momentum.
RELEASE: I am not releasing the engine just yet. There are still some bugs to hammer out, as well as implementing some screen partitioning to improve speed, because as of now, it runs a bit slow on the 6Mhz processors, and i think i can get some more speed. I also need to implement a few more features, and write the handy subs to work with objects