• Create Account

avision

Member Since 27 May 2013
Offline Last Active Dec 14 2014 02:06 AM

In Topic: Synchronising animations within a blend tree

28 November 2014 - 05:54 AM

This is actually the issue, you can't really do that. In order to smoothly blend, you need to know both speeds. You can't blend one side from 0 - 1 because that would go from a stopped animation to the full speed.

Ok i think i understand how you handle it.

In my solution it worked like this:

animation.play( normalized length of the clip from 0 - 1 )

And i knew the velocity of each motion and they were aligned so if one motion had the left-foot-hit-ground on 0.5 the other clips would also have left-foot-hit-ground on 0.5.

Now if i have a walk clip with 1m/s (if played from 0-1) and i needed 3m/s i would simply speed up the replay of this clip (*3), then if i say a run cycle fits better cause it has a original speed of 1.5m/s i would run this clip with *2 of the normal speed and crossblend the weights of both clips (the new clip with 0 at the beginning, _not_ the speed but the weight).

You are right thought that then your animations are not aligned any more. The best solution i saw for this problem was with Rune Johansens Locomotion solution for unity. Basically each leg is analyzed on it`s own for each walk-cycle. And the main states are stored (the positions in the cycle also normalized) for each leg, foot-hit, rest-position, foot-lift.. Then if your character has to walk 45° to the left a strafe-left and walk-forward motion are mixed and aligned based on the previous analyzed data.

You probably want to look into the source code and the thesis of this:

In Topic: Neural net for game state prediction

27 November 2014 - 03:28 PM

I want to add that you will have to do 2. also if you really would want to set up your training data..

What is the best way to do this in terms of training data?

Well, tell it when it is wrong. When is this the case?

In Topic: The "action" systems that 2D game frameworks all now have...

27 November 2014 - 03:10 PM

Things get mixed here i think. Actions like in cocos2d are not related to tasks like Update or Render or the like. Actions are just used to ease the change of parameters of an object over time and to chain such. Actions actually have their own Update() method wich is invoked during the usual/root Update(). So it is not a rivaling concept.

In Topic: Synchronising animations within a blend tree

27 November 2014 - 02:52 PM

Wow as you can`t see the solution i don`t see the problem ;)

Since your animations are aligned and you can play them at any speed you can play any blend-node at any speed. Only thing you have to know is the speed each walkcycle has, meaning, you have to know the distance the character would actually travel with each walkcycle. So if you blend a walk-cycle with a "speed" of 1m/s and a run cycle with 2m/s you know how far the character would travel if you mix them 0.5/0.5 so you know ...

I think I might be getting into territory where I'm trying to cater for use cases I'll probably not need.

That might also be true. I wrote one blend-tree implementation and in the end i only needed to blend between the walk, idle and run cycles + foot alignment. The rest where overrides like for the upper body wich didn`t complicate things.

In Topic: 2D Terrain Random Generation

12 October 2014 - 01:34 AM

I want to add some information to Coremaqs post,

and we do need more information. If your map changes every time why do the cities have to be in the same place? I mean the environment is not the same - does this rule then make sense? Wouldn`t it be enough to place the needed cities also with rules ( they have to be x apart from another, favorite places are at rivers or plateaus .. ) ? Just a thought.

Since you will have rules (like we always have x cities, n mines per city, mines only on hills .. ) you could look into contraint satisfaction/propagation. Here is a great paper/tutorial on the subject:

http://www.cs.northwestern.edu/~ian/GDCConstraintsHowTo.pdf

It is basically a set of algorithms helping you to automatically solve such problems involving rules. They were bult with respect to games.

I also want to post a paid resource (a great one) because in one interview there was a pretty interessting talk about procedural map generation: