Wednesday, July 04, 2007
More WPF
So I've been playing with WPF for about a month now. I'm to the point where I can usually make things do what I want in a reasonable amount of time. WPF really is incredibly impressive with its flexibility. About the only shortcoming of the way it works is to say that it is a bit.. quirky. I'm just going to go ahead and blame that on the way XML works.
So for the first day or so of my vacation I spent doing job stuff. Yeah. I'm dumb. I actually would of continued doing it, but I figured that I be pretty pissed off if next week I went into the office and was told that my PTO would not be removed even if I did work the whole time. So I skirted the issue and just worked on my own stuff. omg.
I'm doing a 2D biped balancing sim and I needed a physics engine. Instead of digging up one of my old ones or start another one from scratch I decided to just get Erin Catto's Box2D up on .NET. Looking around there is a XNA version, but I decided against that. I guess I could of used the .NET version of Bullet, but I didn't. Oh well.
I initially just started porting Box2D to C#. I got as far as switching over the syntax and realized.. What the hell am I doing? I can just recompile it under C++/CLI. 20 minutes later I had a box falling onto another box. Woo. At some point I'll port it over to C# to just be more pure, but this let me get it up pretty fast.
One crazy thing is that while getting this up I was actually using freak'n Blend to place my bodies and joints. I can literally drag them out and position them on my workspace, launch it and boom.. They are physical if they are my UserControls! I even get the fancy WPF anti-aliasing.
So for the first day or so of my vacation I spent doing job stuff. Yeah. I'm dumb. I actually would of continued doing it, but I figured that I be pretty pissed off if next week I went into the office and was told that my PTO would not be removed even if I did work the whole time. So I skirted the issue and just worked on my own stuff. omg.
I'm doing a 2D biped balancing sim and I needed a physics engine. Instead of digging up one of my old ones or start another one from scratch I decided to just get Erin Catto's Box2D up on .NET. Looking around there is a XNA version, but I decided against that. I guess I could of used the .NET version of Bullet, but I didn't. Oh well.
I initially just started porting Box2D to C#. I got as far as switching over the syntax and realized.. What the hell am I doing? I can just recompile it under C++/CLI. 20 minutes later I had a box falling onto another box. Woo. At some point I'll port it over to C# to just be more pure, but this let me get it up pretty fast.
One crazy thing is that while getting this up I was actually using freak'n Blend to place my bodies and joints. I can literally drag them out and position them on my workspace, launch it and boom.. They are physical if they are my UserControls! I even get the fancy WPF anti-aliasing.
Comments:
<< Home
I remembered why I did not want to use those other physics options..
XNA Box2D version had a bunch of unsafe code in there.
.NET Bullet is a full on 3D engine and to get it to go 2D I'd need to do a bunch of ugly tricks.
Post a Comment
XNA Box2D version had a bunch of unsafe code in there.
.NET Bullet is a full on 3D engine and to get it to go 2D I'd need to do a bunch of ugly tricks.
<< Home
