https://github.com/rainingcomputers/wireboi
Wireboi is an implementation of the wireworld cellular automaton. It is written in C++ and uses SFML for graphics.
https://github.com/rainingcomputers/wireboi
Last synced: 9 months ago
JSON representation
Wireboi is an implementation of the wireworld cellular automaton. It is written in C++ and uses SFML for graphics.
- Host: GitHub
- URL: https://github.com/rainingcomputers/wireboi
- Owner: RainingComputers
- License: mit
- Created: 2020-07-07T17:35:36.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-08T17:35:20.000Z (almost 6 years ago)
- Last Synced: 2025-10-12T10:46:03.273Z (9 months ago)
- Language: C++
- Size: 12.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Wireboi is an implementation of the [wireworld](https://en.wikipedia.org/wiki/) cellular automaton. It is written in C++ and uses SFML for graphics.
# Getting started
Let's simulate a wireworld computer that calculates prime numbers,
+ Download latest executable for your OS (Windows/Linux) from the releases page and download [primes.png](examples/primes.png)
+ Run the executable, an open-file dialog will appear, browse and select primes.png
[More info on how the computer works](https://www.quinapalus.com/wi-index.html)
# Creating your own circuits
You can create your circuits using any image editor ([GIMP](https://www.gimp.org/)) and export as `.png` file. Every pixel is one cell. See the `examples` folder.
### Rules
A Wireworld cell can be in one of four different states,
+ empty (RGB: 0, 0, 0)
+ electron head (RGB: 0, 128, 255)
+ electron tail (RGB: 255, 255, 255)
+ conductor (RGB: 255, 128, 0)
As in all cellular automata, time proceeds in discrete steps called generations (sometimes "gens" or "ticks"). Cells behave as follows:
+ empty → empty
+ electron head → electron tail
+ electron tail → conductor
+ conductor → electron head if exactly one or two of the neighbouring cells electron heads, otherwise remains conductor.
Wireworld uses what is called the Moore neighborhood, which means that in the rules above, neighbouring means one cell away (range value of one) in any direction, both orthogonal and diagonal.
# User interface
#### Dock
| Action | Dock |
|--------|--------|
| Zoom out | - |
| Decrease speed | << |
| Reset | ⟵ |
| Play/Pause | ▶ or ❚❚
| Step | ↳ |
| Increase speed | >> |
| Zoom in | + |
#### Keyboard
| Action | Key |
|---------|--------|
| Pan | ↑ ← ↓ → or W A S D |
| Zoom in | = |
| Zoom out | - |
| Play/Pause | Space or F6 |
| Step | F10 |
| Decrease speed | , |
| Increase speed | . |
| Toggle UI overlay | G |
#### Mouse
Hold right mouse button and move to pan and scroll up/down to zoom in/out.
# Installing from source
+ Clone the repo using `git clone`
```
git clone https://github.com/RainingComputers/Wireboi.git
cd Wireboi
```
+ Build and install
```
sudo apt-get install libsfml-dev libgtk-3-dev
make build
sudo make install
```