The Introversion Blog
The only place you'll ever hear the truth

Coming Clean
Posted by Mark on Fri Aug 20, 2010 5:09 pm
 
A wise man once told me that sometimes it’s better to seek forgiveness than ask for permission. That stuck with me and it characterises my approach when speaking with the press or being asked about Introversion. I tend to tell the truth and get shouted out afterwards for putting my foot in it. I’m not going to apologise though, because I believe that honesty is the best way to communicate important lessons about the reality of running a company. I also hate it when the big boys think they can throw their weight around and silence you if your experience is different to the glossy / shiny view they wish to project. So it was unusual when I found myself avoiding conferences and turning down interviews for the first half of 2010.

This came about because Introversion nearly closed it’s doors in March. Now I’ve probably just lost half my audience, because any one who knows anything about the history of Introversion know that in the past we have complained about running out of money pretty regularly, and the thought of another tale of financial woe leaves them cold. This time though it was very different. It wasn’t just the cash reserves that were depleted it was our will to continue.
To understand a company you have to understand it’s board and although we are a team of four, Chris and I have the strongest personalities, the loudest voices and are most stubborn when we don’t get our own way (interestingly Chris and I are both only children). Chris wants to make new games. Mark wants to grow a stable company that has the capability to bring Chris’ games to multiple platforms. Now when we got the opportunity to bring Darwinia to XBLA I saw a great opportunity to step forward. We started off trying to get into Microsoft’s good books by releasing a custom version of Darwinia for Vista. Then we decided that the Multiplayer component of Darwinia+ was worth a whole PC launch and we got tied up with Multiwinia. Than Darwinia+ spun out to about three years longer that our original estimate. Throughout this whole time, Chris had been trying to get back to Subversion. He was committed to working on the other projects, but his heart wasn’t in it and in the back of his mind was a burning desire to work on his next game idea. As we neared the D+ launch the future of Introversion looked really rosy. We were lining up for DEFCON PSN, but we’d learnt our lessons about console porting and knew what we were getting into. Chris new he would get a good chance to work on Subversion and I knew we had a great portfolio of products to get us through the next three – four years.

Internally we knew within about an hour of Darwinia+’s launch that it hadn’t done well enough. It took us about two weeks to really accept that and the awful realisation that we didn’t have enough to continue with the office or the staff. We had a bunch of creditors knocking at the door, but worse than all of that we were absolutely shattered. Darwinia+ had been really drawn out and I’d spent a lot of time selling the future to the team and when the rug was pulled away from my feet I really didn’t want to continue. Critically, neither did Chris. He’d had to spend a lot of time on Darwinia and decided that we had failed to live up to our original mission of making “Original Video Games”. Striking out on his own made most sense given IV’s failure: “We tried it your way, Mark – didn’t work”. So we started shutting things down. We reached out to our creditors and (amazingly) they accepted our payment plans. We closed the office and sold the tables and chairs. We let Gary, Leander and Martin go(another three that can be officially added to Nicholas Lovell’s redundancy tracker). They were amazingly stoical about it and I’m glad to say that they are all doing well. Then we closed the door on Introversion, rewrote our CVs from scratch, and started applying for jobs.
I guess this was rock bottom. We’d been through crises before, but we’d always wanted to solve the problem and find a solution, this time it was a bit like there was nothing left to save.

A couple of weeks rolled by and I found myself unable to accept the end. Chris too wasn’t actually ready to jack it in. We put together a rescue plan involving creating Steam achievements for DEFCON so we could convince Valve to run a promotion with it. We’ve flogged Darwinia to death over the years, but we thought that DEFCON would benefit from some spit and polish. Chris was working every afternoon on Subversion and every morning on DEFCON. It was as if that small amount of Subversion work was refuelling him. I didn’t need to keep justifying a project that I had been pushing for four years and could start being a lot more collaborative and analytical about the business decisions that we could make. It was like a weight was lifting.

Valve okayed the promotion and even though it didn’t focus on DEFCON we were happy that we had achieved our core objective. This was the game-changer. When we started Introversion we’d had a string of successes and believed we were undefeatable, but it was a long time since we’d had a victory and we really needed one. Right on cue, Valve delivered. The promo exceeded all of our expectations and when combined with our low burn rate (no office or staff now) we had gone from being fearful about paying our mortgages to having a year’s operating capital in the bank. This was good, but paled in comparison to the fact that we were working together as a team again. Just like the old days. Just me Chris, TJ and Johnny – laptops, bedrooms and plans for global domination. The difference this time was we have a lot more knowledge and experience about what works and what doesn’t. On the face of it we are less capable than we were six months ago, but personally I believe that we are ready to rebuild the company bigger and stronger in a different mould.
Subversion is our most ambitious and epic projects so far. It’s a complete return to our roots. It’s as immersive as Uplink with the production values of Darwinia+ and it’s affordable when I run my three year cashflow (you wont find Chris talking about that in his blogs anywhere!). We’re also really hoping to have the opportunity to release DEFCON on the PSN and we should know about that in a couple of months.

We rebelled. We evolved. We look and feel human. Chris is programmed to think he is human. There aren’t any copies. And we have a plan.



 

It's all in your head, Part 20
Posted by Chris on Tue Aug 03, 2010 11:32 am
 
Yikes, part 20! This is starting to get serious now. I’d actually been meaning to keep writing at a target rate of one Subversion blog per month, because I wanted to keep up the momentum and I think this long running blog series is a fascinating experiment in itself. But it’s a strange thing - it’s harder now than it was when I started this process. At the beginning of the Subversion project back in 2006, when I was spending most of my days on Darwinia for Xbox, Subversion was all about technology, and often involved highly experimental game development. I spent months just tinkering with procedural city generators, and the results were often staggeringly cool to look at, and therefore to show off. It made for great blog material, and was very satisfying to write about. The game itself was very thin on the ground, just ideas slowly forming into plans. Now things are different - Subversion is actually a game now. Whereas previously I might have spent a couple of weeks writing a river generation algorithm, I now spend a couple of weeks writing AI code to make guards surrender when they fear for their lives. It seems somehow much more mundane - something you can see in other games, and it’s much harder to write interesting blog material about it.

Am I telling you to stop reading this blog? Certainly not, the truth is that tons of really interesting and exciting stuff is going into the game now on a regular basis - it’s just different to the massive procedural city stuff of a couple of years ago. Until we bridge the gap between the mid-game logistics-em-up in the procedural cities, and the core game in the sites themselves, there will always be a gap.

Since the last Subversion blog (May 4th) I’ve adopted a new working method based on Sprints - fixed short time intervals of 1 or 2 weeks, during which time I work on a single area of Subversion at the exclusion of all others. It’s a guided, formalised way to rapidly prototype and produce working systems, perfect for a project like Subversion where there are tons of areas that all need work before even basic gameplay can happen. The rules of a Sprint are set down in advance, and bring the order to this chaos:
- A sprint must occur for a fixed real time interval, 1 or 2 weeks.
- The aims of the sprint must be set beforehand. Deviation from the original aims can happen, but should be minimised as much as possible.
- During a sprint no other part of the game may be worked on, unless directly related to the sprint
- Once a sprint has started, it has to be finished
- Once the time is up, the next Sprint topic is chosen and the cycle continues.
- If a Monday arrives without a clear plan for a Sprint that week, you instead use the week to plan your next few sprints, starting next week. You aren’t allowed to invent sprints in realtime.

You tend to have the next 2 or 3 sprints already planned out at any one time. As you work you come up with new ideas for Sprints and add them to the queue. It’s a very satisfying way to work, because you see rapid progress in all kinds of different areas, and you have none of the stress of worrying about what you should be working on next. Working on a single Sprint gives you ideas for 2 or 3 more that could directly follow on. You also get short term goals to aim for - when Sprints are planned you are careful to design jobs that can realistically be completed in two weeks, and it always ends in a little bit of a rush on the last couple of days to finish everything you started. You know that if you don’t finish the Sprint on this last day, by next Monday you’ll be onto something else. That’s quite a motivator, especially on a project where the final end date may be a long way away. In my experience it’s actually possible to plan two weeks of work very accurately - much more so than longer time frames lasting several months, so you actually end up feeling like things are more organised and more on track than normal. Also, the two week limit stops you from going off on a crazy long tangent - you are forced to pick sensible Sprint targets, and make decisions that result in finishing during the time limit, rather than endlessly polishing and re-engineering non-critical stuff (as has happened to me several times before, I have to say).

Here’s some of the sprints I’ve worked on since the last blog. These descriptions are taken directly from the Sprint plans I used:

Human Rendering (1 week): People are rendered in the world as stylised outlines. Their equipment is rendered in place on their outlines, allowing the player to see what equipment and weapons guards/staff on site have equipped. Injuries are shown in position on these outlines. The outlines change shape to reflect core changes in state - eg Surrendered, Unconcious, Terrified.
Future upgrades : Character animation.



Instincts (2 weeks): Low level behaviors that apply to all human beings to varying degrees. Eg Curiosity, Suspicion, Aggression, Fear, Intimidation. Different entity types are more/less susceptible to different instincts. Players can mess with instincts of NPCs for their own ends. Highly intimidated/co-erced/manipulated NPCs can be controlled by the player. Player’s agents also susceptible to instincts - they are not robots. Display of instincts through colours, and through text/speech bubbles to signify intent.

AI Module (2 weeks): Foundation for a Behavior Tree based AI system that will drive all NPCs higher level behaviors. Includes a tool for visual creation and debugging of Behavior Trees.
This sprint was completed in two weeks, but has zero direct bearing on the game at the moment. It provides an AI framework, but no actual content - ie no NPCs are using this system yet. A follow up sprint lasting two weeks will create behaviors for NPCs using this system. I’m planning to write a more detailed blog about this AI module once i’ve completed that followup sprint, because it’s going to be awesome.



Theft (1 weeks) : Some items have value, some items are extremely valuable and are rendered differently (gold, glowing). Your team can collect valulable items. Total plundered is shown visually.



Complex Security Systems (2 weeks): Server rooms contain racks of hardware wired together appropriately. Camera control systems drive CCTVs around the building, recording results onto hard disks. Routers and switches connect all devices to the Local Area Network, and telephone exchanges (outside the building) wire the phones and LAN into the national phone network. Security systems power sensor grids, laser trip wires etc, and wire directly into alarms and Police auto-diallers, which are also plugged into the phone system. Keycard scanners and Keypad locks connect to central computers with access lists and logs of use. Everything can be tinkered with, rewired, hacked and cracked.



Multi-track Music (2 weeks): Upgrade the SystemIV sound system to support multi-track music. Stereo tracks of differing but compatible lengths can be mixed simultaneously during the game, with the volumes, ADSR envelopes and DSP filters all adjustable in realtime depending on the game situation. A direct continuation and extension of DEFCONs ability to crossfade multiple music tracks and to alter the playback frequency based on your surviving population count, to produce an endless stream of varied music linked to the world state.



This is the most recent two week sprint. We’ve got a new Audio guy - PJ Belcher - doing our music and sound effects for us right now, as sadly our previous audio hero Alistair is unavailable. The results so far are excellent - Each emotional element of the music is separated out and played on its own audio channel, and we can adjust the volumes based on your game situation. So if a guard becomes suspicious of you, we fade up a musical element to represent that. If you get into a fight, we fade up some heavy scary drums and guitar. When your guys are hiding deep inside a high security area, we bring in some tense cellos and percussion to nail it home. We’re mixing about 10 different tracks together to form the game music right now, and it’s sounding really great.

This is all built on the Audio system originally written by myself and Andy Bainbridge for Darwinia, many many years ago. It was originally designed to handle the hundreds of audio events and ambiences that make up the sound in Darwinia. It was then extended to support DEFCON’s haunting cross-fading and frequency dropping music tracks, and then used again in Multiwinia and Darwinia+ on the Xbox. In fact, an earlier version of this audio engine (including the audio tool you see me using in the video below) can be seen in our Darwinia and Multiwinia source code, for those that are interesting in seeing how it works internally.

Here’s a video of the new multi-track music tool in action, showing me mixing the different tracks together in-game. The music is the current early draft of PJs first music track for Subversion, designed to evoke a strong feeling of tension in the player.


(Requires Xvid codec, headphones and high volume)

Pretty cool stuff! I’ve always loved audio, it’s probably one of my favourite areas of game development, and I got a lot of satisfaction out of working the audio into Darwinia and DEFCON. Without the audio those games would never have had the atmosphere they have. I used to joke to Alistair that his sound effects made our animations look better - because that’s how it felt to me. Something like the Refinery building in the Mine level in Darwinia has a really simple rotating cog visual effect, but a massive reverberating metallic clang that makes the building sound huge and epic, and genuinely “sells” the animation to the eye. I’m hoping we can continue punching above our weight with the game audio on this project as well as the previous ones - I’ll probably write more on this as we progress.

So the other great thing about the Sprint working method is I know what sprints are (potentially) coming up in the future. I look at this list and think I have the best job in the world. If you are anything like me, or you are at all interested in Subversion, you’ll find this list as exciting as I do Smile

NPC AI routines (follow on from AI Module sprint)
Climbing and Acrobatics
Computer Hacking
Character animation (follow on from Human Rendering)
World object interaction
Primary User Interface
Inventory
Equipping gear
Characterisation - differentiating Agents and their Skills/Abilities/Equipment
City level integration : Merging the core game missions with the mid-level city

The very next two week sprint? A much needed holiday in California with the wife. Essential to the project, I think you’ll agree.

In the mean time, you can check out a two-page article in Edge Magazine this month, all about Subversion.



 

Cambridge Indies
Posted by Chris on Mon Jun 07, 2010 7:05 pm
 
Twelve months ago I read about an event called TigJAM that was taking place in Cambridge UK, and since I live in that very city I decided that i'd go along. The event was organised on the TigSource forums, and basically involved lots of Uk indie game developers getting together in a cafe in Cambridge called "CB2" for a couple of days and jamming, turning out a few experimental games along the way. CB2 is pretty well known around Cambridge for its great food and drink, for hosting live music and for showcasing local artists work on the walls, and is frequently packed until its 11pm closing time with trendy Apple-Mac wielding creative types.

Ultimately I bottled out at the last minute. I didn't really know anyone going to the event, and I imagined it would be a pretty tough crowd to get into, and making even a single game in two days sounded pretty hardcore to me.

Fast forward to this year, and the same event was scheduled at the same venue. I started looking at who was planning to attend, and much to my surprise, quite a few Indie game developers are actually now living in Cambridge or the nearby area. A fledgling Indie community has sprung up in Cambridge centered on the CB2 cafe, and I may be wrong about this, but it seems to me this has all happened in the last few months. I discovered a small group of a dozen or so talented individuals who meet up every tuesday and work on their own projects together, enjoying the immediate feedback, the advice, and the encouragement that comes from other creative peers working in the same industry but on entirely separate projects.

I still don't know everyone in this group, but it's an eclectic group of lone indies. There's Terry Cavanah of Distractionware - creator of VVVVVVV, who is already organising MORE game jams in just a few weeks. There's Hayden Scott Baron of Starfruit Games, who's Ex-Frontier (just like me) and is now producing iPhone games. There's Charlie Knight, author of psychedelic shooter games like Bullet Candy and Scoregasm. All of these indies and many more live in Cambridge or within a short journey range, and are now meeting regularly at this great little cafe. It's a great excuse for me to get out of the house and work in a way that isn't completely isolated and alone, and I'm also secretly hoping that some of their speed-development mentality will absorb into me through some sort of indie-osmosis, as their projects typically run into several months in length at most, and Subversion is already into years.

So by the time the TigJAM came around this year, having now met a couple of guys in this group I felt much more willing to go along and give it a shot. I took my mac laptop along and intended to spend the weekend working on Subversion, just enjoying being at the event and maybe roping some people into some playtests. But I actually ended up joining in, making a total of three games during the two days I was there. There was a great creative spirit to the whole event, and although i'm personally well chuffed that I managed three whole games in two days, to be honest I think I was one of the lowest final counts. I know people like Terry and Hayden probably managed double that. It's really quite incredible.

The way it works is simple - a jam typically lasts 3 hours. Everyone writes down a theme on a piece of paper, and two or three themes are then chosen at random. Themes can be anything and are often ridiculous, like "Staying Awake" or "Antidepressants". You have three hours to make a game that explores that theme in some way. You can use whatever tech you want, and I saw quite a mixture of styles. There was quite a bit of Flash development, and a lot of people were using Unity. These systems are incredibly powerful and also give web+pc+windows+linux versions of whatever you develop, right out of the box. I used our internal c++ library "SystemIV" - which is at the core of every game we've made since Defcon. I'm very familiar with it so it's quick and easy for me), and it gives me an openGL render context as well as mouse and keyboard input with minimal effort. It's also the reason you see PC and Mac versions of these games - we can do both now.

Here's the three games I made. The downloads are here for Windows, or you can try the Mac downloads at the Cambridge indies website, run by Richard Perrin of Locked Door Puzzle.

Alternatively there are video links at the bottom of this post.


Game #1 : White Holes

My first game explored the theme "White Holes", and is more of a graphics demo than a game. It's a lovely looking particle system and rendering style, simulating gravitational interactions between colorful particles. Style over substance really, a common criticism of Introversion projects Smile I was quite happy with it - I wanted to create something that looked like a white hole being created in a particle accelerator like the Large Haydron Collider, and for a couple of hours work I think it's not bad. It also enabled me to switch into rapid-development mode, which is quite a jump when something like "Pick Up Object" has taken two months in Subversion.



download for Windows

Controls :
- Arrow keys to fly
- Hold down Shift to accelerate

Nb. If you get an error on launch like "Failed to initialise application", you need to install the Visual Studio 2008 Redistributable package.

Game #2 : Trapper

My second game was made for the theme "Sega Dreamcast VMU". The idea was to produce a game that would (pretend to) run on a Sega VMU with a screen resolution of 48x32 pixels, at two colours. That's about the same resolution as an icon on your desktop, quite a serious technical limitation. You are also limited to arrow keys and two buttons for input. I made a game called Exterminator in which you have to chase timid pests around the screen, and exterminate them. You can never catch them on your own, so you have to build walls and make dead-ends that they can't escape from, then chase them in. Once you've got them trapped you can exterminate them. However once they've been dead for a few seconds they come back as ghosts, and now chase you around the map in revenge. As ghosts they move a lot slower than they did, but they can now walk through your walls, so as you clear a level of more and more pests, the world gets more dangerous for you and you have to be more careful. I was pretty pleased with the end result (although it looks terrible in screenshots), but when you factor in that Hayden was able to make a full 3d maze exploration game for VMU in the same time it seems less impressive Smile



download for Windows

Controls :
- Arrow keys to move
- Z to create walls
- X to exterminate / destroy walls

Game #3 : Balancing Act

My third and final game took the longest (four hours), and was the one I was most pleased with. Working with the theme "Mouse input only", I decided to try and make a game that used the mouse as the core input and gameplay mechanism. What started out as a fairly simple "Spinning Plates" game (keep the plates spinning fast enough so they don't fall, using the middle mouse wheel to do the spinning) morphed into a game-of-life simulator in which you are forced to balance such things as "Family", "Wealth", "Success" against "Health", "Friends" etc. Time ticks away and you gradually lose control of the elements of your life as the balancing act becomes impossible, ultimately forcing you to chose which is more important to you and what can be sacrificed. There's no doubt that deeper life-lessons have been taught by fortune cookies, but it entertained me for the four hours it took to finish (even at a game jam, your projects can slip), and it seemed to get a good response from the guys who saw and played it.



download for Windows

Controls :
- Spin the mouse wheel quickly to "Spin Up" a plate
- You can click and drag plates around

You can find my three games, along with the games made by everyone else during the event, at the groups website, http://www.cambridgeindies.co.uk, run by Richard Perrin of Locked Door Puzzle. You can also find Mac OSX builds of all three of my games.

All told it was a great event, and i'm planning to work at Cb2 on Tuesdays for a while because I think it's a wonderful thing to have an indie community that work together, and from a personal point of view its great to work with people outside of Introversion who have their own motivation and vision, and their own sets of skills that are often very different to mine. It's an open group, so if anyone else who lives near Cambridge wants to come along they can do - it's open to anyone who is interested.


VIDEOS OF ALL THREE GAMES

Youtube video of all three games

Xvid high-quality video of all three games



 

It's all in your head, Part 19
Posted by Chris on Tue May 04, 2010 5:51 pm
 
Work continues towards the Subversion "Vertical Slice" - a fully playable single location, with all graphics, sound, interface etc built to a reasonable quality level. We've made some big leaps forwards since Christmas, and i've been sitting people down in front of the game and watching them play it. Everything takes a long time in this project, and i'm not entirely sure why. Even something simple like allowing the user to plant a bug on a cctv camera has turned out to be a massive job, with interface redesigns and heavy rethinking on how the player interacts with the world. I'm overthinking everything, always looking ahead to situations that won't become problems for months, trying to design and implement everything correctly first time. This is usually a bad idea. Iterative improvement and replacement often gets you to a better solution faster than aiming for the perfect solution first time. And even if you write a system and then totally replace it, you still learn a huge amount - writing a system wrongly is often the best way to learn how to do it right.

Path finding has been a great example of this. I've written two pathfinding systems in my life : one for the static world map of Defcon, and another for the numerous maps in Multiwinia. Both games used a pretty crude method which I was never entirely happy with, solving route-planning the same way the internet routes messages between distant routers, and for Subversion I knew i'd have to solve it properly. Despite that prior experience, it still took me three attempts to get it right.

First attempt : Basically the same system as Defcon and Multiwinia, with navigation "Flags" dotted around the world, connected to their neighbours if there was a walkable path between them. Often resulted in characters getting stuck in corners or in rooms that didn't contain a flag, and always produced routes that looked terrible, often involving sudden sharp changes in direction in the middle of an open room.

Second attempt : I wrote a system to generate a Nav Mesh based on the geometry of the world, and then used the A* route planning algorithm across that. This allows extremely efficient route planning (minimal memory usage, and very fast). However the process to generate the nav mesh is very expensive (takes a long time), and is prone to errors - doorways and small openings are often incorrectly marked as blocked, because their edges don't quite line up in 3d space. In addition, although it's possible to support dynamic scenery and obstacles, it's seriously complex to do so.

It might seem like a waste of time to be doing this job over and over again, but it's really not. Once i'd finished the Second Attempt and realised it was never going to be reliable enough, I immediately hit on the Right Way To Do It, and implemented the whole thing in about 4 hours.

Third and Final attempt : The world is rasterized onto a 2d grid. Walls produce solid grid cells that cannot be walked through. Navigation uses A* across the grid. It does use a lot of memory and there's a practical limit on how large the world can be, but it's perfect for Subversion. It can support dynamic scenery such as using shape-charge explosives to blow a hole in a wall (you simply change the relevant cells in the 2d grid), and it can support dynamic obstacles by simply rasterising them onto the same grid. Best of all, producing the 2d grid is extremely fast and error tolerant - I basically don't need to worry about navigation again.

Another issue is that generating a route, even using A*, can be quite slow - especially when no route exists, because A* has to search the entire world before it can be sure there is definitely no route. This can manifest itself as pauses in the game - ie the game freezes for a fraction of a second. It's quite noticeable, and can ruin an otherwise smooth frame rate. Using A* across a rasterized 2d grid can be done over a long period of time - several seconds if you don't mind waiting. If twenty people all decide to route plan somewhere all at the same time, this is a huge help, because you can smooth that calculation burden out over many seconds so the player doesn't notice it. The trick then is to hide this using gameplay/behaviour tricks, because you don't want the NPCs looking indecisive. Ultimately it comes down to priority - my agents in game will route plan as fast as possible, because I expect them to respond quickly to me. But an NPC sat at a desk who decides to visit the toilets - he starts planning his route but remains sitting. Several seconds later his route has been completed, and only then does he get up and start walking. Using this basic method, hundreds of NPCs can be routing around the world without affecting the smooth frame rate.

Here's a video of Subversion in action, focusing on the route planning system as it stands now. A lot of new features have been going into Subversion since Christmas, hopefully you can see some of them in this new video. The location this time is a Bank Vault, and you've basically got to rob it without using any weapons. There's still a huge amount unfinished here - the interfaces exist only at the most basic level, and it's still pretty cumbersome to play. Eventually i'll do a strong pass over the game interface and solve all of that, but for now it's functional.



It was only after I finished with the route planning that I realised what a great method this 2d grid is in general. It can be applied to virtually any complex system in game, and often takes a horrifically complex and largely unsolvable 3d space problem, and reduces it down to a much more manageable 2d grid based problem. AI events are a great example : in Multiwinia and Darwinia every single unit in-game was searching its surroundings for threats in 3d space. Literally every Darwinian would look in a 100m circle around himself for grenades, airstrikes, fire, virii, and enemy soldiers. If they saw something they'd run away from it. This is hugely expensive, and when thousands of Darwinians are battling each other there's a lot of wasted CPU time.

This entire method can be replaced with a 2d grid "heat map". The basic idea is that a threat such as a grenade "colours in" its cell in the 2d grid bright red, to mean "extremely dangerous". This 2d grid is then blurred as if you've opened it up in photoshop and applied a large pixel blur to the image. That 2d bright spot becomes a glowing area of red, with a clear gradient getting brighter as you approach the centre point. AI agents can therefore just look at their own cell for danger, and if they find it they can run away easily. This kind of system scales extremely well, with virtually zero CPU use for hundreds of NPCs responding to dangers at once. It also works well for dangers that have unusual shapes, such as Fire (which might cover a large area - that entire area just gets colours in bright red, and the blurring takes care of the rest).




 

Blog archive
Read and discuss older news in the blog archive