• entries
    743
  • comments
    1924
  • views
    580025

(Yet Another) New Project

Sign in to follow this  
Aardvajk

807 views

I've decided to scrap the first person game and start again. Just don't seem to find writing a first person game as much fun as a third person platformer for some reason. Something to do with getting not much graphical pay-off from pouring all the effort into the player character I think.

shade.jpg

Trying something a bit different this time. I've integrated the excellent Bullet Physics API into my game this time, and the challenge is going to be attempting to implement my kinematic character controller using the Bullet API.

The KCC that ships with Bullet is still not good enough for what I need, but I was thinking ahead to things I'll want to put into my platformer and some of them (particularly rag-dolls for dead things) would take me years to implement myself but should be a breeze with Bullet. So I got to thinking, presumably there must be a way to use the Bullet API to make the equivalent queries that I was making with my own physics - basically intersection tests and ray casts, so, in theory at least, I should be able to have the best of both worlds here - Bullet to handle all the purely physical interactions and a custom-written character controller and so on when the physics simulation is not what is wanted.

Probably sounds a lot simpler than it will be in practice, but I've been toying with this idea in my head for a long time now so thought a nice clean slate project was a good way to put this to the test.

So far I have a Scene set up, with SceneNodes that can represent renderables, geared up to batch things that have similar graphics settings, a comprehensive GraphicsResource system that allows for graphics resources to be both global with URL's to access them, or locally owned via a ResourceHandle class, a bare-bones Physics class that manages instances of Body, a class that bridges between my code and the btRigidBody and an abstract Mode system that manages the various states of play (GameMode, MenuMode etc as required).

The current system can load an environment file from my very basic Sandbox level editor (basically polyhedrons placed and coloured in an interactive Qt application) and convert these to both a graphical mesh and to Bullet btConvexHullShapes.

You can currently move a capsule representing the player around in all three dimensions (no collisions at all) or click the mouse to create test boxes that are handed over to Bullet to simulate so we're finally at the critical point of starting to figure out how to do the character controller interactions using the Bullet API. Thankfully the source for Bullet's own KCC is available which should give me a good starting point. Need to figure out how to do ray casting (looks easy enough) and swept intersection tests on a shape to get a minimum separating vector. I think this latter is quite do-able as Bullet seems to support having stand-alone shapes that you can use to query the environment as far as I can tell.

So the interesting work begins here. All has been preparation up to this point and I'll be interested to see how we progress from here. Thanks for dropping by. Hopefully my next post will be about succeeding at this smile.png

[Loving the WOA Journals, but man does my entry move down the first page quick at the moment :) Going to have to make sure I update a bit more often until this chaos is over]
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now