Crate amethyst [] [src]

Amethyst is a free and open source game engine written in idiomatic Rust for building video games and interactive multimedia applications. The source code is available for download on GitHub. See the online book for a complete guide to using Amethyst.

This project is a work in progress and is very incomplete. Pardon the dust!

Example

extern crate amethyst;

use amethyst::*;

struct GameState;

impl State for GameState {
    fn handle_events(&mut self, events: &[Event]) -> Trans {
        for e in events {
            match e {
                Event::Closed => Trans::Quit,
                Event::Resized(x, y) => println!("x: {}, y: {}", x, y),
                Event::KeyPressed(k) => if k == Key::Esc { Trans::Quit },
            }
        }
        Trans::None
    }

    fn update(&mut self, _delta: Duration) -> Trans {
        println!("Computing some more whoop-ass...");
        Trans::None
    }
}

fn main() {
    let mut game = Application::new(GameState);
    game.run();
}

Reexports

pub extern crate amethyst_ecs as ecs;
pub extern crate amethyst_engine as engine;
pub extern crate amethyst_renderer as renderer;