Back to News
Advertisement
kkalcode about 3 hours ago 14 commentsRead Article on github.com
I built this with Claude cause I always wanted to tinker with a simulation economoy and I love space themes.

A space-economy sim where nothing is scripted. A few hundred autonomous ships each run their own planner. Some chase the best trade route, take a delivery contract, refuel, retrofit at a shipyard, or dock so the crew can rest before morale tanks.

Markets price everything off supply with shortage-urgency multipliers, factions tax and subsidize, populations migrate when they're unhappy, and stations that go broke get abandoned and rot.

It started as an Elixir/Phoenix prototype, but the BEAM scheduler struggled on Windows gaming PCs, so I had Claude rewrite the engine in Rust.

The sim core is pure, synchronous, IO-free (its own hecs ECS), and the Bevy client embeds it directly as a library, sim and renderer share one world with zero marshalling. Ship AI is a GOAP planner over a world state; ships replan mid-flight when a better option appears. ~485 agents today at p50 ~10-20ms/tick, architected to push toward 100k+. Single native binary, bundled SQLite, no runtime deps. Getting into 100k has been a struggle, but I have pushed it into the thousand and it was running fine.

It's a sandbox, not a game yet, there's no objective yet, and I'm not actively pushing it toward "shippable." Anyone can fork it and take it over. Or it can stay as some type of AI slop, but part of me thinks it is already in a pretty good shape for a simulation use for various games or ideas.

(Full disclosure: a lot of this was built pairing with Claude. That's how I had the bandwidth to take it this far. Happy to talk about what that workflow actually looked like.)

Advertisement

⚡ Community Insights

Discussion Sentiment

80% Positive

Analyzed from 473 words in the discussion.

Trending Topics

#more#things#seems#godot#llms#game#rust#idea#https#simulation

Discussion (14 Comments)Read Original on HackerNews

lantry•11 minutes ago
I have also been using LLMs (mostly claude code) to develop a game with Rust and Bevy, and it seems to work very well. The strictness of rust seems to really help them get the code right, and the ECS architecture seems to make it easy for them to reason about how things work (because they only need to hold a few systems and components in context at a time).
qwertyastronaut•about 2 hours ago
What is it about the space industry life that makes us developers adore it so much? :p

X4 Foundations just got a big update if you’re looking for a game built around this industry sandbox idea.

natebc•about 1 hour ago
https://store.steampowered.com/app/4382310/Warp_to_Sector_On...

I came across this recently ... hints of Tradewars from the good old days.

zipy124•19 minutes ago
Ooooh didn't know it had an update! Thanks for posting.
aliasxneo•about 1 hour ago
Really wish they would spend a cycle or two on the automation/economy side. I know they've been really into combat lately. It's one of those games where the scale is exhilarating and then you spend hours cursing at the screen as the NPCs completely ignore all of the logistical rules you painstakingly setup.
dangoodmanUT•about 1 hour ago
throws away spec doc for my own

Are we all having this idea?

digilypse•about 1 hour ago
I just started working on some similar stuff, it’s been a dream forever but I never had time for the payoff to feel worthwhile. Would love to hear more about your Claude workflow and experience with Bevy, did you consider Godot?
kalcode•36 minutes ago
I did! I am more familiar with Godot but just ran into performance issues and then switched off their node scene straight to their rendering API, which made me feel like I abandoned Godot at that point. I am sure it could be optimized more but I want to worry less about chucking rendering and more scaling the economy simulation the further it went out, thus the more things to render, the harder it was for Godot.

Bevu/Rust just made it easier to brute force that scaling, since they have smaller footprints (overhead?)for each thread/process spawning.

nixpulvis•26 minutes ago
Not using big_space :(
hersko•about 2 hours ago
Neat idea!

I think it would be cool if you can host a simulation and enable online viewers. Have the simulation accessible from a website (god-mode disabled of course), and have an agent generate some sort of newspaper or news bulletin of interesting things that happen.

sulam•about 2 hours ago
It’s fun to see projects like this that seem largely unlocked by LLM assistance, and probably wouldn’t even get started if it weren’t for them. I know the hype cycle for LLMs seems to have hit its peak already, but I am fully convinced we are still in the early days of what we’ll be doing with them in software development. The only problem I see with projects like this is that there could be so many of them. Personally I’ve built at least 5 things that I had thought would be fun, but realistically I just didn’t have the time. Now I do, and if they only scratch my personal itches, that’s okay.
kalcode•about 1 hour ago
Yup, lots of stuff I'd love to dive into that having an assistance coder makes way more approachable on nights or weekends to get things done.

And yah, ideally there should be tons more! The shift will be interesting.

thomascountz•about 1 hour ago
Reminds me of SpaceTraders[1]

[1]: https://spacetraders.io/

spacecadet•about 1 hour ago
You might also like my AI written zero player game/sim: https://github.com/derekburgess/simcraft

The whole thing originated years ago to see what LLMs were capable of. Just spent a chunk of my Fable access hacking away at it. Is it intended to be 100% realistic, no. Its more art, tho I do try to lean into physics...