Adding New Features To Demina

Jun 15, 2012 at 6:51 AM
Edited Jun 17, 2012 at 6:44 AM

Hey Jesse, I thought I'd make a separate post about new features I've been adding to my version of Demina.  If anyone else passing through happens to want to talk about interesting features which could be added to Demina, I'd love to have a discussion about it.

Also, this way new features stay separate from the discussion about the bone transformations code in the other thread.

Below is my personal list of things I've added, or am in the process of adding:


Editor stuff:

Bone Scaling (already talked about this in the last thread) in the editor.

A way to copy/paste over the first keyframe of an animation in the editor


Runtime stuff:

The ability to jump from one animation into the middle of another animation on the fly.

The ability to transition into the middle of another animation.

The ability to blend two animations together for any amount of time, creating a new animation on the fly.

The ability to change specific bone textures (at runtime).  All of the stuff below is meant to address this goal:

Inheriting a new class from AnimationPlayer, which has some new features:

Texture Profile -- What it does under the hood is unify every animation's TextureEntry references.  So, after adding Animations to an instance of this new AnimationPlayer class, you are able to look up each TextureEntry within the Texture Profile (which is a dictionary) and change the texture you use for a character's weapon, or hair, or superfluous third nipple, or whatever.  This change is then reflected in every animation belonging to the animation player.  (Yes, some data needs to get duplicated in order for this to work -- otherwise the animations which belong to each AnimationPlayer would be shared between all, and changing a texture for one AnimationPlayer object would change it for all AnimationPlayers.  

A way to add new bones onto an existing animation at runtime, maybe even an existing skeleton -- so the temporary bones would persist between different animations.  There are two ways I could implement this:

The first approach would be to create a method on the AnimationPlayer which allows users to get a transformation (position/rotation/scale), based on any bone's name.  This would be a fairly simple approach, and maintaining the new bones or graphical effects would be up to the user.  

The second method would be to actually create a list of temporary bones as a component of the AnimationPlayer, and allow people to create and add whatever textures they want to these new bones at runtime.  This method would require a little more design,  and I'm not totally sure where to go with it, but I'll probably end up trying something if I find myself wanting to do this a lot.


Anyway, that's what I've come up with so far, in the course of working on my game.  If anyone wants, I'd be happy to post my current version up as a fork.

(I know I've said it a lot before, but) Thanks again for Demina, Jesse!



Jun 18, 2012 at 3:00 PM

This is pretty cool stuff.

I have a modification that helps transitioning from the middle of one animation to the middle of another (by setting transition labels.) I haven't cleaned it up to a point where it can get checked back in.

At some point, I'd really like to tackled Demina 2, making it cross-platform on top of all these improvements.