| Crates.io | crafter-core |
| lib.rs | crafter-core |
| version | 0.1.1 |
| created_at | 2026-01-03 02:47:42.783353+00 |
| updated_at | 2026-01-03 08:45:48.648438+00 |
| description | Core game logic for Crafter - a Minecraft-like 2D survival game engine |
| homepage | |
| repository | https://github.com/JoshuaPurtell/crafter-rs |
| max_upload_size | |
| id | 2019501 |
| size | 647,524 |
A Rust implementation of Crafter - a 2D Minecraft-like survival game engine. Designed for game AI research, reinforcement learning experiments, and as a TUI-embeddable game.
[dependencies]
crafter-core = "0.1"
use crafter_core::{Session, Action, GameConfig};
// Create a new game session
let config = GameConfig::default();
let mut session = Session::new(config);
// Game loop
loop {
// Get current game state
let state = session.get_state();
// Perform an action
session.step(Action::MoveUp);
// Check if game is over
if session.is_done() {
break;
}
}
Run the standalone Crafter TUI from this repo:
cargo run -p crafter-tui
OpenTUI requires Zig 0.14.x on your PATH. If you have the Mission Control repo locally, you can use its bundled Zig:
PATH=/Users/joshpurtell/Documents/GitHub/mission-control/vendor/zig-0.14.0:$PATH cargo run -p crafter-tui
session - Game session management and main loopaction - Player actions (movement, combat, crafting)material - World materials and item typesachievement - Achievement tracking systemrenderer - TUI rendering utilitiesrecording - Session recording and playbackconfig - Game configuration optionsMIT License - see LICENSE for details.