Small and explicit
A compact lifecycle with clear update and draw steps—easy to learn, debug, and extend.
Core concepts
A small, explicit game engine for desktop, WebAssembly, iOS, and Android. Start quickly, understand the whole loop, and grow only when your game needs more.
Spottedcat stays deliberately small. The game loop remains visible, the rendering path stays understandable, and the same project can move from a desktop prototype to web and mobile targets.
Implement the Spot lifecycle. Spottedcat handles the window, frame timing, rendering context, and platform layer without hiding the flow of your game.
use spottedcat::{Context, Image, Spot, WindowConfig, run};
use std::time::Duration;
struct Game;
impl Spot for Game {
fn initialize(_ctx: &mut Context) -> Self {
Self
}
fn update(&mut self, _ctx: &mut Context, _dt: Duration) {
// Advance game state.
}
fn draw(&mut self, _ctx: &mut Context, _screen: Image) {
// Render the current frame.
}
fn remove(&mut self, _ctx: &mut Context) {}
}
fn main() {
run::<Game>(WindowConfig::default());
}