AI in Gamesalad
Auric
Member Posts: 35
Has anyone had success creating decent NPC AIs? I've been toying with several game designs, but without the ability to have a good enemy AI, they just will not work.
Thoughts?
Thoughts?
Comments
What I mean is, the AI basically HAS to be able to access other actor's attributes. If it can't figure out where the nearest wall is, or can't find a path to navigate around the walls, it obviously isn't a very good AI.
However, if you modify 'code' within the prototypes in a scene, actors can access other actors' attributes.
So while I don't think it is worth the effort, and believe you would encounter unknown errors causing the AI not to work as you'd like in GameSalad; it is possible.
NPC = Non Player Character
WHat does the actor need to do?
Plan individual scenarios with responses for each one.
15 scenarios with 15 responses can make some pretty great AI in a small game.
Even the most complex game AI basically works like that.
Get out the ole white board and start making a list of what the enemy actor needs to counter and how.
Example
in hockey you would want something like
if the puck goes to the left, actor goes to the left. GOes to the right, go the right.
Stays behind the middle longer than one second guard goal in the middle.
Stops in the middle, move towards and make contact etc, etc
Luckily GS is really set up for this sort of scripting
I'm saving the detailed explanation of my AI method for my GameSalad: Textbook.
...but here's some interesting commentary....
I never really worried about a robot army taking over the world... but today I could feel a little terror. For example, regular humans will never be able to beat a computer at Pong, not unless the computer is programmed to give us a chance.
But humans can think right?! We have the ability to make choices... but where does that choice come from? People have rules and they also do things randomly... like sometimes I feel like eating chocolate ice cream, sometimes I like vanilla. And then there are involuntary actions... if a room is dusty, I might sneeze. It seems that rules and randomness determines my choices... how I act... so what's different between me and the "program" that I made today?
I think therefore I am... but what is thinking?
Self-aware is something that I would hear on Star Trek. This is somehow significant. I am self-aware, but my program is not. It's only doing what I programmed it to do, nothing more than an advanced machine. Even so, that the line between people and computers just got a little blurry for me today.