Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r4gus/nodus
A logic gate simulator written in Rust using the Bevy game engine.
https://github.com/r4gus/nodus
bevy bevy-engine circuit gate logic logic-circuit logic-gates rust simulator
Last synced: about 2 months ago
JSON representation
A logic gate simulator written in Rust using the Bevy game engine.
- Host: GitHub
- URL: https://github.com/r4gus/nodus
- Owner: r4gus
- License: mit
- Archived: true
- Created: 2021-12-03T00:15:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T22:49:45.000Z (over 2 years ago)
- Last Synced: 2024-09-22T11:32:03.262Z (about 2 months ago)
- Topics: bevy, bevy-engine, circuit, gate, logic, logic-circuit, logic-gates, rust, simulator
- Language: Rust
- Homepage:
- Size: 8.13 MB
- Stars: 114
- Watchers: 7
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nodus
A graphical __logic gate simulator__.
This project is in an early stage of development but most of the basic features are implemented.
## Features
Choose from a variety of logic gates, input controls and output controls to build digital circuits using
a drag and drop interface.![Simple Circuit](images/example-app.png)
| Gates | Input controls | Output controls |
|:-----:|:--------------:|:---------------:|
| AND | High const | Light bulb |
| NAND | Low const | 7-Segment display |
| OR | Toggle switch | |
| NOR | Clock | |
| NOT | | |
| XOR | | |![Logic Gate Selection](images/components.png)
Insert components into the world using a radial context menu.
![Context Menu](images/context.png)
Save the circuits you've created in a [.ron](https://github.com/ron-rs/ron) file and reload them later.
![Simple Circuit](images/save-load.png)
## Getting started
Setup the Rust development environment and Bevy.
### Installing Rust
Install Rust by following the [Getting Started Guide](https://www.rust-lang.org/learn/get-started).
### Setting up Bevy
Follow this [Guide](https://bevyengine.org/learn/book/getting-started/setup/) to setup Bevy.
### Run program
First clone the repository.
```
git clone https://github.com/r4gus/nodus.git
```Then switch into the project folder and run the program.
```
cd nodus
cargo run
```## Known Issues
Here are some tips to solve known issues.
> __Note:__ Make sure you've installed all required dependencies ([linux](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md), [windows](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16)).
### Ubuntu linker error
If you get the following link error in Ubunut/ Debian,
```
= note: /usr/bin/ld: cannot find -lxcb-render
/usr/bin/ld: cannot find -lxcb-shape
/usr/bin/ld: cannot find -lxcb-xfixes
collect2: error: ld returned 1 exit status
```try to install `libxcb-shape0-dev` and `libxcb-xfixes0-dev` separately, i.e. `sudo apt install libxcb-shape0-dev libxcb-xfixes0-dev`.
### AMD driver issue
If you get the following runtime error,
```
thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', /home/USERNAME/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_render-0.6.0/src/view/window.rs:161:24
```you can either try to disable `vsync` in `src/main.rs`, or switch from `AMDVLK` to `RADV`: `AMD_VULKAN_ICD=RADV cargo run` (maybe [this](https://wiki.archlinux.org/title/Vulkan#Selecting_Vulkan_driver) can help).
## Controls
- `lmb pressed`: select/ drag (selection mode - `s`), pan (pan mode - `p`)
- `rmb pressed`: open context menu
- `mouse wheel`: zoom## Planned Features
- [ ] Create new logic components from existing circuits
- [ ] Create truth tables from circuits## Credits
* [The Bevy Engine](https://bevyengine.org/)
* [Bevy Prototype Lyon](https://github.com/Nilirad/bevy_prototype_lyon)