Hacker News new | ask | show | jobs
by ianbicking 906 days ago
I've had some hobby projects that seem like a good fit here. The low-code and interactive editor make it nice for a hobbyist, even though I can code... there's a certain concentration I just don't feel like when I'm doing a hobby project.

For me personally the thing I've excited about is generating maps and worlds. It looks like the best way to do this is to export the game as JSON, programmatically edit it, and then import?

I'm a little intimidated though... the unedited tutorial world is 3500 lines of JSON. There's a lot to try to understand there.

My first idea at how to do that is to make deliberate edits and see how that changes the JSON (I also need to look up a nice JSON diff viewer). This will help point to the parts I want to touch. I'm also guessing I'll do things like collect assets and map tiles in the interactive editor.

Is this a reasonable approach? Are there tools to help here?

1 comments

I wouldn't recommend you modify the JSON directly, as it's quite illegible and bloated. There are actions in modd.io that allow you to modify the map directly. One creator in our community is dynamically generating the map using ChatGPT. He's building a hide & seek sends a prompt to generate 2D map JSON then loads it in the map every time the new game round begins. I'd share the game, but he hasn't published it yet.

Also, there is a community member who's building an interpreter for our game JSON such as https://pypi.org/project/pymodd/