Mindflock.com
Social Game Artificial Intelligence
Social Game Artificial Intelligence
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.
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.