PDA

View Full Version : Free XNA physics engine



toody
21-03-2009, 02:06 PM
Hey, I'm new here. I actually signed up here to give away physics engine for XNA that I wrote a while ago and then got bored of, but its surprisingly hard to post on these forums, and I cant create a topic for it. Given the fact that I'll probably never rack up the required ten posts here, I'll just link it here.

Its called Icarus (ironic), I wrote it back in feb 2008, its a 3d rigid-body engine that uses convexity-based collision detection (GJK/EPA and MPR), a pretty vanilla sequential impulse solver, baumgarte stabilisation, and HGRID culling. It doesnt (shouldnt?) create any CLR garbage at all. Please note that while the GJK implementation is fine (continuous GJK collision is supported too - no CSO extrusion, just brute force), the EPA is as buggy as hell, and I've never fixed it because I think its a completely dickwad algorithm, and I dont care enough. MPR on the other hand is pure genius ^_^

EDIT: Left-click in the physics demo to shoot stuff :D

Anyhow, after about a month of building this thing, I got kinda bored and havent worked on it till about a week ago, when I opened it up, ported it to GS3.0, and spent half an hour adding a very-barely-functional kinematic control system to it. Then I got bored again, and since I figure I'll probably never work on the thing again that I'd give it away somewhere :).

http://www.ralphmorton.net/Icarus_END.zip

Just open the .sln, and hit f5. If you look in the IcarusDemo project (included under the .sln), theres a brute-force test there as well that you can run.

If anyone is interested (post here if you are or drop me a mail), I can also donate an XNA game engine complete with codegen-based material system, culling, game entity system, skinnable GUI system (widget, button, textbox, checkbox, etc), content pipelines for all of the above, and a bunch of other crap. I will see if I can release a sample scene with it, but I'll have to check with the guys at unigine.com, since I ripped it out of their sanctuary demo :D (I work with Unigine at my day job). I think I might have an interactive HLSL shader builder/editor floating around too, which I can try dig up and include if people want such a thing. And the final thing on offer today, is streaming BVH animation, which is really only useful if anyone has a motion capture suit or two lying around ;)

Hope this junk is useful to someone, I dont know why I build it sometimes, since I can never be bothered to actually build anything from it :D

EDIT2: I cant reply to this thread, think my postcount isnt high enough or something :D

Anywayyyyy, I packed up the source to an old XNA 2.0 game engine that I wrote in case anyone finds it useful. Features:

Command System - mostly used for console commands
Material System - codegen-based. it basically generates shader-binding functions for each material in the system as a DynamicMethod using an ILGenerator, which increases performance quite a bit (or did in XNA 2.0) versus setting shader parms manually.
Physics - My first ever attempt at writing a physics engine (based on some book or other. cant for the life of me remember why i tried to port this into this project but there you have it. its a mess, and i never bothered to integrate Icarus so i wouldnt bother with it tbh, its not useful!)
Extensible render system - very experimental. it kinda works, i designed it the way its designed because i was sick to death of writing renderqueue-type classes :D.
Scene Manager - havent looked at it since i reopened this project 5 mins ago; i guess it does what scenemanagers generallly do.
BVH - bounding volume hierarchy
Skinnable GUI System - again, what it says.
Game Entity System - of some kind, cant remember how i wrote this either. probably using some kind of composition.

Probably some other stuff as well, its been a long time since i looked at this (i wrote it in 1.0, ported to 2.0 beta, then to 2.0 final and never looked at it again). it was a good learning experience for me building this (i kinda used it as a sandbox for all the weird design ideas i had kicking around in my head) and i hope someone finds it useful :)

Err, i also have the content pipelines (EntityDefPipeline, GUIPipeline, MaterialPipeline, MeshPipeline, ModelPipeline) is anyone decides they want them (just post here if you do)

EDIT3: Link! www.ralphmorton.net/Ion_SourceOnly.zip

dislekcia
21-03-2009, 02:26 PM
Sweet!

I'll give this a download, I know a lot of members are currently working in XNA and having a ready-made physics system will be a big help. Thanks!

What's your day job, btw?

Fengol
22-03-2009, 08:29 AM
Downloaded and played with. Looks simple enough to understand :) I'm going to build my own project using it and see what I can come with!