It also took me all morning to figure out the best way to run the step intervals. Timing is so ridiculously imprecise with both Environment.TickCount and DateTime.Now.Ticks. I honestly wouldn't use TickCount at all, and wouldn't use Ticks for anything smaller than seconds. The best way in .NET is to use Stopwatch, which does the best job possible on any hardware. It enabled me to time the game loop and determine just the right times to fire the step intervals, (and also the ODE calls). I have an enum set up for 30hz and 60hz; 30 will be the default, but the user can actually set it to any number of milliseconds they need.
My next goal is to get an example running with ODE in the engine. I want to stress importance of two main things:
- The physics engine is not necessary in Awe+. Unless the user needs it, it will not be invoked. However, if it is needed, it shouldn't need tons of extra initialization lines, both for ODE itself and for individual physics objects. Still shooting for one-liners here.
- ODE allows users to turn off objects to keep them from running physics. By default, I would like to disable objects out of a certain range of view of the window, so large scenes won't have speed inhibited by invisible entities.
Maybe I'm worrying too much.