Piston-Tutorials
Piston-Tutorials copied to clipboard
Adding Tutorials to Explain Code
@bvssvni I'm new to Rust and Piston, so I think that the best way for me to contribute while also learning more about both of these things is to create tutorials. That way I can get a better understanding of the codebase by attempting to explain it. I began with a dead-simple, minimal tutorial here . If you could look at the readme and code quickly I would really appreciate any feedback. Feel free to be as pedantic as you want, I'm sure my word choice is sloppy (and technically incorrect) and this process will hopefully refine my knowledge about Rust as well as the Piston framework. Thanks!
It seems a bit similar to what's in /getting-started/? This repo does need some more complicated examples than that though, such as events or using graphics for more than a basic rotating square.
Getting started doesn't explain any of the code or whats' going on. I'm going to add to these tutorials so they encompass more complicated usage of Piston, I just wanted to start with a small project that I can build from.
@kinson Notice that there are still work going on to remove some of the boilerplate https://github.com/PistonDevelopers/piston_window/pull/34. This will be the new setup:
extern crate piston_window;
use piston_window::*;
fn main() {
let window = window(
OpenGL::_3_2,
WindowSettings::new("Hello Piston!", [640, 480])
.exit_on_esc(true)
);
for e in PistonWindow::new(window, empty_app()) {
...
}
}
Turning the tutorials into wiki pages will make it easier to ask questions.
@bvssvni I feel like if we go with that we should at least keep the current structure around as one of the examples. It's somewhat related to programming style but having an App in a separate module containing update, render, initialize, etc just feels more sensible to me (if nothing more than on a separation of concept level). YMMV
@RCIX Sure.
@kinson Do you still want to work on tutorials? :smile: There are many topics left to cover...