https://github.com/pistondevelopers/piston-examples
A collection of examples using the Piston game engine
https://github.com/pistondevelopers/piston-examples
Last synced: 12 months ago
JSON representation
A collection of examples using the Piston game engine
- Host: GitHub
- URL: https://github.com/pistondevelopers/piston-examples
- Owner: PistonDevelopers
- License: mit
- Created: 2014-06-28T07:43:36.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T00:24:03.000Z (about 2 years ago)
- Last Synced: 2025-06-24T21:51:39.858Z (12 months ago)
- Language: GLSL
- Size: 2.55 MB
- Stars: 351
- Watchers: 47
- Forks: 89
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Piston Examples
A collection of examples using the Piston game engine
[How to contribute](https://github.com/PistonDevelopers/piston/blob/master/CONTRIBUTING.md)
## How to build & run examples
To build the examples, you need Rust and Cargo installed.
1. Install Rustlang for example through [rustup](https://rustup.rs/)
2. Invoke `cargo run --example ` where the `NAME` are a file names from `examples` directory
2.1. Optionally navigate to `examples/` and invoke `cargo run` for more complex examples
## Troubleshooting
* [I get `ld: library not found for -lSDL2` error on OSX](https://github.com/PistonDevelopers/rust-empty/issues/175)
* I get "GL context creation failed" when running an example.
It's likely your hardware or driver doesn't support PistonWindow's default OpenGl spec. Just change it to something
you can support at the beginning of the example. See hello_world.rs for an example.