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

Is the source code for this simulator available anywhere? The post's code itself is minimized/obfuscated: https://thomassimon.dev/assets/cashloss.1fca21f6.js

I couldn't find anything on the author's GitHub. I'm mostly just curious how it's built.



Author here, if there is enough interest I can clean the code up and put it on GitHub. It is basically a state machine.


I'd love to see it, even in unpolished state.

It'd go well as comparison vs. this code I've been playing around with from Phillip Rosedale (Founder of Second Life) where he's simulating economy for purposes of determining wealth distribution scenarios: https://editor.p5js.org/PhilipRosedale/sketches/odl5elMWy


Yes please! Fantastic work by the way.

I’d love to see the code with a permissive license for others to build upon.

Reminds me a little of ncase’s fantastic simulations — for example: https://ncase.me/sim/


Would be nice to see a post written about the high-level design and then about the implementation.


I'd love to take a look too. Just a suggestion, push it to github then clean it up. It's always helpful to see not just the product but the process. Great work.


Just to add to others; I'd be interested to take a look at the source, particularly for animations.


Another +1 from me.

For me I’m particularly interested in how you’ve done the presentation interface.


I'd appreciate it. :D


State machine? Why not entity component system?


Not the author, but I am trying to replicate it[1] without looking at the code (so sort of blackboxing it)

If you just want the javascript file (195 lines of code), let me know too

I'm currently working on Simulation 15

[1]: https://github.com/ldd/economy-test/tree/master





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

Search: