Piston - a modular open source game engine

The bricks are out of the box! Take a bite of some nice modular libraries for the real world, such as games and interactive applications, written for performance, ergonomics and cross platform development.

Piston was started in 2014 by Sven Nilsen to test back-end agnostic design of 2D graphics in Rust. The project ignited several ambitious projects across the Rust ecosystem. The PistonDevelopers organization is a place where everyone who wants to contribute have write access. This makes it easier to share maintenance, integrate projects and pursue personal goals. Today the Piston project is developing 2D, 3D, immediate UI, image formats and processing, Visual Studio plugin for Rust, Minecraft clone client/server, sprite animation, AI, and meta parsing for domain specific languages and text formats. We share research and are part of a greater community. You can be a part of it.

Getting started Source code

Quick example
extern crate piston_window;

use piston_window::*;

fn main() {
    let mut window: PistonWindow = 
        WindowSettings::new("Hello Piston!", [640, 480])
        .exit_on_esc(true).build().unwrap();
    while let Some(e) = window.next() {
        window.draw_2d(&e, |c, g, _device| {
            clear([1.0; 4], g);
            rectangle([1.0, 0.0, 0.0, 1.0], // red
                      [0.0, 0.0, 100.0, 100.0],
                      c.transform, g);
        });
    }
}
More examples »

Built with Piston

More games »

Latest blog posts

More posts »