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

I've been working on a similar concept off and on for a few years. To avoid all the security problems you're having, I've written a virtual machine that emulates a CPU and 64k of RAM. Instead of submitting code, you submit a 64k memory image of robot byte code.

Every turn of the game involves running a single cycle of the virtual CPU for every robot. Conceptually, the robots have radios and weapons that are controlled via memory-mapped IO in the virtual machine.

Things are slightly more complex than that because you don't want to give the first robot in the cycle an advantage (especially if they're firing lasers at each other), so you have to do each turn in multiple stages (run cycle, resolve real-world effects, update robot sensor state)

I'd LOVE to collaborate with a group of people to get something like this going because I think this would be a great way to introduce kids to programming at a machine level/electrical engineering. If anyone is interested, please send me an email. You can find my address in my profile.



That sounds like the much more fully developed version of what I have that I'd like to get to someday. I'm down for that collaboration thing. Let's get a group started.

The radios you mentioned are something I'd like to have someday. I think what makes games like these cool is the fact that your code controls an army of robots. It's more fun than just having two robots duel it out.


That's what I was thinking too; instead of a one-on-one, what if you could have 10-100 bots that operated with different strategies and worked together? I think it would so cool to have multiple teams of players all competing at once.

Sort of a programmable MMO/RTS, where the fun would be the strategy development and extra-game political aspects.

Where I'm getting hung up is on the exact game mechanics; I want to make it so the simulation runs for a long time, but I don't want a single player or team able to develop an insurmountable advantage. I'm thinking to start you get a robot in a sandbox world where it would gather resources and you could test strategies, and when you're ready you can transport the bot to the real world to compete.

I was writing this in C++ so the memory overhead per robot was just barely over 64k. A server with 8gigs of RAM could run a simulation in memory with about 100,000 bots, periodically saving the game state to disk in case of a failure.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: