Roam and Roll
Today was spent adding the proper player controls to the physics sand-box prototype I am working on, which means proper strafe, acceleration, smoothing, speed for walk and run, pretty much everything except jump. I threw out the terrain ground height check, and replaced it with the final Bullet Physics character controller, minus the mouse look camera rotation stuff which was kindly provided from my early 'decent demo' prototype.
The result was pretty good, and I was able to run around as before, but critically not be able to run up the steep hills as the step value was sufficient to block my player character doing that (as intended). I then dropped lots of physics objects which I have also enabled through my new DBP bullet physics command set and all was good.
Two things plagued me during these tasks. The first was that the performance was not 'great' once I added the 16 million triangles needed to accurately simulate the terrain floor for the physics system, and the general speed of moving physical objects did not seem right.
It was though I existed in slow motion and that to get any decent speed I had to be travelling at quite a high velocity to get moving. The basic problem is that Bullet expects the ratio of 1 unit = 1 meter, whereas the FPSC universe up to this point has been 1 unit = 1 centimeter give or take. Given this, my objects are considerably larger than Bullet expects them to be, and create these slow-motion artifacts which spoil the fun. I can increase gravity, and decrease mass but it's not going to work flawlessly if I start guessing.
What I need is some real special math and lots of new Bullet settings to create a world that makes my 1 unit = 1 centimeter universe perform as though the real world has hold of my physics objects. I suspect this means some deep Google search research come Wednesday. Sure, quick hacks are available and I can move on to some degree, but the physics will be with us a LONG time and I want it to be mathematically sound before moving too far.
My blog readership has dropped away somewhat since Rick's decision to post anything other than near-finished visuals, and I am a bit miffed about that. Nothing egotistical, just that you guys and gals will vote with your visits, and it tells me you tune in to more Reloaded news when there are visuals to look at. To that end, I have posted a sneaky one below and added some disclaimers all over it so there can be NO confusion that this is work in progress art and should not be considered finished material we are going to send to the printers on Monday.
As you can see, looking past the disclaimers, I am using a sandbox test prototype with the terrain visuals stripped out so I can focus on the physics shapes and simulation. You are looking at the aftermath of a stack of crates that fell over because they are placed on a slightly sloping terrain, and then a sphere barreled down from a high hill and smashed into them.
I have deliberately ignored my emails today so I could focus on getting physics to where I wanted them to be. As good as this excuse is, the real reason is that playing with physics is SO absorbing, I spent a good deal of my hours re-running the prototype and following barrels down steep hills and watching them make subtle course corrections each time they hit a bump.
I would not be surprised if many users will be making obstacle courses rather than games with Reloaded when we release this puppy :) I have a few more days on physics, and then straight into A.I, so Wednesday will be about getting the 'enemy character' physics object in place and doing all the things that entity needs to do (i.e. push crates out the way, walk on the floor, e.t.c). I will also add jump so I can walk around on those screen shot crates and see what happens. Will I fall through them, will they fly away, will I jiggle up and down, tune in tomorrow!