• 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
Nathan2222_old

Just a bit of info for newbie

8 posts in this topic

I'm still learning c++ but i just wanna get preliminary info on game AI.
Is AI really hard, like harder than coding c++. From what i've seen, AI is the code, i'm not sure.
Let's say i were to create gta style game, how hard will it be to code AI for the NPC's, enemies, cops (maybe animals, zombies). Will it be too hard or just involve a lot of coding.
Another question is on learning AI. For example, in that gta game you fail a mission (there may be no last checkpoint). You go about doing other missions and then you meet the guy that escaped in the mission you lost in another mission. Is it possible to make that guy (enemy) remember how you fought him i.e. he'll remember what weapons you used, the mistakes you made and the mistakes he made, when/who you called for backup (if you did) and he'll try not to make them again and exploit your mistakes.
Is it also possible to make learning AI for NPC's and police. For example, in that gta game, an NPC sees you killing/beating someone and he calls 911 and then the cops arrive and start chasing you, you manage to escape to your safe house. 2 days later that NPC sees you and recognises you then alerts the cops but u don't know he/she (the NPC) has alerted the cops. The cops learn that blowing their sirens chases you off so they come in an undercover vehicle (maybe a taxi) and catch you by surprise. In that case, both the NPC and cops learned from their mistakes.
(I'm not making a gta game now, not until i am experienced. Just used it as an example because it focuses on the game genre i like most).
I asked in another forum but didn't get enough opinions (only 1)

Thanks for the help.
0

Share this post


Link to post
Share on other sites

AI essentially involves making the computer do some action to achieve some outcome.

This means you must know both what you want to achieve, and which actions should be done to get there. This might involve the AI having to choose between various possible actions, depending on varying states. E.g. check to see how much money the AI character has to decide whether to buy a rocket launcher or a baseball bat.

 

AI logic can be written in C++, or any other language that the game uses, even scripting languages (if supported). The main implementation issues are usually not (as far as I've noticed) language specific, but being able to actually describe all the states, conditions and actions possible.

 

AI can be extremely simple (like a super-simple card game, always draw a new card if your current hand is worth less than a certain amount), or insanely complex. This depends entirely on the game, and what the designer wants to achieve with the AI.

As an example, for a lot of games it's probably easier to make an unbeatable AI than AI that is fun to play against.

 

Regarding your questions of if this or that possible -- generally, if you can properly define exactly what you want to happen, the answer is yes - it is possible. In some cases it might be unrealistic to achieve, but that's a different topic.

 

AI that learns and alters its behavior dynamically is generally a lot more complex than AI which does not, and thus also more difficult to create.

---

EDIT: Plus the stuff frob said.

Edited by CoreLactose
2

Share this post


Link to post
Share on other sites

You might want to refine "learning" from their mistakes.

Thanks. If by 'refine' you mean explain, i mean like the cops chase you and maybe you escape to your safe house or hide (like in nfsmw). Another time you get in a cop chase, they remember what you did, whether you were scared when they shot at you etc. then they rethink their strategies, maybe you escape. Say an NPC sees your wanted photo on a billboard and sees you on the road, the NPC calls the cops. The cops realise that a chase won't stop you and shooting won't scare you so maybe they come in an undercover vehicle like a taxi and you won't know they are cops. Most likely they will catch you by surprise. The cops 'learned' from the two previous events and got better strategies to catch you. I hope that's clear enough.
Say there were a lot more scenarios if you keep beating the cops. How hard/complex would coding it in c++ be in an open world game (i'll be using c++)
0

Share this post


Link to post
Share on other sites
Another example would be watchdogs. If you've watched the demo videos, you'll see that almost everytime the cops start chasing him, he hacks the road blocks and the cop cars crash into it or he causes a blackout (in all the videos i've seen). Learning in this case would be for the cops to drive at just the right speed so that when he hacks the road blocks, they are able to decelerate and not get killed or carry a torchlight so that whenever he causes another blackout, they are not stranded.
Do you get what i'm saying?
0

Share this post


Link to post
Share on other sites

Yes, those things are possible. 

 

One option is for you to build a long list of possible things to change, and then adjust the behavior based on scripted rules. You (with your designer hat on) need to write those rules.  Then you (with your programmer hat on) need to write a system that runs the rules.  Then you (with a combination of designer hat and QA hat) need to tune these to be fun.

 

Another option is to make a long list of possible options and then use genetic algorithms to refine what happens over time; this is moderately complex and will require some significant work. These are difficult to fine-tune, but it can be done if the designer is very, very, very patient. Unfortunately it is difficult to make designer-friendly genetic algorithms.

 

Another option is to use some combination of reinforcement learning algorithms, which is even more complex than the two above. You could make an MDP but training it can be a pain and it is nearly impossible to fine-tune for fun game behavior. There are other algorithms out there that can produce ideal or near-ideal behavior but really are impossible for designers to manipulate.

 

 

Just beware that a perfect or ideal AI tends to make for bad games. Instead you want a system that allows for the player to struggle but ultimately win, and that can be adjusted for any skill level. Machine learning algorithms are usually a bad fit because often they can easily outmaneuver a human player.

2

Share this post


Link to post
Share on other sites
@frob: I'm guessing i'll need a lot of hats to make a game :).
From your first option, that's gonna be a really long list for most of my games. Hmm, maybe i should build ...
Will freeform NPC's + scripted NPC's work with this.
0

Share this post


Link to post
Share on other sites

@frob: I'm guessing i'll need a lot of hats to make a game smile.png.
From your first option, that's gonna be a really long list for most of my games. Hmm, maybe i should build ...
Will freeform NPC's + scripted NPC's work with this.

 

If you're going to do this all by yourself, you'll be needing all the hats in all its different flavours and colors ;)

 

With freeform + scripted NPCs I am going to guess you mean NPCs that just wander around the level, but can also react to specific things. This is perfectly doable, the way I see it, it's just part of the scripted behaviour. Almost everything is possible I would say, but the more complex you want the AI to be, the more computing power it will take, the harder it will be to program, harder to tune etc.

0

Share this post


Link to post
Share on other sites

@frob: I'm guessing i'll need a lot of hats to make a game :).
From your first option, that's gonna be a really long list for most of my games. Hmm, maybe i should build ...
Will freeform NPC's + scripted NPC's work with this.

 
If you're going to do this all by yourself, you'll be needing all the hats in all its different flavours and colors ;)
 
With freeform + scripted NPCs I am going to guess you mean NPCs that just wander around the level, but can also react to specific things. This is perfectly doable, the way I see it, it's just part of the scripted behaviour. Almost everything is possible I would say, but the more complex you want the AI to be, the more computing power it will take, the harder it will be to program, harder to tune etc.

Right now, i'm getting my programming hat (purchase still in progress . . .), my modelling hat is not fully painted so it's a 'hatty' future for me.
0

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