Piston-Tutorials icon indicating copy to clipboard operation
Piston-Tutorials copied to clipboard

Adding Tutorials to Explain Code

Open kinson opened this issue 9 years ago • 7 comments

@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!

kinson avatar May 31 '15 06:05 kinson

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.

Esption avatar May 31 '15 14:05 Esption

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 avatar May 31 '15 17:05 kinson

@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()) {
       ...
    }
}

bvssvni avatar Jun 01 '15 08:06 bvssvni

Turning the tutorials into wiki pages will make it easier to ask questions.

Gibibit avatar Jun 03 '15 08:06 Gibibit

@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

RinCamelia avatar Jun 03 '15 16:06 RinCamelia

@RCIX Sure.

bvssvni avatar Jun 03 '15 16:06 bvssvni

@kinson Do you still want to work on tutorials? :smile: There are many topics left to cover...

bvssvni avatar Jul 31 '15 20:07 bvssvni