Times, trials, and turbulence.
Drowning in physics.
Well, sort of.
Like I’ve been raving about for the past few entries, I’ve been focusing on the physics engine that Gloom will be powered by. The original plan was to have it fully dynamic and fancy-pants-èsque, which I regret having had to decide to water down. I’m quite confident that, given enough time, I could complete this goal. However, I’m really tired of working on it, so a simplification is in order.
By fully dynamic, all objects would react to eachother in terms of linear and angular effects (velocity, acceleration, forces and torques) within a polygonal environment. What I had was somewhat close, but my limited knowledge and experience in physics programming left it still a little buggy and dysfunctional — mostly in collision response. I’ve decided to aim a little lower by creating a rift between two types of objects: static and dynamic.
Static objects, as the name implies, are immobile. They do not react to forces or torques, and so can be thought of as in ‘suspended animation’. Although static, the player can still fully interact with them in terms of non-physics interactions (opening a door, activating a switch, etc.. The reason for this is to prevent the more complicated case of dynamic objects colliding with other dynamic objects. Calculating this response is much more complicated, so I’m averting it by only allowing dynamic objects to collide with static objects, and vice versa.
Dynamic objects are objects in motion. These bounce off of the ground, ricochet of walls, and land on top of innocent static ammunition crates. Once a dynamic object reaches full rest (no linear/angular velocity) it becomes a static object. Special objects (like the Player) are always dynamic, even when stopped. (This system makes it fiendishly easier to sort out collision detection, too. :))
Limitations? Some. Certainly the world won’t be as flexible and dynamic as I originally hoped, but as I play more Shadowrun and read more Neuromancer, I’m leaning towards less hardcore action (a la Deus Ex) and more strategy/storyline/tactic (a la Shadowrun (and, strangely, Resident Evil — only a bit though ;))). The physics engine will still be able to let the user do plenty of cool things. Up to and including throwing potted plants at people. It’s a must.
There is also the idea of ‘Z Physics’, such as the screenshot below. This will allow (albeit basic) physics of objects stacking upon objects, and an illusion of height for objects that require it (eg. grenades, thrown rocks, shrapnel, etc).