sunjay / turtle

Create Animated Drawings in Rust
http://turtle.rs
Mozilla Public License 2.0
562 stars 53 forks source link

Add README.md to examples directory #25

Closed sunjay closed 4 years ago

sunjay commented 7 years ago

It's a good idea to have a sort of "index page" in the examples directory which lists some of the more prominent examples with gifs of their functioning.

Implementation Steps

If you have any questions about any of these steps or need more details, please comment below!

  1. Fork and clone this repository
  2. Create a file examples/README.md
  3. Add the following content:

    # Examples
    
    The examples in this directory are meant to help teach you about different aspects of the turtle library. Each example shows a different way of using the library to create a drawing. Examples range from "beginner" to "advanced". Even if you don't feel like you're advanced enough yet, it may be worthwhile to read and try to understand how some of the advanced examples work. Some examples are more advanced than others. The following are some of the most prominent examples which you should
    
    ## Random Maze Generator + Solver
    ![turtle maze generator and solver](https://user-images.githubusercontent.com/530939/32986980-4cd135f4-ccac-11e7-9ff0-e91c4d73f8fa.gif)
    **Example Source Code:** [maze.rs](https://github.com/sunjay/turtle/blob/master/examples/maze.rs)
    **Level:** Advanced
    
    In this example, the turtle generates and draws a maze. Then it goes through and solves the maze by moving through the passages until it finds the exit.
  4. Add more examples which should be included by following the template provided in the previous step for the maze generation example. For each example, include:
    • A compelling name for the example (just descriptive is fine too, but it's good to make the title something that provides more information about the example than the filename does)
      • Example: Use "Drawing a square" for square.rs instead of just "Square"
    • A short gif of the example (suggested software: Peek)
      • Some examples may not need this or may be better off without a gif (use your judgement)
    • Link to the source code with the text Example Source Code: before it (see example in previous step)
    • A judgement of the difficulty level of the example from the perspective of someone learning to program for the first time

Gifs

Here are some gifs that could be included:

For examples/maze.rs:

peek 2017-11-18 19-19

For examples/rust.rs:

peek 2017-10-28 23-24

For examples/heart.rs:

peek 2017-11-18 22-10

PaulDance commented 4 years ago

I think I can help with this. Should I include the GIFs from a new examples/images directory @sunjay? Also, I find the "Example Source Code" title a bit misleading: I first understood it as "example code to use this example", so should I put it as "Source Code" or even just "Source"?

sunjay commented 4 years ago

I think I can help with this.

Thanks! That would be great!

Should I include the GIFs from a new examples/images directory @sunjay?

Good question. Let's put them into a new docs/assets/images/examples folder. Please name the files the same as the examples to make this easy to keep track of. You can use numbers at the end of the file name to add multiple images: e.g. maze.gif, snowman1.png, snowman2.png, etc.

Also, I find the "Example Source Code" title a bit misleading: I first understood it as "example code to use this example", so should I put it as "Source Code" or even just "Source"?

Source Code is good. The goal is just to make sure that people understand that the code that produces the image is at that link.

PaulDance commented 4 years ago

Then this can be closed now, right?

sunjay commented 4 years ago

Yup! Thanks!