LO's Sharp Devs

C# , XNA Game Development Blog. Intentionally more than only for game authors but for C# programmers in general.

Moje zdjęcie
Nazwa:
Lokalizacja: Poland

środa, 14 kwietnia 2010

[Game Design] Artificial Stupidity ™

Almost anyone knows what Artificial Intelligence (AI) is – set of data and algorithms that simulate intelligent (Or not-so, if developers were lazy or just noobz) behaviour of NPC characters in game. And scripted events / actions / behaviours – are definitely not an AI – they are just scripts. Nor path finding is.
I would define game to have an AI when units DECIDE what to do accordingly to possessed DATA (knowledge, experience, predefined information) and actual situation in the game. So when there is in game routines algorithm – it’s not enough. When it’s defined, that at 7 NPC leaves house, then arrives his workplace and leaves it at 16 – this is again – scripting. Let us just imagine mixing an RPG characters with a bit of Sims. Developers only define FACTS (where person has house, which is his bed, where he ACTUALLY works), and PARAMETERS (how tough he is, how resistant, what are his moral principles etc.). There shall be also RESOURCES assigned to NPC that change in runtime accordingly to FACTS, PARAMETERS or EVENTS (like money level, health level, stamina, hunger etc).
What shall be done now – yes, we cannot avoid coding at this point – is do write right algorithms that will properly take care of maximizing or balancing these resources (NPC character or morality might have high impact on priorities). Now this algorithms might use knowledge of the NPC (where I can actually obtain food? How much time do I have before I starve?), knowledge balanced path finding (What would be FASTEST way to get to the shop? What would be the best way to avoid these thugs on the way I know about? I guess if that gate is open today so I can go through shortcut?) and predefined behaviors (as many as developers imagine for realistic experience).
And another thing – when NPC is going to actually shoot at someone – it shall NEVER miss! This is Intelligence – absolute, it does not makes any errors! This is not realistic – for RPG games this aiming skill would define failure chance. This is some solution. But how for FPS? Only random number telling if aiming was right? How fast gamers find that enemies just shoot at random?
Now we came to this post main point. There is need to implement some misbehaviour, mistakes, errors, non-optimized paths that will move along with game progress or difficulty level. Writing absolute algorithms is as easy as writing completely poor algorithms. Writing algorithms that can adapt their efficiency or result quality accordingly to changing parameters is not an easy task. There are some games that tried to incorporate sandboxed, nonlinear NPC behaviour and interactions (just to name S.T.A.L.K.E.R.), but it seemed so hard to balance, that planned solution was reduced so game could be playable.
Hard to say where they failed – lack of skill, lack of time? I would rather suggest – that developers used not enough parameters, resources and knowledge that could simulate socialized units and balance their coexistence. Does fully simulated, working world is ever possible? Just Cause 2? Elder Scrolls V? Something not yet announced? Or all artificial worlds, as models are either caused to collapse or forced to be externally controlled and rebalanced by developer’s god hand? I hope no.

Etykiety: