Tuesday 13 October 2015

Javascript Cellular Automata Editor

After spending time learning to save and load text then images I have now moved onto creating save files for more complex objects. This program allows you to create schematics for a kind of Cellular Automata which follows rules similar to logic gates. The rules are a mix of the Von Neumann cellular automata I was experimenting with previously and some of the thoughts I had after playing the excellent Infinifactory.

Sorry that the program is light on instructions, you can select tools from the top menu:

  • Wire can be placed with left click, hold and drag to create a length of wire.
  • Charge is placed onto existing wires causing a signal to flow through them, it too can be dragged over multiple wire segments.
  • Inverters will produce a signal when they receive no input and stop when they do (a Nor-gate). The tool switches normal wires to inverters and vice-versa.
  • Splitters allow input signals to be split into multiple output signals, vital to creating latches or other patterns involving feedback. A splitter will not transmit a signal directly into an adjacent splitter, put a wire separating them.
The right mouse button will always remove a cells contents, hold and drag to remove a square of cells at once.

When the save button is pressed you will be prompted to give the schematic a name and choose where you want to store it on your computer. The schematics are stored in png image format, with each pixel corresponding to a single cells contents. This means you can get a preview of what the schematic is by looking at the file thumbnail! :D You could open the file and edit in an image editor but this program only recognises a few colours as corresponding to valid cell contents.

The program defaults to an example schematic of various logic gates to show you what this CA ruleset is capable of making.

No comments:

Post a Comment