And to prove myself right

There was a discussion on this during the AI roundtables at GDC about the Assasins creed not using IK for pushing characters. Well, here’s the video to prove it DOES use IK. Clearly the arms are IK’d towards certain points on the character to be pushed. Interestingly the people touched then play a reactive “move backwards” animation which is where you find the oscillation going on here I think. Anyway, score +1!

YouTube Preview Image

Enjoy.

Colonisation work in progress

So, we promised that we would release the colonisation prototype from the global game jam (and AI game marmalade). Well, we’re doing just that. But before you get to having a look, we should discuss what you’re looking at.

Right now, this is a really rough prototype. It is also incomplete. The main issue is that colonies simply expand with no consequence for that expansion. The initial plan was to have four different types of AI entities (well, 5 if you count colonies), these were foragers for gathering resource, attackers (pretty obvious what they do), defenders (same) and finally pioneers. Pioneers are the expansion mechanism for colonies. So the plan was to haveĀ  each colony contain resources. These resources would then be “spent” on the various population types. During development it seemed fairly obvious what pioneers did, in that you spawn them and they go out and try and create a new colony of their own. If they cannot start a colony (perhaps it is too close to another one) they simply join the colony that is closest to them, thus adding back to that colonies resource pool. At the current stage of development of the prototype, we have a bit of an issue with controlling colony expansion. Colonies simply increase their resources over time, this needs to be scaled by the number of foragers in the population. The other issue is that when colonies come into contact with one another, currently they simply overlap, whereas the design really calls for some aspect of competition here. The plan was to inititally spawn attackers and defenders and to have a mass skirmish, but that is a bit overkill. What we really need to do is to simply figure out the result of the competition between colonies, either a merger or a conflict.

Conflict should be decided on the balance of attackers to defenders. The winner of any conflict should take on the resources of the loser and the loser should disappear. Currently none of this happens as we’ve not quite figured out unity’s method of having colonies trigger each other when they touch. In all, as our first project using unity to prototype and considering we knew nothing about unity, C# or javascript (the languages used by unity to script the prototype) it went pretty well. Certainly it doesn’t achieve much yet, but we certainly made progress and have a clearer understanding of unity usage so things should speed up development wise when we next get time to work on this.

So right now the prototype is pretty dull, with just a few things you can alter.

1) You can change the rate at which population increases, 1 second delay is faster, 10 second is slower.

2) You can set a maximum population for pioneers. This controls wether pioneers can spawn (its safer to keep this number low).

3) You can set the maximum number of colonies. This helps make sure that the simulation doesnt completely collapse under the CPU load.

To be clear, if you set these sliders too high (for max pop/col counts) you WILL kill your CPU. It generally tends to be gradual, but just take care when using the webplayer version.

Controls in the prototype are WASD and right mouse button for looking around (we plan on using left mouse to select colonies later).

So, just so you can see where we’re at. Here are the different versions:

This is the standalone executable version zipped up.

This is the webplayer page

This is the complete source project for use with Unity 2.6 so you can see what the prototype is doing.

Please take care when running these. They are very rough and ready.

Normally we’d end with “have fun”, but it doesn’t really count with the current prototype. BTW: No idea why these are now called population instead of colonisation. Temporary schizm.

Colonization p1

Ok, so colonies are setup. They spawn pioneers and you can control some options from the GUI (took a while and had to switch from C# to Javascript, neither of which we’ve used before).

Right now the pioneers just set off in random directions. They travel for a set amount of time and at a set speed. Then when they time out, they attempt to place a new colony. If the colony is too near another colony, they simply dont place the new one.

Next task is to add the colony sizing (colonies grow as resources allow) and the integration of pioneers such that if a pioneer cannot place a colony because of its proximity to a new one, the pioneer simply integrates back into the existing colony, adding to its population. Once we get that up and running and fix up a few UI issues so that there’s a maximum population and colony cap, we’ll put up a webplayer version. Never tried that before either

Fun!

Orange spread related goodness

So last time we talked about doing some social simulation. As ever time is tight, so we put off actually doing the work until this weekend.

We’re taking part in both the Global Game Jam and the Global Game Marmelade: http://aigamedev.com/open/upcoming/2009-marmalade/

As a fun little learning experience, we’ll be using Unity3D for this little test. Plus we’ll try and release some interim builds here on the blog. You’ll have to install unity web-plugin if you want to try them out, but I think the faster access to a demo build should be worth it.

So anyway, on with the show! First up is some kind of colony structure and the initial “pioneer” implementation. Colonies are representations of groups of people, pioneers represent the types of people who move away from the colony to start their own. Sounds like some kind of ant farm initially!

More soon.

Population simulation

Right now there are a lot of reasons why we should be rethinking our approach to society. With the meltdown of international finance has come a need for re-evaluation of our social structures. Not least here in the UK where we are in a very poor position.

It started a chain reaction of thought, that led from the outer edges of the nations politics, to the very core of socialism vs capitalism and then deeper still.

Ultimately it led to this question:

Does land ownership lead to fundamental inequalities?

In order to explore that question, we’re putting together a prototype game concept that explores the absolute basics of population. It starts off with a model of a single civilised dwelling space and then models the spread of population from there. Here are the rules so far:

  • Each game update, the resources of a particular population center rises by a “productivity rate”, this is determined either randomly (for now) or by sampling the landscape (later).
  • Each population center, at a given (semi random) rate, spawns a new member of the population.
  • When enough new members spawn, an agent is sent out from the population center, these can either be foragers, defenders, attackers, or pioneers
  • Foragers collect resource for the population center
  • Defenders defend against enemy attack
  • Attackers seek to destroy any nearby population centers (that have not been directly spawned by them)
  • Pioneers set out into unpopulated areas and try to found a new civilisation.
  • The amount of population in a center will be governed by the amount of resource available in inverse proportion.

These simple rules should form at least the basis of the starting phase of population. There are other small rules involved about how far pioneers travel and how big populations can grow, but roughly the idea is that a certain amount of population is sustainable, but the concept of “growth” which is used throughout capitalist economies suggests that populations inevitably rise. This should in theory lead to imbalances in the population and more importantly the rise in increased population density in a concentrated mass of population.

It really is just a simple little prototype experiment. No particular goal other than to see what happens. If it turns out anywhere near interesting we’ll try and make it available somehow (maybe do a unity web-player version).

Anyway, need to go and work on population growth now. Video soon!