Skip to content

A game that utilizes cellular automata, in which gates are represented by arrows and can be combined to create a functioning computer

Notifications You must be signed in to change notification settings

lazydancer/arrows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arrows

About

Arrows is a celluar automata

Arrows Demo

How to use

There are two sides of the program. The largest dependency is ggez, which provides window and graphics management. Python talks to Rust through a C interface, where ccfi is needed for this to occur.

Python ">3.0" ccfi ">1.13"

Rust "2018 Edition" ggez = "0.5.1" rand = "0.7" mint = "0.5" cgmath = { version = "0.17", features = ["mint"]}

Aditional Dependecies libudev-dev libasound2-dev

Build and run the program through makefile

make run

How it works

Rust includes all of the logic and graphics. Where a "Board" object can be seny to rust and displayed and run. The python code contains is higher level drafter, where more complex boards can be designed. Right now in the drafter, there is a topological function to arrange sub-blocks and a basic router for wires using breadth first search. Improving this drafter is an interesting challenge as wires cannot cross, making interesting router challenges.

Code Structure

src
├── bridge_python_side
│   ├── adapter.py
│   └── comm.py
├── bridge_rust_side
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
├── draft
│   ├── app.py
│   ├── defaults
│   │   └── defaults.py
│   ├── maker
│   │   ├── connector.py
│   │   ├── form.py
│   │   ├── raster.py
│   │   └── topological_sort.py
│   └── model
│       ├── block.py
│       └── section.py
├── logic
│   ├── Cargo.toml
│   └── src
│       ├── block.rs
│       ├── board.rs
│       ├── lib.rs
│       └── pos.rs
└── view
    ├── Cargo.toml
    ├── resources
    │   ├── arrow_down_active.png
    │   ├── arrow_down_inactive.png
    │   ├── arrow_left_active.png
    │   ├── arrow_left_inactive.png
    │   ├── arrow_right_active.png
    │   ├── arrow_right_inactive.png
    │   ├── arrow_up_active.png
    │   └── ...
    └── src
        ├── assets.rs
        └── lib.rs

About

A game that utilizes cellular automata, in which gates are represented by arrows and can be combined to create a functioning computer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published