Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411523 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 01:54:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignWhy common sense is so hard to find in games?
Pages: [1] 2
Print
Author Topic: Why common sense is so hard to find in games?  (Read 3664 times)
filosofiamanga
Level 1
*


View Profile
« on: June 03, 2011, 10:00:08 AM »

Well, I tried this time to seek if this was posted before, I only found this:
http://forums.tigsource.com/index.php?topic=15457.0

But In that post they talk about enemy design, it's related but not what I want to talk.

I know machines today are dumb and the years of Skynet and I robot is still years ahead from now.
But what seem to bother me is that enemies in games seems pretty lame in their patterns, they don't have interesting patterns to beat or be diferent, they seem to use the "brute force" tactic, attacking bluntly until they kill you or they die.

What I want to talk about in this thread is about the "common sense", not the complexity of the algorithms and geek stuff like Neural nets, learning code or even Fuzzy logic.
I want to talk about Finite States Machines because I think they're great if used well.
An example could be KOF 2002 (the machine in lvl 8 still beat me).

What I want to talk is this concept called "common sense" in games, It bothers me that enemies doesn't have basic behaviours that are really "common sense" that even a 3 years old playing Mario on Wii seem to do.
I'm talking about really basic stuff like Being scare and flee when low HP.
Other example could be re-grouping the soldiers after a battle.
In RPG could be an enemy with healing ability that heals first their pals with low HP and are in the verge of dieing.
Or that if the enemy feels overwhelmed (in RTS) they flee, like a melee warrior fleeing from 10 archers, fleeing to regroup with others melee characters (flocking) to make a comeback.

A really good example I saw of this "common sense" is in Spelunky where a jumping monkey can fall and kill itself on the spikes, that feels so good.
I think spelunky has many of these "common sense" stuff I'm talking about.

Other thing to talk seem to be why enemies doesn't fucking coordinate their attacks, they seem unaware of their surrounding pals.
It's not hard to code, like I say, I'm talking about Finite State Machines.
Good examples could be in a Beat them up the melee and High HP enemies protecting and preventing the player from reach their long range enemies and weaker pals.
Or a magician making a protect (increase the defence) spell to protect their stronger pals (in terms of attack).

It bothers me that enemies doesn't seem "aware" of their surrounding pals.
Designing little co-op tactics could increase the "feeling" of smart enemies.
An example could be this tactic in Castlevania SOTN:
- An strong character (like the knight) and a weaker (the flea man) make a coordinate attack, like the flea man jumping and attacking and the knight making a projectile, and if you jump to kill the flea man, the knight make a powerfull anti-air.

I'm not talking about really complicated stuff, but basic "common sense".
A good example could be Pacman and his AI ghost.
Logged
Pedrosanchau
Level 0
***



View Profile
« Reply #1 on: June 03, 2011, 11:45:12 AM »

If an enemy had really common sense, they'll flee seeing the  hero that already decimate 1.000 of their pals.

There'll be no game.
« Last Edit: June 03, 2011, 11:19:33 PM by Pedrosanchau » Logged
ஒழுக்கின்மை (Paul Eres)
Level 10
*****


Also known as रिंकू.


View Profile WWW
« Reply #2 on: June 03, 2011, 11:58:47 AM »

this is a big issue but yeah, we aren't creating simulations, we're creating games. you don't want to play a game with enemies that are too intelligent because you'd never win. you want to play a game with large numbers of stupid enemies so that you can shoot a lot of them and not be in any danger yourself

of course this varies by genre; some genres have need for more intelligent enemies, such as stealth games (like metal gear solid)
Logged

genericuser
Guest
« Reply #3 on: June 03, 2011, 04:13:49 PM »

Finite state machines aren't magic. Common sense includes a lot of things, and (depending on what sort of game you're making) implementing it requires considering several factors that add up to many possible situations.

Unless you're willing to plan out an intelligent response for each possible situation - and that's going to take a long time - you'll probably end up with at least one situation where the AI behaves stupidly.
Logged
_Tommo_
Level 8
***


frn frn frn


View Profile WWW
« Reply #4 on: June 03, 2011, 04:28:57 PM »

"common sense" as you call it, is one of the biggest open challenges in AI, and many researchers think that common sense largely means "intelligence" as the one needed to pass a Turing Test...

so there's no common sense in gaming because it would be seen before in Google, or robots, or cars, or ...
Logged

Rumrusher
Level 6
*


View Profile
« Reply #5 on: June 03, 2011, 04:56:11 PM »

If an enemy had really common sense, they'll flee seeing the  hero that already decimate 1.000 of thier pals.

There'll be no game.
No the game would be now "how could I sneak up on the enemy with out alerting my presence?" or given how the level made "how sadistic am I if I kill an enemy back up against a wall?".
Which then turns any game into a slasher flick where a near indestructable force spends time hunting down creatures that would given the state find a escape route.
Though there a chance story wise running away would lead to death also by the boss's hit squads.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #6 on: June 03, 2011, 05:50:20 PM »

Chrono trigger, half life 1 and halo say hello!

It's a problem of writing behavior and having enemy that don't have a life span of 3s total!

It mean you need to broadcast to player correct intention, correct behavior and correct emotion of enemy. The reason Halo enemy seems intelligent to so many player is simply the voice clip and exaggerate movement, there is also explicit social hierarchy.

But if you want to achieve that drop FSM and look for behavior tree.
Logged

Sankar
Level 0
***



View Profile WWW
« Reply #7 on: June 03, 2011, 07:22:02 PM »

I believe that using the word "Common Sense" could give some people the wrong idea about your post, but I do understand what you're talking about.

AI is one of the greatest challenges in game programming. Specially because not all 'great games' develop a good AI system. Many games employ pre-determined paths, keypoints, pre-set AI routines to give a sense of a "Good" AI behind it. While the AI itself ends up being pretty simple.

Now the problem is that even the most simple AI coding is actually complex, if we look behind into game history, we'll see that AI was always some steps behind the other gaming aspects.

I do understand that lot of what you used as an example could be done with "pre-baked" AI, a set of pre-defined routines that could be triggered if a set of pre-determined conditions were true.
And these things are great, they add a sense of "detail" to the game, and surprise the player (what is always good).

But they are hard to program and design, and if they are not implemented correctly, they can ruin a game that would be otherwise playable. And since AI routine checks have the habit of being "Multiplied", like one for each enemy or set of enemies, they sometime end up conflicting with physics and all other sorts of calculations needed to make a game work.

Lets say, enemies that flee.
This is a great concept in theory, but it can make a game really irritating and can be somewhat hard to code.
Now, Gamers like to kill things. And killing creatures that are so afraid of your mighty they flee is a good twist. But games usually rewards us for killing, not for hurting. Thats means if the creatures start to flee, no XP/Health/Gold/Items. So the players Will need to hunt these fleeing assholes.

So that means a whole lot of balancing need to take place. Its something that if done right can work really well, adding a new layer of strategy and diversity to the game. But there are lots of chances of going wrong (IE: Boring stray enemies hunt, Insane Difficulty because 10s of dying enemies group up and attack you, Enemy Path-Fiding screwing the flee route and ending up stuck on the level,  too many enemies fleeing to a single area and killing the performance)

I believe for such things to work, games would need a "hivemind/director" AI. Something that would monitor every enemy stats and create strategies that are fun and challenging, like only some fleeing and regroup. And all of that would need to run over a really good pathfinding AI and so on.

I hope this post made some sense.
AI is just very hard to code and to design.
Logged

filosofiamanga
Level 1
*


View Profile
« Reply #8 on: June 03, 2011, 08:00:04 PM »

If an enemy had really common sense, they'll flee seeing the  hero that already decimate 1.000 of thier pals.

There'll be no game.

Good one  Cheesy, or they could be suicidal (but not stupid) and want to avenge their dead friends.


this is a big issue but yeah, we aren't creating simulations, we're creating games. you don't want to play a game with enemies that are too intelligent because you'd never win. you want to play a game with large numbers of stupid enemies so that you can shoot a lot of them and not be in any danger yourself

of course this varies by genre; some genres have need for more intelligent enemies, such as stealth games (like metal gear solid)

Ok, I'm starting to bother if people caugh what I was trying to say, I'm not meaning real AI nor simulations of real life, also I'm not talking about making "Deep Blue" kind of AI that beat Gasparovs players in real life.
Fuck no, I didn't mean HARD AI or Academic AI.
Yeah, It's awesome to kill thousands of stupid enemies, what I'm talking about It's their AI design, by AI I mean their patterns.
Fuck, I don't see how enemies more interesting in their patterns (aka more inteligent, even if it's a broad epiteth) can be a worse game.

I'm talking about Finite States Machines, I think if their design is well made and enemies have basic "patterns" or "tactics" that really show "common sense IN THEIR AI DESIGN" It will be a better and deeper game, not only as challenge but as game experience.

Why I talk about Fighting games?
Because they're a great example of how we could make a "challenging" enemy that looks "inteligent" even if it's a hoax.

Also I don't see how the enemies having at least one or two tactics where they work togheter can be a bad thing, I remember It could be extremely challenging but still players will beat it after some time (Like In cave story last level after you catch curly where there are the falling blocks and the little angels).

As the player being in danger they could be weak but If they work toghether using Fighting game's AI and working togheter I could see them as being Challenging and dangerous IF working in group.


Finite state machines aren't magic. Common sense includes a lot of things, and (depending on what sort of game you're making) implementing it requires considering several factors that add up to many possible situations.

Unless you're willing to plan out an intelligent response for each possible situation - and that's going to take a long time - you'll probably end up with at least one situation where the AI behaves stupidly.

Ok, I should be more explicit, but I wonder why you didn't catch it If I was really explicit when talking about "I robot" AI still years ahead.
I'm talking about the common sense of their DESIGN, stuff that any good designer can see easily when imaginating the game being played in his mind.

Yeah, AI will become stupid to some players after a while, but I'm talking about basic stuff that is real "common sense" for the player. It's imposible to come with all posible situations, but a game designer can at least to say: Hey, this it's the supossed way of how you should play the game! so the enemies can come with this counter-tactics to the player.
I'm talking about the "common sense" the designer should put in their games, I'm not saying 100 situations the designer think before hand, but He could come with basic tactics for the enemies like dodging bullets and runing away from falling grenades.
I'm not talking about making Turing proof game AI, I'm talking about a better DESIGNED game AI (even if it's Finite State Machine).

About FSM beign magic, I said: yes, If They're well designed it could really do magic.
Remember Pacman?, it's extremely easy to code but some players really feel the ghost are smart and even could tell you that the ghost are really intelligent and they even come with evil plans to ambush the player.  Cheesy

"common sense" as you call it, is one of the biggest open challenges in AI, and many researchers think that common sense largely means "intelligence" as the one needed to pass a Turing Test...

so there's no common sense in gaming because it would be seen before in Google, or robots, or cars, or ...

Fuck, seems people only read the title but not my post, I said again: I didn't mean REAL AI like in Asimov's books, I'm meaning a game AI that really trick the player, make him think: Wow, this monster really ambush me and surprise me, maybe he's really intelligent.
I see sometimes that in KOF 2002, even if it's a little dumb because It's a FSM (Finite State Machine).
I easily can see that FSM made if the monster have a pre-scripted set of rules that allow emergent gameplay.
An example could be the Flocking algorith:
http://en.wikipedia.org/wiki/Flocking_(behavior)
The flocking algorith only has three basic rules but they cooperate to create a complex behaviour.
I wonder how will be a game where a monster has a set of rules in their FINITE MACHINE AI that even has some rules to cooperate with other monsters, maybe this simple rules of monsters working together could make some really complex emergent behaviours.

That's what I'm talking about: a BETTER DESIGNED game AI that trick the player and make him believe the enemy is really smart, even if IT'S A HOAX.

Maybe I should change the title, is missleading, although I like it.


Chrono trigger, half life 1 and halo say hello!

It's a problem of writing behavior and having enemy that don't have a life span of 3s total!

It mean you need to broadcast to player correct intention, correct behavior and correct emotion of enemy. The reason Halo enemy seems intelligent to so many player is simply the voice clip and exaggerate movement, there is also explicit social hierarchy.

But if you want to achieve that drop FSM and look for behavior tree.

I think it's because It need a longer design, maybe some designers are lazy when thinking about enemy AI, they seem to think: Oh well, why we need smart enemies that live only 3 seconds?
But I wonder why game designers can't come with this aproach:
- BASIC BEHAVIOUR: Has the basic stuff in their AI like walking, jumping, A* algorithm.
- BASIC FSM: How all the enemies behave bassically, things like attacking on sight.
- Emotional FSM: Things that are really "common sense" like wondering why a near pal died and the enemy can't see the player.
- Specific FSM: Things that are specific to each type of monsters, basic Tactics designed before hand to confront how the player will play, an example is the Fighting game AI.
- Co-operative FSM: How the enemy will behave if he has a certain type of pal, valid tactics and strategies that make them work together, again, This could be general to all the enemies.
- Level awareness FSM: Maybe the enemy will pull a trap hidden in the level, surprising the player.
***
These are the basic, but I can come with other FSM to make it more complex.
***
- Learning FSM: The game put a dummy AI in the place of the player, and check it againts the enemy AI database, and If the player make a better performance, they learn it as a new rule (maybe it's really dificult to code, I don't know).
- Foreshortening FSM: The enemy just make a virtual evaluation of which combos or successions of moves produce a better result, It's like when in Chess the AI think 2 or 3 moves ahead.

I can easily see this made as a big FSM database, also they could have a hierarchy like the Basic Behaviour having priority over Level awareness or Specific FSM over co-operative FSM.
If you're worry about all of this, all the monsters could share all the code in these FSM categories, except in Cooperative and Specific FSM.

I think any good coder can come with more "efective" ways like Fuzzy logic or behaviour tree.
But I say FSM are good is because I believe in them, also they're cheap to develop and code.


 Angry Angry Angry
Remember Pacman?
Why It's one excelent AI that still today is good?
Because each ghost has it's own AI "behaviour" that it's a simple pattern, a fixed path in the level, and they seem to work togheter in their design.
In each intersection they just choose randomly to follow their pre-fixed path or chase the player (That's the entire game AI of pacman  Cheesy)
It's simple but It's excelent design and each ghost seem "aware" of the other.
« Last Edit: June 03, 2011, 09:48:43 PM by filosofiamanga » Logged
filosofiamanga
Level 1
*


View Profile
« Reply #9 on: June 03, 2011, 08:25:59 PM »

I believe that using the word "Common Sense" could give some people the wrong idea about your post, but I do understand what you're talking about...

Thanks, I like your post.
Yeah, "common sense" maybe it's the problem, now I'll talk about "better designed AI".

Something great I read in one game AI book was:
Game AI doesn't need to be complex, It needs to trick the player into making him believe the game AI is smart, just that.
That's why I love the Pacman example.

I also think games feel smarter with this "pre-baked" responses, why?, because they're fast and the enemy seems like making a reflex instead of slowly make a responde that many times is not as better as the "pre-baked" response.
Also these "pre-baked" responses are faster in computational terms, so they're better if there are many enemies in screen.

I also share your concerns, that's why I favor a simple FSM, they're simple to code, test, debug, than a neural net or other kind of high complex algorithm.
Also there's a lot of low complex solutions to solve the problems you mention, like a level full with Nodes (pathfinding), those make a good work with low complexity in terms of "computacional hunger".
Like I said, game AI doesn't need to be complex, it needs to trick the player so he believes the game is smart.

I like your "hivemind/director" solution, sound interesting, maybe you could talk a little more because I'm very curious about it.

I also agree with game AI beign very Hard to code, about the design, It's very fun and stimulating to put one himself in the enemy shoes.

Thanks for posting.  Smiley
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #10 on: June 04, 2011, 03:31:07 AM »

I personally really like the idea of social hierarchies among enemies. It's a shame Halo and Stalker seem to be the only games that implement it convincingly.
Logged
baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #11 on: June 04, 2011, 09:08:28 AM »

The Pac-Man ghosts are a perfect example - as they "seem" to be aware of one another, simply because they're programmed to behave differently. But they're NOT aware.

Something like what you're talking about comes down to a few factors:

Anticipating the average player, level design, and having natural reactions to one another.

Anticipating the player is pretty basic, but this also should somewhat coincide with player character design. A good example of this is MegaMan's Robot Masters. Little parts of them are on auto-pilot, like their horizontal speed... but what most average players don't realize is that their button presses often control the RM's, too. For example, pressing the "shot" button causes some of them to jump and sometimes counter-fire. Learning this is how "pro" MM players make the bosses look so easy, they've learned to manipulate the bosses with their controllers. In fact - every MM game from 3 on has at least one boss that WILL NOT MOVE until you press the controller somehow, such as Freeze Man in MM7. (He's cool like that.)

Level design is probably the most common of these that's actually applied to games. It's basically about giving each enemy one simple, particular role, and then grouping them together for effect. When you face a pair of Hammer Bros. in SMB, for example, they're usually spaced about 4-6 tiles apart from one another horizontally - this is done intentionally, as that's about where the arc of their hammers peak vertically, allowing each of them to provide a bit of coverage for the other. They way Bullet Bill cannons are spaced and offset from each other provides this effect, as well. And don't even get me started on Ninja Gaiden and Castlevania (again).

Having natural reactions to one another seems to be a point this thread is trying to create - which is a little more tricky in nature; but it also simply comes from putting the two of these concepts together. Enemy "objects" don't have to interact exclusively with the player - they can influence one another as well; and many bosses or other two-stage enemies will change tactics once they reach a certain HP - this can be done with a behavior tree, or simply by "changing" to another identical-looking enemy object with a different behavior tree as well. Not every enemy has to react to every other enemy either - you could make little 3-4 enemy-type groups, with decisive tactical intent, and simply regroup them as levels progress (early levels have standalones, then pairs of them used in groups, later ones create complex "trap plans" where taking out one factor leads to a totally different reaction).

The reason why the latter is underutilized is because it's considerably more work that, unless used really well and creatively, has a fairly low payoff that's quickly blown through; especially compared with the relative simplicity of the previous two.


Sinclair: Koei's "Warriors" title is sorta convincing in that regard, too. (Samurai/Dynasty/Orochi)
Logged

SirNiko
Level 10
*****



View Profile
« Reply #12 on: June 04, 2011, 09:33:42 AM »

The MMO "Mortal Online" featured a slightly more complicated AI scheme for monsters. They had morale, which was calculated by the strength of the monster, the strength of the player, and the number of allied monsters in the area. When morale hit certain thresholds, it would drive the monster to attack more forcefully, flee, or call reinforcements as needed.

In practice, however, it was not so common sense. If the player found a small field of fluffy bunnies, attacking one would cause it to fight back. If you injured the bunny a bit, it would fall back towards the other bunnies, then the whole field of bunnies would charge you and chew your legs off in a couple of seconds. Logically, it makes sense - twenty bunnies are clearly stronger than the player and therefore it makes sense you die to them, but it makes it unnecessarily difficult to get rabbit pelts.
Logged
filosofiamanga
Level 1
*


View Profile
« Reply #13 on: June 04, 2011, 10:09:15 AM »

The MMO "Mortal Online" featured a slightly more complicated AI scheme for monsters. They had morale, which was calculated by the strength of the monster, the strength of the player, and the number of allied monsters in the area. When morale hit certain thresholds, it would drive the monster to attack more forcefully, flee, or call reinforcements as needed.

About the dificulty, you can design obvius flaws in their tactic so players can kill all the enemies.
An enemy could choose randomly a tactic that is counter-productive like making an slow magic that makes very little damage to the player (even a random damage) that is "supposed" to kill the player, but It kill their pals, so the enemies start fighting each other.
These "flaws" or weak tactics they use can be used to make funny and comical effects, like an enemy hitting other "type" of enemy and these two types that "hate" each other start fighting between them, cursing each other with loud bad words, It would save the player a lot of effort, seem funny and "trick" the player to think they're smart and really hate each other.
I remember powder doing that.

The Pac-Man ghosts are a perfect example - as they "seem" to be aware of one another, simply because they're programmed to behave differently. But they're NOT aware.

Yeah, Game AI doesn't need to be like academic AI, what it needs it's to trick the player into think the enemy is smart. It's like a magician, tricking us.
But that comes down (ultimately) is to their design, the "common sense" behaviours that they should have.
I think it's not that complex, you gave us many approach I liked, like grouping enemies in "AI groups" of 3-4 enemies types. The game designer could even make a "Basic AI" to all the enemies and then each type receive one or two aditional tactics.

About beign low pay-off is true, but It's a little detail that could increased the perceived "value" of the game.

I used to love Orochi Warrior 5 for PS2, but It bothers me that the minions doesn't fucking do anything, they walk and run to specific points in the map, acording to the level state, that is good, feels natural and make us feel they're smart, even if it's a hoax.
But they don't do anything in the game, they only seem to flee, that's good, but most of the time they stand still, waiting to be killed. That kill a little the ilussion.
I think a good design can solve all these problems:
What about making these minions or goombas attack like in some movies like the Chinese movies or Matrix 3 (with all the agents smith).
These minions could surround the player making a circle, having a max number of minions that attack you and the others waiting for their turn, but the surrounding cheering their pals.
See? These are the "common sense" that I'm talking about, and these stuff doesn't need complex coding stuff, most of the times It only need an animation to show an emoticon or dialog.
« Last Edit: June 04, 2011, 10:17:55 AM by filosofiamanga » Logged
mirosurabu
Level 4
****


View Profile
« Reply #14 on: June 04, 2011, 10:12:50 AM »

The biggest problem with some of the ideas you posed is that they add unjustified complexity that introduces balancing nightmare. Some of the ideas are fine though, like the monkey from Spelunky, but majority of them is just luxury.

Like:

Quote
being scared and flee when low HP.

What exactly is interesting about this behavior?

If I was playing an RPG and I encountered an enemy like this I would be really annoyed because it's moving my focus away from mastering the combat to making a very uninteresting decision between a) hunting the enemy and b)ignoring and avoiding such enemies.

Quote
Emotional FSM: Things that are really "common sense" like wondering why a near pal died and the enemy can't see the player.

Is this just for cosmetic reasons? Or does it have impact on actual gameplay?

If it does, then it must be put in some form of context. Otherwise it's just plain luxury which doesn't justify the effort that has to be put in balancing this kind of thing.

Any ideas on when this could be useful in games?

Quote
- Level awareness FSM: Maybe the enemy will pull a trap hidden in the level, surprising the player.

Now, this one is really strange, because it's exactly like generating a random trap in a level, except you make it so that players can blame it on some enemy. Looks like a luxury to me.

(EDIT: had to tweak my post to make myself clear; sorry about that)
« Last Edit: June 04, 2011, 10:32:11 AM by mirosurabu » Logged
filosofiamanga
Level 1
*


View Profile
« Reply #15 on: June 04, 2011, 10:59:06 AM »

....

The biggest problem with some of the ideas you posed is that they add unjustified complexity that introduces balancing nightmare. Some of the ideas are fine though, like the monkey from Spelunky, but majority of them is just luxury.

I agree with those details beign luxury, but It's the same luxury you complain about it like the number of polygons in the models. More polygons seem to be a luxury but everyone agree the game looks and feel better with those "extra" stuff.

****
****
I'll address a couple of your suggestions and as you will see I will not argue the difficulty in coding AI at all, because I really think that's not the problem.

Quote
like Being scare and flee when low HP.

What exactly is interesting about this behavior?
If I was playing an RPG and I encountered an enemy like this I would be really annoyed because it's moving my focus away from mastering the combat to making a very uninteresting decision between a) hunting the enemy and b)ignoring and avoiding such enemies.
Besides that, designers would have a lot of trouble balancing the game.


It's just a general example, but you as designer can come with ingenious solutions to the flaws the playtesting stage will show.
In that particular case, the enemy can come (if low HP) with two outcomes: Beign anger and attacking the player or beign scare and fleeing. These random choice gives a feeling the enemy make a "real" decision, because no all the monsters behave the same. And It's just a random boolean (a random between 1 or 2).
You can even make conditions to the fleeing behaviour, like if the monster "saw" you killed a lot of their pals, and you can mix it with the random choise of becoming anger and scare.
I think the designer can come with solutions if he work togheter with the coders.

***
***
Quote
Emotional FSM: Things that are really "common sense" like wondering why a near pal died and the enemy can't see the player.
Is this just for cosmetic reasons? Or does it have impact on actual gameplay? If it does, it would probably add a shitload of complexity to the game which would result in balancing nightmare for developers. And I don't really see the fun in it. I just see luxury i.e. being able to say "OMG, THIS ENEMY IS SO REAL!".


You're right in that they're mostly cosmetic reason, but they can also affect the gameplay like the white mage that heals their enemy pals. And these kind of stuff can be used by the player sidekicks or the NPCs.
I can give you the same example with graphics: Why we need the graphics of PS3 (number of polygons, teselation, etc.) if we can make great 3d games with Psone graphics (less number of polygons). It makes a more inmersive game.
Although that also depends on the original game purpose and design, we don't need this for genres like Racing, Sports or 2D traditional Fighting games.
But I can see these kind of ideas good for genres where you must kill a lot of AI enemies.

****
****
There really needs to be context behind this kind of idea. If there is no context, there is no value in this idea. If you try and come up with a context for this sort of idea now, you'd probably end up with something not so interesting on the surface. And surface value is one of the very important values when making games (some will disagree with me though).


Yeah, I deeply agree that these are just floating ideas without a "real" value, but I like to use them as just very broad and general examples.
At the end, everything depends on the game purpose and design, even the genre can dictate which behaviours will be better.

****
****
Quote
- Level awareness FSM: Maybe the enemy will pull a trap hidden in the level, surprising the player.
What would be the point of this? It's just like generating a random trap in a level. Again, you must have some sort of context for this kind of idea.

Again, that depends on the game design, even in Spelunky we feel great when the spiders or bats are killed by the trap's arrows. I did mean the enemy use the trap againts you, but that's not mandatory, the trap can also kill the enemy (making a funny effect).
But I wasn't talking about roguelikes and randomly generated levels, I was talking about levels pre-designed, maybe It's usefull for platform games.

****
****
The bottom like is that you can't just think of X number of ideas that would make you appreciate the AI's intelligence. It's some kind of luxury top-down design approach.

No, they're not supposed to be used on games, but more to "show" some general examples.

****
****

Why we should care about enemies behaving complex?, well, because they a big factor in some games (like Beat'em ups).
Remember the flocking algorithm?
Some few fixed rules that work in synergy that creates a complex behaviour.
That's what I'm talking about, a Better GAME AI that has "common sense" in their design, maybe making emerging behaviours in the game.
« Last Edit: June 04, 2011, 11:28:47 AM by filosofiamanga » Logged
filosofiamanga
Level 1
*


View Profile
« Reply #16 on: June 04, 2011, 12:18:40 PM »

I think a good way to create this is "emergent AI" and "complex behaviours" epithet in our games is to make this way:

- Create several very general FSM, each one representing one type of Mood (like aggressive, pacifist, shy, good heart, etc.)

- Each character will choose one Mood or behaviour randomly when they're created.
- Each of these "general" behaviours have diferent tactics.

- You could give several categories (like type of enemy, type of weapon in hand, type of body, experience of the enemy, etc.) more specific (enemies could have more than one of these) that will give one or two more new tactics.

I think that way you could re-use the "AI FSM" at most and each character will behave diferent.
Logged
Sankar
Level 0
***



View Profile WWW
« Reply #17 on: June 04, 2011, 12:59:49 PM »

I like your "hivemind/director" solution, sound interesting, maybe you could talk a little more because I'm very curious about it.
Its not the same as my idea, but half-life 2 engine in Left 4 Dead and Episode 2 (some scenes only) used the idea of a "AI Director". The game basically keep track of how well you're playing, how much health and first-aid kits you have, ammo, what happened recently. So, the AI director decides how many zombies will spawn, when they will spawn, where, what special zombies will show up. This way, the game is constantly rebalancing itself, while giving the players a challenging experience but not brutally unforgiving.

Now, my idea of "hivemind" AI, is that while every enemy has its own AI routines (like walking and attacking), there would be a more "Global" AI, that would control some of the more "unusual" behaviors, like fleeing.
If every NPC can decide to flee or not, this can create some boring situations like:
You're fighting against 100 skeletons.
They have 40 Hit-Points
You do 39 damage per move.

Now, having 1 HP is a GREAT reason to flee, so what happens if every enemy can decide to flee or not? Probably a pretty boring combat where every hit isn't enough to kill, but enough to make enemies flee. And you can't reach them since you're surrounded by attacking enemies, and this will unbalance the game, because most probably you expect some health/mana from killing enemies.

Now, with a Hivemind AI. the AI would decide about fleeing, analyze how many NPCs would flee and even add some randomness to it. Now, I'm talking about real-time combat, of course.
With a Hivemind AI, enemies work in group and the AI can make interesting decisions. Like only flee after 80 skeletons were killed, make some enemies stubborn enough to stay behind, but make groups of "not-hit" enemies feel afraid.

Now, of course, the AI has to make itself noticed. Like using voices, facial expressions or whatever is possible, to let the player know its just not some "random AI".

Fleeing, Formation, "Using props/traps", Hierarchy, Memory. All this can work, and amaze the player, if its:
1) Noticeable
2) Well Implemented.

People usually hate "fleeing" because most games PUNISH you with fleeing enemies, you get no gold, no reward, no XP, no mana... Nothing. If its a 3rd person game you have to run to catch them and most of the time you get yourself in trouble for this. And in traditional turn-based rpgs, its even worst. You get 0 Xp for fleeing enemies.
Its all about balancing and not using as "gimmick".
An RPG that allows your enemies to flee, can be cool if it gives you a reputation of being "merciful", and characters can talk about it. Maybe even some strategical background behind it, like if you pursuit a fleeing enemy, you may find it doing some really dangerous "cornered-like" manouver, that can really hurt you. But if you let all your enemies flee, they regroup and strike you. And of course, this can't be random, so it needs to be presented to the player this strategical idea, that enemies fleeing is something "fully supported"...

AI Should make itself be noticeable and the player should be informed. Cause most of the times we just expect games to "not have" things. How many people know that in X-Com, you can plan your attack against some enemies by taking advantage of their memory? Some enemies forget your position after some turns. I was amazed, thrilled, happy, shocked when I found out about this... And its such a simple AI coding.

Logged

mirosurabu
Level 4
****


View Profile
« Reply #18 on: June 04, 2011, 03:09:45 PM »

Quote
I agree with those details beign luxury, but It's the same luxury you complain about it like the number of polygons in the models. More polygons seem to be a luxury but everyone agree the game looks and feel better with those "extra" stuff.

Absolutely! More polygons is more luxury. And now that I think of it, it's also more polish - it makes things look more interesting without increasing complexity. I'd say that the same applies to [some of] your ideas, in that you do not suggest making NPC's more complex, but instead more polished, as there is no considerable strategical significance. (there is huge difference between the two in my mind; any change to core strategy design leads to balancing headaches, whereas polishing is quite straightforward and cheap)

I'm pretty sure Assassin's Creed did something like this. When you get into combat and do very well, the remaining knights would occasionally run away. It makes no strategical difference, but it acts kind of like a reward for doing very well early on. I'm pretty sure you can use this kind of thing for other reasons too, like, for example, making battles and opponents feel more varied.

EDIT:

To give an example, imagine you are fighting 5 knights. You beat 4 of them flawlessly and face the 5th remaining knight who has a 30% chance of running away, 20% chance of becoming angry and aggressive and 50% chance of being normal. Makes very little strategical difference, but makes combat feel far more varied.
« Last Edit: June 04, 2011, 03:23:10 PM by mirosurabu » Logged
filosofiamanga
Level 1
*


View Profile
« Reply #19 on: June 04, 2011, 05:08:16 PM »

To give an example, imagine you are fighting 5 knights. You beat 4 of them flawlessly and face the 5th remaining knight who has a 30% chance of running away, 20% chance of becoming angry and aggressive and 50% chance of being normal. Makes very little strategical difference, but makes combat feel far more varied.

Yeah, that's other way to put it when you said about the polish in a game.
I want enemies more polished in their behaviour or performance.
Many times is not adding code or complexity to the engine, it's just making "obvious" stuff that make us feel that enemies and NPC are "smart", like putting a dialog, an animation, an emoticon over his head.

I can go on with your Assasins creed example.
Imagine in a RPG you have a fight with some soldiers, It's really "Common sense" that the NPC react to this.
Seriously, what would you do if you see some guys fighting in the street?
Maybe some NPC go and watch surrounding the fight, maybe some little girl will cry and run to seek her mother, a tough 13 year old boy will cheer you, maybe a fearfull peasant will try to help you attacking the soldiers.
See? Common sense!

Another example: Remember the shopkeeper in Spelunky?
Well, if you steal he get's mad, and if you destroy his store he will make you pay.
That's the "common sense" I'm talking about.
Well, in that case we think the shopkeeper is smart, we feel he has common sense, that he is a real character and not a sign like a NPC in a SNES rpg.

EDIT: Why people seem to think that fleeing enemies is bad, actually could be a good thing like the enemy droping gold or items when flee or making the NPC in the town saying:
Wow, you're really strong!
Or the girl you being doing missions so she falls in love, she get's real impressed by the enemies fleeing (your love points increase).
Second Edit: Another way to solve the hunting problem when enemy flee is easily solved by making the enemy becoming really slow when fleeing.
Another way could be the enemy fleeing in circles, really no going nowhere.
« Last Edit: June 05, 2011, 08:34:30 AM by filosofiamanga » Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic