Animation System - After getting animation working, I needed to implement a system for displaying animations. That's now in place. The animation system simply uses an event system to pass messages for animation changes. The animations have a few parameters defined, like delayed start amount, maximum play time and whether they should loop or not. It also includes an idle animation pool for each model. When defining animations in the data file I can add "IDLE_ANIMATION" to the name and it will be added to the idle pool. Additionally I define a weighted chance value for that animation. Then, when a entity is idle, it will choose randomly from the idle pool, the animations with a higher weighted chance will be chosen more often. These animation pools can be used for other animation types too! So any animation can have a animation pool. This makes it possible to have multiple animations per action. This way, things don't look so robotic, allowing for subtle changes for the same action. Animation really brings the game to life. It makes the goblins walking around and performing tasks look so much better. I'll show it off in the next video. Along with a few animations (so far I have walking, mining, picking up and dropping. Plus five idle animations).
I'm developing my first game, Age of Goblins. I develop this part time, and work at a "real" (read: paying) job full time. Age of Goblins is a three dimensional goblin empire building game. Inspired by Dwarf Fortress and Minecraft. Age of Goblins gives a player control over a small band of goblins in a cube-based sandbox world. The player can instruct the goblins to add or remove different types of cubes, build various structures, make elaborate traps, and craft a multitude of items.
Monday, November 26, 2012
Thursday, November 1, 2012
These are the latest things to be checked off my to-do list:
- Model Animation - This one took a while and had me pulling my hair out. Most of this went quickly and easily. Turning each bone's translation, rotation and scale into a transform matrix for the bone's vertices took a while. I just kept running into problems. I'd just look at the mangled mess of triangles that was a goblin just a moment ago before I applied the animation. Was my order of operations wrong? It's so close now, but the rotations are backwards. It's nearly working now but the rotations are around where it was before it translated. This is all wrong, redo. Redo, redo, redo. Finally, a clean working implementation. In the end it was just a collection of small issues that had to be solved in the correct order. But that's no matter now, it's working. Now that it's out of the way, it opens up some other tasks on the to-do list:
- Creating animations: Yes, I need to get all artsy and make animations for my models.
- Animation system: Creating a system that decides which animation to apply and when. I have the framework for this already in place from implementing the model animation, I just need to flesh it out.