optic-loop 0.0.3

Game loop, Runtime trait, and Game builder for Optic engine
Documentation

optic-loop

Game loop, Runtime trait, and Game builder for the Optic engine.

Wires together windowing, rendering, and networking into a single run loop. Implement the Runtime trait to receive setup, update, fixed_update, render, and close callbacks.

use optic_loop::{Game, Runtime};
use optic_core::OpticResult;

struct MyGame;
impl Runtime for MyGame {
    fn update(&mut self) { /* per-frame logic */ }
}

Game::new("My Game", (800, 600), MyGame)?.run();