Recently I made some improvements to the character controller in DigitalRune Physics. I became aware of some issues while reading the article “Jump To It” (Game Developer Magazine, issue 11/2008, pp. 38). It turns out that the jumping mechanic can be improved.
The KinematicCharacterController can be used to control the movement of a player character. The character controller handles moving, sliding along obstacles, walking slopes, stepping over obstacles, … and jumping. (Reminder: If you have an Indie or Standard license of DigitalRune Physics, you can download the source code of the character controllers from the Downloads page. See “Additional Downloads”.)
Jumping works fine in most cases. That is, …
We have made several improvements to our 3D character controller, which we want to discuss in this post. (Reminder: A character controller is the game module that computes the movement of a player character, including walking, jumping, climbing, etc.)
Following video shows the new character controllers in action. (The code is included in the DigitalRune Physics Bundle).
Yet another blog post about character controllers for 3D games, and this time we will talk about the actual implementation.
Here is how the character controller in our Character Controller Example works:
The character is represented as a an upright capsule that does not rotate:
There are at least two ways to implement a character controller for a 3D game: Kinematic and Dynamic Character Controllers. In this post we discuss the difference and which solution is better.
A short reminder: In this context a character controller is the piece of code that computes the movement of the player character in the game. It takes care that the user does not run through walls, can step up/down, jump etc. The character is often modeled as an upright capsule.
Related posts: 3D XNA Character Controller Example and Character Controller Requirements
In one of the last posts we introduced our Character Controller Example. In the next posts, we will discuss character controllers for 3D games in more detail, including: general requirements, kinematic vs. dynamic character controllers, implementation, character controllers in virtual reality.
This post starts the series with a discussion of requirements of 3D game character controller.
The first requirement is teleport because the character controller must be set to its initial position. A teleport sets the character to a new position. It doesn't matter where it was previously and if there are obstacles between the old and new position.
For the new DigitalRune Geometry library we have created a simple 3D character controller example (including source code).
A character controller, as understood in this context, is a game engine module that computes the movement of an avatar in a game. The input for the character controller is the desired movement (e.g. “move forward with 5 m/s speed”, or “jump”) and the output is the new corrected avatar position in the 3D game world. The character controller has to apply gravity, avoid penetration of walls and other solid objects, handle stepping up/down slopes and stairs, and more.
Important blog articles are collected in the DigitalRune Knowledge Base.
DigitalRune is a trademark of Garstenauer Information Technology OG.
Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg