That is a very clean GOAP implementation. FYI, GOAP was what made F.E.A.R such a cool game: https://www.youtube.com/watch?v=PaOLBOuyswI https://archive.org/details/GDC2006Orkin
GOAP has worked very well for us for an open-world game with tons of NPCs taking part in non-linear interweaving quest lines. Planning performance is an ever growing issue however…
AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
41–50 of 57 posts
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#42Author here, feel free to ask any question :)
related question to @Jemaclus above - why is C++ the popular language for gamedev? not C# or some other higher level language. is it only for when you're working on console games or does it also matter on desktop games?
Unreal Engine uses C++. You have boost, SDL, Ogre3D, Irrlicht, EnTT, ImGui, etc... aka: C++ has a good ecosystem for gamedev.
The "Zero Cost Abstraction" philosophy of C++ makes it easier to squeeze out the performance you want.
Unity (and recently Godot 4) uses C# but they are still relatively young in the field. We were making games long before those :)
I would not say it's "THE" popular language, but it does have an history.
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#43Earlier quoted context omitted.
GOAP has worked very well for us for an open-world game with tons of NPCs taking part in non-linear interweaving quest lines. Planning performance is an ever growing issue however…
I am looking to do same! What do you mean by planning performance? How bad is it?
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#44I've been working on a multiplayer (MMO-ish) game. Currently at the point where most of the core stuff is in place and now I'm implementing the A.I. Recently there have been some great links posted on HN regarding Game A.I, and I'm very grateful for it! Implementing A.I has been a ton of fun and not as overwhelming as I thought it'd be. I think my game will be dependent on "smart" A.I behavior so I'm really trying to…
Nice use case about Elixir! You should definitely write about it, I'm getting sick of the "We used Elixir/Phoenix/LiveView" articles out there. MMOs are one field where Erlang/Elixir can shine a lot due to their concurrency model, their fault tolerance, and especially no-downtime upgrades thanks to hot code reloading (very attractive to upgrade the server without disconnecting people).
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#45Earlier quoted context omitted.
GOAP has worked very well for us for an open-world game with tons of NPCs taking part in non-linear interweaving quest lines. Planning performance is an ever growing issue however…
I am looking to do same! What do you mean by planning performance? How bad is it?
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#46Earlier quoted context omitted.
Nice use case about Elixir! You should definitely write about it, I'm getting sick of the "We used Elixir/Phoenix/LiveView" articles out there. MMOs are one field where Erlang/Elixir can shine a lot due to their concurrency model, their fault tolerance, and especially no-downtime upgrades thanks to hot code reloading (very attractive to upgrade the server without disconnecting people).
I've been meaning to write a StarCraft 1 AI bot and put in the 24/7 SSCAIT tournament on Twitch but... never enough time. Elixir seems like the perfect fit, though it's unclear whether it can handle the computations when things get hectic.
My last project with Elixir was using Elixir merely as an orchestrator of static binaries (developed in golang) which were talking in JSON via stdin/stdout.
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#47Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#48Earlier quoted context omitted.
I've been meaning to write a StarCraft 1 AI bot and put in the 24/7 SSCAIT tournament on Twitch but... never enough time. Elixir seems like the perfect fit, though it's unclear whether it can handle the computations when things get hectic.
For performance intensive tasks, you could rely on Rust NIFs, there is this great project: https://github.com/rusterlium/rustler My last project with Elixir was using Elixir merely as an orchestrator of static binaries (developed in golang) which were talking in JSON via stdin/stdout.
And yep Elixir is an amazing orchestrator. But when the time comes I'll gauge whether I can't get most of the benefits with async Rust.
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#49Earlier quoted context omitted.
related question to @Jemaclus above - why is C++ the popular language for gamedev? not C# or some other higher level language. is it only for when you're working on console games or does it also matter on desktop games?
IANAPGD (I Am Not A Professional Game Dev) but, Unreal Engine uses C++. You have boost, SDL, Ogre3D, Irrlicht, EnTT, ImGui, etc... aka: C++ has a good ecosystem for gamedev. The "Zero Cost Abstraction" philosophy of C++ makes it easier to squeeze out the performance you want. Unity (and recently Godot 4) uses C# but they are still relatively young in the field. We were making games long before those :) I would not sa…
Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
#50Earlier quoted context omitted.
Conventional game AI is usually search algorithms for movement (like A*) + finite state machines for behavior. No network calls to LLMs, no machine learning, etc. At the fringes, throw in the odd markov chain for procedural text generation. Basically AI post 2019 usually means LLM, and they're making the distinction that this is not that.
Any book recommendations for conventional game AI? (Particularly with the "game" part, as games always have interesting constraints.) Thanks in advance.
And if you're scaling difficulty, then you're likely tuning how the AI behaves.
GDC, GDCVault, academic papers, and dev blogs//post mortems of similar games to what you're interested in will have a lot of good information.