Hacker News new | comments | show | ask | jobs | submit login

Most AI in games are simple.

Either state machines or behaviour trees. So they're designed to be quick to execute by design :)






Also they tend to have manager classes iterating over a list of NPC data, rather than lots of NPC classes and executing "run" methods.

Edit: undo autocorrect typos


And while you're iterating the same code over many NPCs, you could take great advantage of GPUs and gain significant performance by running all those NPCs in parallel.



Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: