A few people have e-mailed and asked if—since I claim to be a developer—I actually write any code. It’s a great question, and based on most of my blog posts, you’d think I haven’t written an ounce in quite some time. Fortunately for both you and especially me, that assessment would be wrong. I spend quite a bit of time writing C#, my current favorite langage. Some of it is for illustration or example as I mentor other developers, some of it is to answer specific Microsoft technology questions, some of it is to demonstrate a preferred practice, method, or algorithm, and some of it is for just plain fun.
For example, I’ve done a lot of 2D graphics and game development in the past, and I’ve worked a bit with 3D algorithms, but I’ve never tried to marry the two. Since Longhorn (and with our recent announcement, Windows XP) introduces a rich 3D graphical interface, I thought it’d be a good idea to increase my understanding by creating a sample project that provides a 3D animation framework for Windows Form-based applications. Managed DirectX 9.0 seemed the perfect starting point.
So, I’ve created a pluggable animation class hierarchy, a couple of time controllers, a few motion providers, timeline and keyframe logic, view controls, a flexible camera class, and picking and selection logic (among others). I extended the sample application with a simple command window that lets me play with various animations and camera setups, and I can move throughout the world with a few mouse movements and keyboard strokes.
This is really just an exercise in learning…I don’t intend to do much with my sample application beyond that. Here are a couple of screen shots that won’t do the motion any justice at all. Imagine that you can manually control a very complex animation cycle with the TrackBar control at the top, and you can smoothly “fly” the camera through the scene. It doesn’t look like much, but it’s fun to play with and simple to extend.