New javascript features and bit manipulation allow to efficiently process any pattern in Full HD resolution (1920 x 1080).
Simulation runs at up to 250 iterations per second which is up to 10 times faster
than a naive implementation (depending on the pattern size). This is a conventional algorithm which runs simulation step-by-step.
For most patterns, Hashlife algorithm is much faster.
Its javascript implementation be found in this online simulation viewer.
Controls:
⏮ rewinds field back to the original position
⏵ starts simulation (for 1x - 50x speed options)
or makes single step of 1, 10 or 100 iterations (for manual speed option)
⏸ pauses running simulation
Pressing 'space' bar on keyboard toggles simulation: starts if it's paused or stops if it's running or makes a step if
manual mode is enabled Speed control specifies number of simulation steps per frame. When it is 1x, one step is executed per frame,
so the speed is limited to 60 steps per second.
When it is 50x, 50 steps per frame are executed which results in much faster simulation at up to 250 steps per second.
For large patterns that take time to evolve, 5x is usually an optimal setting to allow fast simulation yet
keeping a decent refresh rate.
Last three options allow manual execution: instead of running continuously, after pressing ⏵ button or hitting 'space'
simulation only advances 1, 10 or 100 steps and then stops. Use it to investigate pattern evolution frame by frame or
to get to a specific generation number if needed.
Load Pattern allows to load a pattern in old Life 1.05 format
or more modern RLE format Random Pattern generates random patterns of size 1920x1080 with configurable initial cell density. Load Image generates pattern from arbitrary picture!
Source code is available under
MIT License
A few sample patterns
go with the source code;
A huge library of patterns in rle format can be found here;
or you can download a zip file
with over a hundred of patterns in Life 1.04 format!
Load
Cancel
Generate random pattern
Seed (starting seed for random number generator. Different values yield to different patterns):
Threshold (probability of live cell to be generated. The lower the value, the less cells will be there):