Quest editor in Unity3D

For my first Unity3D custom editor I chose to make a quest editor, most simplified as possible for my needs but as much customizable as possible to make quest creation and editing simple for non programming developers.

This is the required example of quest code for this post:

quest

It has been a while since my last blog post about Xamarin and I feel this is the time to write something more about it. Although I haven’t been working with Xamarin for some months, I will write here some questions people often asked me when I was full-time working with it:

Have you used any java library directly? How easy is it to use them?
First of all, let me say that Xamarin itself created a github account with many samples some of which have Android API wrappers for C# of popular java libraries (ex: ActionBarSherlock) which is worth checking out.

One of the requirements I had concerning the project was its feature of uploading files from the device to the server and I knew it wouldn’t be easy especially due to the Documents API introduced in Android 4.4.

Animation tool, part I

Once a wise man said a very wise sentence:

You will eventually regret any use of Euler angles.

His name is John Carmack, and today I can say that I couldn’t agree more with him, why? Let me tell you why.

The next step of my game development project is to develop an animation tool, since I’m not that good with art I always though that it would be better to create each separate part of my characters and animate them separately, instead of creating the different sprites for each animation frame they had, all was going well until I stomped on a huge rock, which was that? Transformations without matrices!

My initial idea was to develop simple tool for a simple game with certain components for the development tool, one of those components is a skeletal animation tool, which on my project is called Puppeteer. I wanted to do this in a way that I could avoid the use of matrices, instead using vector and float data for translation, scale and rotation, this was going well until the problem of the skeletal animation showed up, it’s much more difficult, if not impossible, to achieve a good skeletal animation avoiding matrices, and once the mathematical principles behind this are understood they proved to not be so difficult as they seemed, instead of carrying the values of translation, scale and rotation on 3 different properties and trying to reinvent the wheel combining them with dodgy equations it’s much better to have them stored in matrices and using the standard approaches that people who know much more than I do developed.

Let me give you a brief explanation on how the matrix transformations work in a simple skeletal animation

You see those pointy objects with a short orange side and a long blue one? Those represent the bones of the character.

Each one of those bones can contain one parent and can contain multiple children, the bottom bone for example is the root bone, since it contains no parent, and is the parent element of two other bones, that will be the parent of other bones and so on.

Each bone contains a matrix to represent it’s transformation in the world, and the reason for the relationship between them is that the parent transformation influences the children transformation, every time the parent rotates, scales or moves that will be reflected on the children.

Here’s an example of what happens when a bone is translated and rotated

bones2

As you can see al the children were moved, but still have their origin in the previous bone end.

To have this effect we require a simple matrix multiplication, so let’s assume we want to calculate the matrix transformation applied to a second bone on the hierarchy, the calculation would be:

TransformationMatrix = ChildBoneLocalTransformation * RootBoneTransformation

The “ChildBoneLocalTransformation” would be a simple matrix formed using translation, scale and rotation, while the “RootBoneTransformation” would be the same matrix, with the roots data, and an extra value added to the translation component of the matrix, given by the bone length, without this detail all the bones would overlap each others.

On my next post I plan to show a video of the animation tool in motion and the steps to attach images to the bones showing how a character animation can be created. Unfortunately I didn’t get the time to prepare a more presentable demo of the editor, and it’s better to divide these posts into smaller parts.

One of the new challenges I faced at my new job was understanding and adapting to DDD. It can be a bit confusing at first, but as soon as I made sense of it, I couldn’t not recommend it.

In this post i want to explain the basic concept of DDD.

What is DDD?

DDD consists in one domain project that doesn’t depend on anything, while the other projects depend on it. Usually, the domain project contains interfaces, domain entities and utility classes that don’t depend on third parties. Confusing? I’ll explain better in the example below.

Tags , , ,

It has been one month since my previous post, since then some major design changes have been made, but I won’t go into details about what changed, but about what has been added.

First of all, like I stated on my previous post I’m using WPF to build my editor’s UI and using MVVM pattern to bind data between the UI and data models, it’s amazing how both WPF and the MVVM pattern fuse together really well to create a UI without much complexity.

StoryTime project overview

Game development is something that I simply love.

Is it the complexity of developing a framework to organize the project and its workflow?

Is it the difficulty of understanding the different components that are part of the whole application and how they interact with each other?

Is it the challenge of working with people with different ideas and skillsets?

The answer is all of them and much more.