A roguelike engine with devious intent!
This is the smallest, minimal example of a "game" in Scoundrel:
rust
pub fn main() {
start_with_systems(
vec![], // systems that work _before_ rendering
vec![], // systems that work _after_ rendering
windowing::window_event_loop,
);
}
It does nothing, however, so let's add a bit to make it better: ```rust pub fn drawcharacter() { printstring_colors((10, 10), "HELLO WORLD", *WHITE, *BLACK, 1); }
pub fn main() { startwithsystems( vec![drawcharacter], vec![], windowing::windowevent_loop, ); } ```
To add input, you can poll keyboard, mouse and even gamepad input:
```rust pub fn exitonescape() { for (key, status) in pollkeyboardevents() { if status == KeyStatus::Released && key == Key::Escape { force_quit(); } } }
pub fn drawcharacter() { printstring_colors((10, 10), "HELLO WORLD", *WHITE, *BLACK, 1); }
pub fn main() { startwithsystems( vec![drawcharacter], vec![exitonescape], windowing::windowevent_loop, ); } ```