https://github.com/repcomm/redstonesim
A sandbox redstone like simulator in 2d using java swing and pretty math
https://github.com/repcomm/redstonesim
Last synced: 10 months ago
JSON representation
A sandbox redstone like simulator in 2d using java swing and pretty math
- Host: GitHub
- URL: https://github.com/repcomm/redstonesim
- Owner: RepComm
- Created: 2022-10-05T19:29:24.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-09T20:38:15.000Z (over 3 years ago)
- Last Synced: 2025-01-28T08:52:26.306Z (12 months ago)
- Language: Java
- Size: 294 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# RedstoneSim
A 2d sandbox for creating redstone-like circuits for no reason

Implemented classes:
- Chunk - efficient 2d data structure
- ChunkRenderer - renders chunks given List
- BlockData - handle raw data of a block
- BlockInfo - instructions for rendering blocks
- Neighbors - struct for storing neighbors
- Vec2 - math
- JSON - custom impl of JSON reader/writer
- AddQueue - iterate + add items + iterate added items
- ContextEx + Graphics2D + save/restore
- MouseHandler - less annoying swing mouse handler
Implemented functionality:
- Basic UI
- Coordinate transformation
- Window resizing
- Efficient voxel storage
- Voxel place/break
- Mouse hover voxel outline
- JSON.parse and JSON.stringify
- Basic Redstone propagation / powering
- Drag blocks around smoothly
- [blocks.json](./src/blocks.json) - configure your blocks!