Re:Show HN: Pixel Physics
by atum47 on Sunday April 18, 2021 @02:48PM
(#26855161)
this experiment was created in about three hours of code on one Saturday and another two on Sunday. Before posting here I've cleaned the code a bit and added some icons.
I really don't like the code right now, because it has a lot of if else (i intend to get rid of that) and I also don't like the interactions.
The basic mechanics uses celular automata, where the next state of the simulation is defined by it's previous state plus some rules. To accomplish this, I'm using two maps. I have a branch where I'm using only one map, but I'm still not happy with some aspects of the simulation.
As soon as I have a better code base and better simulations, I'll release the source code on my github.
https://ibb.co/TBs4WD2
I really don't like the code right now, because it has a lot of if else (i intend to get rid of that) and I also don't like the interactions.
The basic mechanics uses celular automata, where the next state of the simulation is defined by it's previous state plus some rules. To accomplish this, I'm using two maps. I have a branch where I'm using only one map, but I'm still not happy with some aspects of the simulation.
As soon as I have a better code base and better simulations, I'll release the source code on my github.
Looks like you'll have to do some sort of value propagation.