Hacker News new | ask | show | jobs
by jms55 1456 days ago
I'm working on a Screeps-like game using WebAssembly. You compile a script to WebAssembly, and for each robot you control on the server, it runs the script in an isolated environment to choose an action for that robot. The goal is to write a program to coordinate your robots into gathering resources, replicating, and expanding your control of the server.

Here's an example bot script: https://github.com/JMS55/botnet/blob/master/example_bot/src/...

The basic infrastructure of the project is more or less in place, besides a visual replay viewer which I'm working on right now. What's needed is a bunch of work in designing game mechanics and APIs. I don't actually have any plans at the moment beyond bots running around and harvesting randomly generated resources. Feel free to open a discussion on the github page if you're interested in Rust, WebAssembly, and video games.

https://github.com/JMS55/botnet

1 comments

This is cool! I've had this idea knocking around in the back of my head similar to this about an MMO like game where users could write WASM code and "imbue" items in the game with it. Sort of allowing them to create interesting game logic to build stories and things in it.

Elixir always felt like it'd be a good backend to coordinate running things

Dang, that's also a neat idea! I do also like the Elixir language. I'll have to keep this in mind for future projects. Perhaps I can integrate some sort of system into botnet, where you can program custom bot actions somehow.

It would make the replay system I'm writing much more difficult though xD

Upvote on Elixir! I'm learning it right now at Divvy and loving it!