An open API service indexing awesome lists of open source software.

https://github.com/hohnik/noc-examples-pygame

Port to pygame of Nature of Code examples
https://github.com/hohnik/noc-examples-pygame

art code creative generative nature pygame python

Last synced: 6 months ago
JSON representation

Port to pygame of Nature of Code examples

Awesome Lists containing this project

README

          

# The Nature of Code Examples pygame

This is the repository for example [pygame](https://github.com/pygame-community/pygame-ce) code from [The Nature of Code book](http://natureofcode.com/). If you are looking for the book's raw content (text, illustrations, images, CSS, etc.), have a look at [The Nature of Code repo](https://github.com/shiffman/The-Nature-of-Code).

The original [Processing](http://processing.org) examples [can be found here](https://github.com/shiffman/The-Nature-of-Code-Examples), along with a [list of other ports](https://github.com/shiffman/The-Nature-of-Code-Examples/blob/master/README.md).

## Installation Instruction

To run the examples you have to have `python` and `pygame-ce` installed.
For some examples specific packages are needed. This is noted in the examples where you need them.

To install python and handle packages you can use the [uv](https://docs.astral.sh/uv/getting-started/installation/) package manager.
Though `uv` you can install `pygame-ce` and other packages via
```sh
uv init
uv add pygame-ce
```

## Note

There are multiple ways to **find the `p5.js` code** for the examples for comparisson:

* Select the image of the example or the **pink book** icon underneath it to navigate to where the example appears in the book and select `Open in Web Editor`.
* Select the pink `p5.js` link under the given example from the [examples page](https://natureofcode.com/examples).
* The [examples can also be found in the content directory](https://github.com/nature-of-code/noc-book-2/tree/main/content/examples) of the book's repository. However, please note that this directory is generated from the p5.js web editor and any [example corrections should be filed as GitHub issues](https://github.com/nature-of-code/noc-book-2/issues).