Hacker News new | past | comments | ask | show | jobs | submit login
Swarm: A resource-gathering game based on robot programming, written in Haskell (github.com/byorgey)
110 points by Eugeleo on Oct 14, 2021 | hide | past | favorite | 26 comments



If you want a Lispier robot programming game, check out GNU Robots. You use the dialect of Scheme that most GNU tools are extensible with, so you'll get something out of it!

https://www.gnu.org/software/gnurobots/


there is also screeps if anyone wants the MMO experience. but this one aint free though, because you're effectively running code 24/7 and the devs need to maintain servers so that your code gets executed. i'd suggest just getting the simple game and run the server locally. no longer MMO in that case, but thats probably for the best until your code can handle raids by other players :)

https://screeps.com/


Oo this looks really cool! I'm bookmarking this for the future. I don't know that I'll have time to do anything with it any time soon, but looks really interesting.

I wish there were more "play games while programming" projects. Only thing is that they all seem to be too low level, whereas I want to be able to write logic like:

"when you have < 100 wood, stop creating carved objects and increase the amount of wood gathering."

instead of having to program my own pathfinding logic or whatever.


I highly recommend Bit Burner (https://danielyxie.github.io/bitburner/). It's an idle/incremental game with a focus on automating things with javascript. Heck of a lot of fun, imo.


Nice, bookmarking!


Something that goes in the other extreme — very simple game rules, but you are free to code in whatever behaviour you want — https://yare.io


> I wish there were more "play games while programming" projects

I'm working on just such a project right now:

https://bryanpg.com/games/pragma_twice

Periodically check that page (or follow the Twitter) for a playable demo sometime in the next few months.


Followed you on twitter (:


Interesting, I didn't think there was much demand for games like this.

I'm putting together a few things in this space, would you be interested in a programming resources management game?


I mean, i baiscally want to play like Age of Empires II but script logic for units as well.

edit: I should also add that it maybe depends what you're taklintg about; one thing i'd like to do is be able to play an actual normal game, but offload some of the menial tasks to scirpts. so some manual control, but I can write logic to make it less tedious.


How is the compile time?

I like Haskell's succinctness, but I was a bit shocked when I needed to compile Haskell IDE Engine (HIE) and had to wait almost 2 hours... That's when I thought, I'll just complete these university courses and see if I bother afterwards.


On a Thinkpad X270, 14m8s from I typed `stack build` in a fresh clone. I had the GHC version, but almost no libraries from that snapshot, so it had to compile a bunch of dependencies. I then tried a fresh clone and `stack build` again and that just took 1m15. Guess this is why people use things like cachix :-)


Compile time in CI seems to be about 1 minute 20 seconds. Not the fastest, not terrible either.


Haskell does take a long time to compile from scratch, but once you compile once, it is much much faster. The annoying bit comes when you end up changing something which means a lot of other things end up needing to be recompiled, but there are ways to mitigate that, and overall I think haskell is very worth the tradeoff.

I often think about "what would replace haskell?" though and ponder it, and I do think that most likely one feature will be a faster compiler (though I don't really know how possible that is to maintain feature parity).


I always wondered if there is some way to create a game where you program real life robots against each other?



Robot Wars is amazing and it's a crime that they cancelled it to "make room for new shows".

I don't think the BBC actually liked it, tbh. They scheduled it against impossible competition on BBC1.


Those are remotely controlled, so not robots at all.


Of course they're robots. Just not autonomous robots.



I heard they simulate all signals for robot model training


What do you mean by "real life robots"?


I was imagining having physical robots (as opposed to a simulation) with some sort of API to the motors, sensors, etc and you could upload code to to compete in some sort of game. Maybe even set up a webcam and stream the matches!


Some kind of uglier Halite clone?


It's a halitelike roguelike.


No.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: