News for hackers. Stuff that matters.
Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Sunday December 06, 2020 @06:08PM (#25327545)
Hey people, I built this particle simulator in ~500 lines of self-contained HTML/JS/WebGL2.

It's designed to encourage creativity and exploration. You can just download one of those universes and open up the HTML file in a text editor to tweak the physical laws and constants. Then open it up in your browser to see the result immediately.

I had a lot of fun exploring the beautiful emergent behaviors that arise from those simple rules, give it a try too! There's plenty of documentation and you don't need to be a programming wizard. :)

The most interesting universes I came up with are on display here: https://exophysics.net/exhibition.html

Re:Show HN: Exophysics – WebGL2 particle simulator by trungdq88 on Sunday December 06, 2020 @09:39PM (#25328850)
This is pretty fun, I like it, will take a look at the code later today.

> Finally, I am legally obliged to inform you of the one law of exophysics: > YOU ARE REQUIRED TO TERMINATE A SIMULATION IMMEDIATELY UPON FINDING > EVIDENCE OF THE EMERGENCE OF SENTIENT CREATURES CAPABLE OF SUFFERING.

LOL, I had to google "law of exophysics" to see if it is real.

Re:Show HN: Exophysics – WebGL2 particle simulator by swyx on Monday December 07, 2020 @06:37AM (#25331231)
I mean.. arguably... if the sentient creatures have emerged then is it ethical to kill them?
Re:Show HN: Exophysics – WebGL2 particle simulator by tetris11 on Monday December 07, 2020 @07:45AM (#25331597)
Well, factor in a slow extinction event and let it run for a few billion ticks. That way they have ample warning, and they might have even offed themselves within that timeframe.
Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Monday December 07, 2020 @09:06AM (#25332179)
True, but that law was established to discourage any research in that domain, reducing the overall occurences of sentience-incidents and the resulting messy philosophical questions.
Re:Show HN: Exophysics – WebGL2 particle simulator by morphle on Monday December 07, 2020 @10:43AM (#25333222)
I like this programming languages made for particle/fields [1,2,3]

Yoshiki Ohshima also made the particle/fields simulator in Squeak/Etoys that Alan Kay demos is his talks [5] and was a scientist at Alan Kay's VPRI [4].

[1] http://tinlizzie.org/~ohshima/shadama2/

[2] https://www.youtube.com/user/yoshikiohshima/search?query=sha...

[3] http://tinlizzie.org/~ohshima/shadama2/live2017/#kedama

[4] http://www.vpri.org/writings.php

[5] https://tinlizzie.org/IA/index.php/Talks_by_Alan_Kay

Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Monday December 07, 2020 @11:04AM (#25333423)
Wasn't aware of this project, thanks for the links!
Re:Show HN: Exophysics – WebGL2 particle simulator by andai on Monday December 07, 2020 @08:18AM (#25331829)
Nice, this is really fun to play with!

I messed around with something similar a few years ago, based on (the code in) this video https://www.youtube.com/watch?v=Z_zmZ23grXE

Edit: Apparently there are a lot of these! This variant is also pretty cool (smaller particles, more like "fields"): https://www.youtube.com/watch?v=nu5aDIEoBk0

Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Monday December 07, 2020 @10:11AM (#25332832)
https://www.youtube.com/watch?v=makaJpLvbow <- this one is pretty awesome too. A very simple rule and quite the complex behavior. Though I'd recommend watching it at 175% speed, muted, and perhaps with the 1812 Overture as the background music.
Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Monday December 07, 2020 @09:04AM (#25332153)
Sweet, thank you for the links! I'll surely learn something from what they've been doing :)
Re:Show HN: Exophysics – WebGL2 particle simulator by mrpf1ster on Monday December 07, 2020 @01:06AM (#25329751)
I love the emphasis on user exploration. And your way of writing the documentation is very welcoming. Awesome tool.
Re:Show HN: Exophysics – WebGL2 particle simulator by hut0 on Monday December 07, 2020 @09:01AM (#25332133)
Thank you :)!