Mindflock.com
Social Game Artificial Intelligence
Social Game Artificial Intelligence
Sep 10th
I’ve been working some more on the squad AI this week (trying to fix a bug that left the squad firing all the time). I turned off movement for the agents and then spawned enemies constantly at them. Which struck me as a might peculiar, because I realized that basically I’d created a tower defence game!
Now of course I’m not trying to create a tower defence game, so that wasn’t the intention. But it’s quite interesting that essentially what you get when you have static agents that are capable of independant fire on enemies that have a goal they always move towards is the fundamentals of a tower defence game. Admittedly one where the “towers” can move around in squads and where the thing you’re defending can also move around and defend itself quite well. But still, it bears some thinking about from a design standpoint. Maybe all scenarios where you have static combatants vs moving threats is a tower defence game?
My design intention is far more like Bullfrog’s game Sydicate than a tower defence game. So just to assuage that fear inside myself that I’m creating something as derivative as a TD game, I’m posting a vid of good old Syndicate in all its dos-based glory.
One fun part of having watched all these syndicate video’s recently, is that I now have a bunch of design features I can incoporate into the game. Stuff like squad selection, upgrades, world map, taxes and research seem do-able and useful. But likely the best one is the notion that you can take items off enemies you kill. Which adds almost an RPG element to the game (looting corpeses of enemies killed is very much RPG fodder after all). In syndicate you can then sell those looted items to pay for upgrades. I like that idea a lot. Don’t know if I’ll steal it wholesale though, because its a lot of UI work and I loathe UI work.
Anyway, onwards and upwards, the firing bug is fixed and I can allow the agents movement again. Now work switches to one of the more thorny issue of local avoidance and the navigation loop. Right now the agents can get blocked by each other and other inhabitants of the world (including enemies if they aren’t “uncovered” as enemies). They have a path through the world, but that is a static path calculated when they know where they want to go. Static paths are fine for large scale movements, but we always need to take into account local collision avoidance if we’re going to have agents that feel reasonably alive. Think of it this way, if you were moving around a city and I asked you were you were going you would say “to the shops” or “to the cinema”. Thats the global path. If I then asked you to describe how you were moving as you walked there, you would have to describe to me how you became aware of other people in the area, how you directed your movement to avoid them etc. That is the local navigation issue.
Luckily, Mikko Mononen (the guy who wrote the navigation mesh generation the game uses) has been doing a lot of work in this area over at his blog. I’m hoping to use some of Mikko’s work and fiddle with some of it to increase the number of agents to match the requirements of the game. Will post a video of that soon.
.
Sep 8th
It’s taken some time, but the squad code is now almost completely reworked. Originally I was thinking that I would use a central squad manager for all of the squad control, but in the end I didnt like that sort of implementation. Now I have a squadmanager (arranges who is in a given squad), a squad (the actual meat of the squad implementation) and a squadmember (the individual agent within the squad).
What that means, is that I can do things like add members to multiple squads, add new members to squads on-the-fly and generally allows the squad code to be a lot more focussed.
The other side to the squad code, is shown in the video above. Squad control is an important part of the game. I’ve been looking at the “move” control first, because its one of the most important. Here you can see some work on the cursor that controls the move. Starting off in third person (press space to enter third person with time stopped) you can select squad members, assign them to squads etc. You can also select squads (1..n) and then activate the move cursor to set where the squad is going. I’m going to try out a “facing” element to the cursor soon too. In the vid you can see me switch to first person and do the same thing. The idea of first person squad control is basically taken from Brothers In Arms, which was a really interesting game design-wise for me. I felt like it offered a nice mix of first person and squad control, but lacked some of the micro you sometimes want to do and occasionally felt a bit stunted in terms of real FPS feeling. Almost like you couldnt just blaze away, which is not a bad thing necassarily but sometimes you just want to blaze and I’m damn sure I’ll allow that in Damzel (which consequences of course).
Now that movement works ok, I’ll concentrate on adding the other commands (attack, defend, investigate etc), such that I’ll have a basic version of them all done asap, because they’ll take a lot of iteration to get right.
.
Sep 1st
So I thought I’d post real quick about some of the animation work I did last week.
The animation on all of the characters in the game will come from a mix of hand-animation and motion capture. Motion capture being the kind of animation data you get when you literally take a recording of real humans doing particular motions.
There are a number of indie-affordable motion capture solutions out there now. I’ve got the optitrack one (shown in the video above) and its pretty good, but can be a pain to setup and needs a fairly big space. Luckily I can borrow one of the labs where I work so can sometimes get space to play with it. But marker based solutions (you have probably seen them, where your motion capture actor wears the blue cat-suit and the while dots) have some pretty issues unless you can spring for a very expensive setup. I’m planning to have a look at IPISoft’s video based solution, which basically takes the input of 4 video cameras that are frame synchronized and does a shape fitting algorithm on them to create a “markerless” motion capture. Still not 100% ideal, not realtime, but perhaps useful enough to be worth a try.
Of course there are plenty of places that sell motion capture. Plus a number of free resources, the largest being the Carnegie Mellon University’s motion capture database. Here’s an example of that CMU data being played back on the new box guy prototype agent.
There is still a bit of footskate on his playback, but thats more of an artifact than anything “wrong”. Easy to fix but kind of pointless right now.
So, at some point I’ll get round to showing off the animation blend-tree and how that works for character locomotion. Plus show off some nicer clips of social motions (waving, hugging, chatting etc). For now the main thing is to work out some more of the squad control interface, which is coming along slowly.
Aug 29th
This week has been a bit of a rollercoaster with regards to Damzel. One of the biggest things in the game is that the player should be able to discern the intention of characters in the game visually. This means that players need to be able to see exactly what a character is doing from a distance. This also applies to bodyguards (lets call them agents from now on), in that agents need to be able to show a change in their behaviour through different styles of motion and gestures.
This was only a problem in so much as the original model I was testing with was from an older game prototype and as such was very limiting. As you can see, his proportions were superdeformed in order to try and give him more character. But at the expense of expressive control over his limbs and movement. Unfortunately this is very restricting for a game that requires you to understand differences in behaviour largely through motion. So I took some time to think about what needed to change.
So I’ve spent the week working out some art pipeline issues with a new character, working out proportions and looking at the animation workflow. The key part of it all, is that the character needs to have roughly human proportions so that I can use the motion capture data I’m going to collect. I was inspired by a music video I saw on youtube a while back, the “Polysics” video of “you you you” struck me as interesting. The human proportions of their characters made me wonder if I couldn’t try that in the game for now. So I took a shot at modelling (and by this I mean programmer modelling) a similarly proportioned character, which you can see above. Not exactly brilliant artwork I’ll admit, but his structure works and has enough range of motion to make motion capture data a possiblity at least.
Luckily there is plenty of motion capture data in the CMU Motion Capture Database for me to test with. Although the road to getting the BVH format animation files into collada and then into the engine is no small matter (using 3 applications and no small amount of testing to discern how to get them to talk together has been most of my week).
The upshot of the work, is that I now have a pretty firm grasp on the workflow, even though I’m still going to be using very placeholder artwork for now. Especially for the agents. My new “Box Guy” is more visibly human in proportion (although yes he looks like a dude from black shades before you say it!). This is a temporary thing until I feel the whole process is far enough along that its worth engaging a full-time artist to flesh out the look of the thing. Its frustrating to be using all sorts of programmer art and placeholder graphics, but the game really isn’t far enough along to require “proper” art and it would just distract me from the code to try and make it any better. Plus of course it probably wouldnt be within my power to do that anyway.
I’ll try and post a vid to the youtube channel later today with the new BoxGuy doing his thing with a clip from the CMU mocap database. Its kind of dumb, but its also pretty fun to have your characters doing rather random motions. I also borrowed some music temporarily as I put the audio library together last week and it is adding to the comedy feel to the game right now (little computer people by Athony Rother just felt so right at the time!).
Next week will be spent doing some work on squad control, specifically giving move order to squads and being able to face them in the right direction. I’ll post more about that whole issue of “how do you control squads” in more detail because its a very important part of the game.
In the meantime, thanks for following.
Aug 21st
Ok, so I understand its hard to tell what the game is meant to be like right now. Nothing is really set in stone and you cant tell from a single image what Damzel is meant to be about. But let me at least describe for you what its not about. Its not about FPS style escort missions! There was always a risk when talking about using a first person view, that it would evoke the first person shooter gameplay to mind. Add on protecting someone and its pretty natural to think “escort mission”. But as I woke up this morning I realized there might be a way to explain why game will feel different than that.
I’ll use the old PC game “Space Hulk” to explain what I mean. I know many of you wont remember this game, but certainly many of you will be aware of the setting.
I use the example of Space Hulk here to explain that in the game, you are controlling squads. Ok, in Space Hulk you controlled individual marines, but in Damzel you control squads of up to five agents. Space Hulk built up a lot of atmosphere with its presentation, but I’m interested in the tension of the game here. It was no dumb blast-all-the-aliens game here. You had to carefully plan your way through the Hulk, trying to get to an exit point. You had a squad, you had weapons and individual loadouts etc. But its the tension that I’m trying to get across here.
If people go into the game thinking “first person shooter” then I’ve lost. Because it wont feel that way at all. But there’s a dilemma in that I really love the immersion that the first person viewpoint brings. I also enjoyed the Brothers in arms squad control mechanic enough to want to try and recreate it somewhat for this game. So in effect the emphasis is not on an individual so much as it is on the arrangement of squads. Hopefully gameplay videos and teasers will be able to explain this when the time comes. But it does still worry me that people dismiss the game without really understanding where its coming from. The depth that comes from the sheer number of possible configurations of squads, enemies, world and protectee (I definitely need a better word for them) is staggering. But I think thats for another post.
Hope this clears a few things up and explains the game a bit more. I highly recommend reading the peice on Rock Paper Shotgun about Space Hulk, it was one of my favourite games of that era (I still have it in a box somewhere I think).
Thanks for reading.
Aug 20th

Wolfire's Black Shades
Trawling through some of the comments on the kotaku link to the Damzel page. I noticed a couple of things:
So to clear things up a bit. This game really isnt like Black Shades, although its pretty easy to see why you would think that. Black Shades did inspire us to go the FPS route. But the focus of the game is very different. You’ll have to wait and see. The other thing is that escort missions typically DO suck. But they suck for a very different reason than you think. The reason is very much tied to the typical FPS gameplay style. To be honest, the first person viewpoint is one area of the games design thats a bit risky. The idea is to implement a brothers-in-arms style first person view, where you control your squads. The real aim here is to make things feel immersive, whilst providing some tactical interest and strategic depth. But you could play the game entirely outside of the first person view (we’re going for a hybrid model) to control the squads in a far more Syndicate style of play.
The real issue for us design-wise is to make sure that the whole package feels right. Its also the fun of developing our own game! Suffice to say that of course there are potential risks involved with the gameplay and references to be drawn to other games, but you have to have faith that the game that comes out at the end avoids those pitfalls and is its own thing. Not much point in being and indie developer if you can’t deal with a bit of risk right?
Thanks all for the interest in the game though. It feels good to know people might give it a shot.
Aug 20th
Damzel is definitely not a first person shooter. Nope, definitely not. Which is weird, because right now it feels a lot like Quake used to (circa Quake 3 with the jump pads). Strangely enough, when you implement NVIDIA’s Phsyx physics engine and use their character controller API, its just unbelievably easy to make a first person shooter. Ok, so you dont get the fancy shmancy graphics from Call of Duty MW2. But the feel of running around a 3D world in fast mouse-based control of a character definitely feels right.
Of course the biggest problem (and question) is wether players really DO care about the fancy-schmancy graphics more than I think they do. I’m betting that a viable game world full of genuinely interesting characters will trump the whole bleeding edge normal-specular-offset mapping stuff. Its not beyond us to do the graphics stuff technically, but frankly the amount of money needed to do that high end artwork just isnt there. So procedural content generation, animation, social simulation and whatnot will have to make up for it.
Thats not to say that the game will eschew graphics entirely. Aesthetically the look that will eventually make it into the game will be quite unique. Its all programmer art right now and it shows. But further down the development pipeline the aesthetics will be set more in stone. I can offer one teaser though.
Ok, I’ve said too much already. Suffice to say, with the right artist, things will be quite “unique” aesthetically.
BTW: I’m about to go and look for a youtube widget for wordpress, but in the meantime, check out the youtube channel: http://www.youtube.com/user/zoombapup
Aug 17th
There are a few indie developers doing a blog about what they feel about the subject of game length today. This is something that has been annoying me recently, because I have been trying to play so-called “AAA” games and feeling frustrated that they offer me little of interest. Then I’ve been seeing a lot of very small micro games on the lower “indie” end of the market. These games typically are 2D platformers or schmups (shoot em up’s to us non-cool kids). But there’s a huge gulf between the two styles of gameplay, which really irks me because I dont want either of those, I want something in the middle.
Luckily, there are a few exceptions and those tend to be the type of game I enjoy. They offer lots of depth and gameplay, without the focus on heaping hours and hours of “content” which typically devolves into doing the same thing a few hundred times, or wading through a sea of cutscenes in order to get to the final boss battle.
You can understand how both of these things come about. In the AAA market there is an aversity to risk because of the huge sums of money involved in developing and marketing a game. Frankly I’d be scared out of my skin to invest 40+ million into a game that wasnt a completely “sure thing”. Which means essentially you have to copy a mechanic that is already proven, usually backed by creating a “franchise”, which means creating some “character” to try and get the market interested. In reality what this generally does is mean that you amalgamate as many proven mechanics as you can, throw in the occasional new item and then iterate on your production values until it feels AAA quality. This of course, means you spend huge sums of money on art, content and cutscenes.
On the lower end, you have the platformers. There are so many of them that if you visit any of the “in crowd” indie forums and keep an eye out, you’ll probably find a few a week. Theyre like the current indie fashion item. Usually these have no art budget at all, so they are then called “retro”, or they have an artist on board, so theyre a bit more artsy. Usually they have some whizz-bang mechanic like stopping time, or rewinding time, or inverting time or inverting reality or some such. I applaud their innovation as much as I deride their narrow-mindedness. The trouble is, that its all very fashionable and clique-y and I dislike the whole notion of “celebrity” enough that it leaves a bad taste for me.
So we have high-art high-fashion indie, we have low-art big-budget AAA. But what of the middle ground? Well, there thankfully there definitely *is* a middle ground, although its not particularly innundated with examples right now. Games like Overgrowth, Frozen Synapse, Subversion (or whatever introversion end up calling it), Spy Party and Gratuitous space battles all spring to mind. All of them occupy a middle ground that is not AAA but is definitely not the “indie scene” type of indie game either. There are also examples from the mod community like the recent Alien Swarm. Games which have high production values for a smaller set of content. Games that don’t live and die by “length” rather than depth. Games that don’t need hours and hours of costly cutscenes. They also tend to be games that will offer true value to gamers because the experience will be about gameplay and not about external market sentiments about “length” or “production values”.
The most interesting part about this, is that these were the kind of games people used to create. If you’ve been around the game dev scene long enough, you’ll have spotted the trend towards making more and more of a song and dance around content and the cinematic experience. But is that a healthy way to look at things? Certainly I’ve not got enough time on my hands to not be an active participant in my own gameplay experience. I want to play the game, not watch it. There was a time when AAA games used to have this balance, they often tried to do the cinematic thing even then, but the rendering capabilities were such that cutscenes were generally very short and usually only a snippet to setup an atmosphere. I’ll use syndicate as an example here. It had cutscenes to introduce the dark nature of the game and to set the agent upgrade concept in context. Hell, there even used to be some quite good “cutscenes” that I quite enjoyed, like the one from the original XCom. But cutscenes were there to create atmosphere, to set the stage for the game as succinctly as possible. I think a big part of it was that playing fullscreen video was simply not possible and as such they tended to not try and create huge cinematic masterpeices. Of course fast forward to the present day and we get games which are overwhelmingly just cinematics.
So, I guess I am advocating a middle ground of indie games. Somewhere that crosses the divide between huge budget AAA retail-oriented games and the micro games of the indie “scene”. Those are the type of games I want to play. Those are the types of games where complexity and depth are accepted and not shunned (another recent trend amongst AAA games). Those are the types of games that many an old time gamer like me will enjoy.
The question is, are the middle ground games viable? I sure hope so because thats what I’m currently working on.
Other blog posts:
http://positech.co.uk/cliffsblog/?p=810
http://24caretgames.com/2010/08/16/does-game-length-matter/
http://2dboy.com/2010/08/12/too-short/
http://blog.wolfire.com
http://brokenrul.es/blog
http://gamesfromwithin.com/size-matters
http://macguffingames.com/2010/if-size-doesnt-matter-where-do-you-get-the-virtual-goods
http://mile222.com/2010/08/a-haiku-about-game-length/
http://nygamedev.blogspot.com/2010/08/coming-up-short.html
http://retroaffect.com
http://the-witness.net/news
http://www.copenhagengamecollective.org/2010/08/17/size-does-matter/
http://www.firehosegames.com/2010/08/how-much-is-enough/
http://www.hobbygamedev.com/
http://spyparty.com/2010/08/16/size-doesnt-matter-day/
Mar 20th
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!

Enjoy.
Mar 20th
This last few weeks we were over at GDC as part of the AI summit. We had two full days of AI discussion which was pretty wide ranging in content. Phil did two presentations, one on social behavior and another on some “tales from the trenches” under the name “Little big AI”. The big takeaway from the GDC as a whole, is that games are diverse in nature. On the high end, we saw presentations about using driven ragdolls (powered by Havok physics and animation products) in Just Cause 2. On the other end of the spectrum, we saw many indie games on the IGF stand and plenty of social games in attendance (particularly interesting was Daniel James’s talk about Three Rings facebook game experiments).
So we’re left with a feeling of wanting to work on high end 3D animation and low end flash-based facebook social simulation!
Having a quick poke through the Facebook API and how we can tie flash into it (via adobe flex) seems like it would be fun to experiment with. So its likely we will do some work on that. but will also continue work on the behavior tree code library and work on pushing box mental in a new direction. Box Mental is our 3D game/experiment and following some feedback from Sony, we decided that the concept was too hard to explain and understand as it was. It feels like we need to join the dots somewhere and actually work on something that does both high-end 3D and low end flash in a way that works with the same core gameplay and backend infrastructure. We have a background in network and distributed systems code, so it feels natural that we will bring some of that into play. We are considering how we might use either google’s appengine and/or amazon EC2 to power the backend. The key of course is to find a simple mechanic that works across a range of platforms, has a core online element but that works scalably and asychronously and that still has interesting complexities that can be controlled by AI direction.
More on all this once we have some ideas prototyped out.