• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Medo Mex

AI Character Decision

4 posts in this topic

I'm getting started with Game AI, especially Character AI.

 

1. Lets say I have bunches of enemies attacking the player, how they should take a decision to hide or attack or move somewhere else, etc...?

 

2. When they hide, how they should determine the places they will hide while making sure that the player can't see or fire on them directly?

Edited by Medo3337
0

Share this post


Link to post
Share on other sites

There is a technique called 'influence maps' where  you projects where the enemies are and where you and friendlies are to try to figure out what to do in a situation.     Getting more of your guys to fire at your targets and not have them fire at you  (try to outnumber them etc)  or retreat from them  or find a path where you can avoid them enemy etc...   Locations of power ups to move towards (ofeten combinations of all of these as in a fluid situation felexibility is often more useful than optimal actions.    

 

More detailed fire-fight analysis mapping of this type can use arcs of fire and blocking terrain to be very specific  about where you can have cover and /or shooting at a particular target.   More complex calculations can be planning future moves where Sequences of possible movements and potential reachable locations for the enemies are investigated to try to give you the best future actions to carry out.

 

Depending on how your game mechanics work  (simpler grid cell based games, vs full 3D ex- (where a unit might scootch/lean to the side a ittle quickly and trake a shot  and then return to the cover)

 

Another technique called 'planners'  help you organize an analysis of  a situation, explore options and prioritize actions (possibly with several goals in mind simultaneously(

Edited by wodinoneeye
0

Share this post


Link to post
Share on other sites

I worry that if he is "getting started in game AI", that jumping to planners isn't a good idea.

 

That said, to the OP... let me pose my typical n00b question...

 

If YOU were playing the part of the enemy, what would YOU consider? How would YOU make the decision? That's usually a pretty good indicator of how to think through your AI.

1

Share this post


Link to post
Share on other sites

'Planners' is just a methodology to investigate.for the OP

 

I found the mechanism itself to be trivial in comparison to trying to come up with  a valid evaluation system (since it comes down to selecting a 'best' solution metric which has to be the result of anylizing the situation )   The other area outside the basic mechanism is deciding what and how often  to reeevaluate  - a balance between processing and ability of the AI  to take opportunities when the situation changes.

 

----

0

Share this post


Link to post
Share on other sites

I recently worked on an AI program with the UDK, it was a simple AI but it make me wonder how to make a more inteligent and realistic AI? First of all, apart from the basic pathfinding, I'm kind of beginner when it comes to complex AI. But anyway, there is my answer to the first question of the OP.

 

1. Lets say I have bunches of enemies attacking the player, how they should take a decision to hide or attack or move somewhere else, etc...?

 

Each AI has a View and a Memory.

The View  stock what the AI sees at the present moment.
The Memory can be the position of ammo seen before, or an order (go to this point, kill player, etc...)

Depending on the View (enemy is shooting), the present characteristics of the AI (low health), and the content of the Memory (medipack seen at a close position, commander asked to kill enemy) possibles action would be decided and noted.

- Fleeing = (very low health = 15pts) + (not many allies around = 5pts) = 20pts
- Continue attacking = (ordered by commander = 5pts) + (brave = 5pts) + (I hate my enemy = 5pts) = 15pts

The next action will be the one with the most points. Here, the Fleeing action will be the next action.


 

2. When they hide, how they should determine the places they will hide while making sure that the player can't see or fire on them directly?

 

Something similar could be used to answer the second question of the OP.

An Ai would have tactical possibilities and a position. For example :

 

We have 3 AI against one player. Their basic tactic is to surround the player. Each Ai are assigned with a  position : center, left or right.
The left Ai will try to find the next cover in the zone right to the player. Same for the right side. The center won't move much. The goal og each Ai is to get closer to the player, or at least a good shooting distance.

To chose the cover, I guess we could add a variable determining how long the AI will stay under cover before moving. Or another corresponding to the distance without cover the AI is willing to go.

To resume the process, it would be someting like that :

1 - Decide global tactics
2 - Assign position
3 - For each AI, seek the closest cover available in the direction decided with their position.
4 - Repeat the 3rd step until getting at a good shooting distance.


Once again it's only a guess and not yet tested, . And has the poster above said, it's necessary to have 

a balance between processing and ability of the AI

 

Because, AI can be very demanding for the process.


Sorry for the long post but I hope it can give some kind of hints or idea :)

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0