Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

AIMain.cpp is 7kloc. Searching for relevant words yields nothing, but it's not impossible to code something along the lines of "if the players flies around like crazy, do one thing, if he sits in the corner, do another".


I don't know how much Descent 3 shares with the original in terms of AI code, but Descent 3 seems to give NPCs a dynamic list of goals that's initialized based on their class ("stalker", "evader", etc.).[1] Each goal has a priority/weight, and criteria that will cause the goal to be enabled or not. Some of the goal enablers are straightforward, but others look more like state machine "emotion" states - fear, curiousity, etc.[2]

Seems complex enough to meet the description on the box for the original Descent.

[1] https://github.com/kevinbentley/Descent3/blob/86141b82295e71...

[2] https://github.com/kevinbentley/Descent3/blob/86141b82295e71...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: