Thứ Tư, 7 tháng 8, 2013

Wednesday Water Physics

Lots Done Today

My plan for today was to add jumping, enemy capsule entity, speed up the physics terrain preparation, speed up the general engine and if time, add water buoyancy.  The great news is that I have added all of the above.

Figure 1. A few pallets dropped along the shore. Some floated away!

In fact, most of the list was done relatively quickly thanks to a great Bullet SDK, but the water buoyancy was something else. It transpires there is no native support for this, and so I had to write it myself and what fun it was too.

True Buoyancy

This is not the basic 'if it's below the water line bring it up' physics, but the 'float my pallet across the river so I can jump on it' style. For this, I needed to create a small system which detected the key 'flotation points' for an object, then apply various upward impulses to the object when in the water so it would rotate and respond correctly, just like a real object would.

The time consuming part was tweaking the various velocity, dampening and water line curves to make the whole thing seam natural, and also to ensure all my objects bob evenly between above and below the water line (not easy). Still, the hard stuff is done now and I am running out of physics components to prototype now.

Ragdoll Physics

I am sure there will be a big demand for ragdoll falling, even though I don't regard it as an 'essential feature'. We have some really excellent death/fall animations now, and no ragdoll can beat them in my opinion.  I will study the remainder of my schedule for this week and make a decision whether to prototype the ragdoll into the character (which could take days) or wrap up the physics prototype with a full first person player control system including weapon, sounds, firing, health, falling, e.t.c.  This also will be the precursor to creating what will become the main 'game loop' module, which controls pretty much the entire in-game experience and the first of the final 'mega' modules that when connected with other 'mega' modules will become the final product.

I will leave my brain and your comments section open for inspiration whether it makes sense to add ragdoll now, or get more of the main game elements connected and come back to ragdoll when the time presents itself.

AI News

Some brief news from Paul and AI work, in that we have a small 'theoretical' victory on the 'hide behind a corner' behavior of the new AI entity system. This single ability will really test you as a player in a Reloaded game, as now the enemy can sneak about and peek at you from behind walls and door frames, neither of which you can shoot through!  Your sniping and blatant shooting days are over if this feature is as good as I imagine it to be.  More news on this and other AI goodies next week!

Signing Off

Probably coded a little too long today, so waking up Thursday might be a challenge but one can but try.  Remaining tasks, not including ragdoll, would be to add static and dynamic entity tests, static geometry segment geometry and the 'very small object' test to ensure our grenades, mines and small keys don't fall through the floor as they affectionately did with FPSC Classic :)

Không có nhận xét nào:

Đăng nhận xét