Old physics code

some time ago, I wanted to join the team and on DF’s request, PM’d him some debris physics code for crates. I told him I’d port it to GML but I forgot about it and now I don’t have enough time. I thought I should probably give the original code to the team just in case they can do anything with it (i hope this is the right forum to post it in)

There’s quite a lot of code for just debris physics, but this is ported from my own game, where this code is used for physics for pretty much everything. This code would work very well for the morphball for example.

anyway, here’s the demo in flash: http://psychonova.110mb.com/mp2d.html
(click to make debris fly out)
The flash source file: http://psychonova.110mb.com/mp2d.fla
Text file containing script in case you don’t have flash: http://psychonova.110mb.com/debris.txt

looking back at it, the code is pretty messy and a lot of it is directly ported from other sources. But hey, it works.


holy crap thats a lot of code. I have trouble writing more than 1000 lines, thats like 10,000 easy.

oh and nice phys engine by the way