gamer_prog

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

99 Neutral

About gamer_prog

  • Rank
    Newbie
  1. How does ai spot enemies

    Ok cool. Do you have or is example code I can use? Basically to try it out? And is there any other code, not GPU usage code, that is used for this? Or do all games use raycasting in general? Just to be sure.
  2. How does ai spot enemies

    Ok. So the raycasting is like "pinging" the range or view it is looking at and if there is a unit and nothing blocks it, it will return a potential line of sight? How do games in general do it, outside of the raycasting as you mentioned? Is this the best way and most common way of doing it? Is there some example code how to implement this into a game? Not just for raycasting but how ai spots enemies in general.
  3. Hi, I was wondering, and like as much information on it as possible, how does ai spot enemies in games, FPS for the most? How does the general idea work, the code and mechanics? Is it just by a set distance that the ai would automatically "see" you or spot you based on script or game engine (for the obvious reason it cannot actually "see", it has no physical eye)? Or does it generally use a "view cone" or anything such? And how do you combine those elements into a working functioning game or code part or engine part? How does it work down, what steps does it go through or cycle through in order to get the final result "it has spotted an enemy unit"? Something I can work with, that works. Something realistic. Thanks.