4 ms·
I'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 th
by mikhmha 3y ago
I'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 get this part down.
The language i'm using - Elixir - also has some very interesting features that make it easy to integrate async a.i planning + a.i to a.i group communication. Ahh, I find it so exciting. The main simulation loop is never blocked. Meanwhile the A.I planner just chugs along as a separate process, spawning and despawning new agents in the world, creating and merging control groups, and setting new goals.
- linkdd 3y agoNice 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).
- pdimitar 3y agoI'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.
- linkdd 3y agoFor performance intensive tasks, you could rely on Rust NIFs, there is this great project: https://github.com/rusterlium/rustler 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.
- pdimitar 3y agoYep I've used Rustler with great success. 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.
- machiaweliczny 3y agoElixir has nx project for numerical computing
- pdimitar 3y agoAh, but I have zero interest in AI. I just want a good algorithm. :)