In the last article about the DigitalRune Game UI we examined how the size and position of a GUI control is determined. Yet we have not discussed where and how the controls are drawn to the screen. This the topic of this article. – This will be another rather dry article, but we are trying to get a lot of information and knowledge across for those who want to extend or learn from our DigitalRune Game UI library. So let’s jump right in…
Here is another in-depth article about the DigitalRune Game UI. This article discusses the layout process of GUI controls.
So you need a custom control in your XNA game? A new control that is not yet supported in the DigitalRune Game UI? - No problem. There are many ways to extend the DigitalRune Game UI library - as we will discuss in this and upcoming blog posts. We will start by describing a few core concepts that you need to understand before you can take full advantage of the DigitalRune Game UI library.
In this first post we will discuss the concept of UI control properties and events.
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, …
Skeletal animation is the most common way to animate a 3D character: Transformations are applied to a set of bones (skeleton), which is then used to deform the mesh (skin) of the character. When using key frame animations the bone transforms need to be stored at certain key times. Depending on the complexity of the character and the length of the animation, the required amount of data can become quite large. Let’s see what we can do to reduce the amount of data.
Here is a code snippet that draws the bones of a 3D character skeleton for debugging (similar to the original SkeletonHelper.DrawBones method). The result looks like this:
(Click image to enlarge.)
Here is the code:
Manually creating good ragdolls in code can be tough. This blog post takes you on a hands-on ragdoll creation journey and provides several tips.
The DigitalRune Animation library supports ragdolls. DigitalRune Animation has a lot of helpful methods for character animation and ragdoll creation, but it does not yet have a method that visualizes ragdoll constraints. Choosing good joint limits and correct joint orientations can be really difficult without a visualization. – But do not fear, constraint visualization is here!
The following .zip archive contains a “RagdollHelper” class that draws constraints for a ragdoll. It also contains an updated “DudeRagdollCreator.cs”.
In DigitalRune Animation, motion retargeting (or more precise: animation retargeting) is the process of transferring the animations of one character to another character with a different skeleton topology.
In the video below, the walk animation of the Dude model (left) is applied to the PlayerMarine model (right).
At the first look the models seem similar, but a look at skeletal structure reveals a number of differences: …
This time we take a look at the TwoJointIKSolver class of DigitalRune Animation. This IK solver can be used to control an arm or a leg. In the following video the IK solver is used for foot placement:
A collection of the most useful blog articles can be found here:
(on Documentation page)
DigitalRune is a trademark of Garstenauer Information Technology OG.
Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg