https://github.com/elgopher/pi-template
Pi template
https://github.com/elgopher/pi-template
ebitengine game-development pi
Last synced: 4 months ago
JSON representation
Pi template
- Host: GitHub
- URL: https://github.com/elgopher/pi-template
- Owner: elgopher
- License: mit
- Created: 2022-07-19T06:08:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-07-22T00:35:20.000Z (9 months ago)
- Last Synced: 2025-12-14T10:17:53.091Z (4 months ago)
- Topics: ebitengine, game-development, pi
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pi Game Template
This is a template for creating new games powered by [Pi](https://github.com/elgopher/pi).
## What's in the box? 
* A sprite sheet with a 32-color palette from [Picotron][picotron-faq].
* The sprite sheet includes one 8×8 sprite.
* A Go module importing all necessary dependencies.
* A `main.go` file containing code to run the game.
* Two variants of code: development (with dev tools) and release (without dev tools).
## How to use it
* [Go 1.24+](https://go.dev/dl/) is required.
* Use any Go editor, such as [Visual Studio Code](https://code.visualstudio.com/)
or [GoLand](https://www.jetbrains.com/go/).
* On Linux or macOS, install additional dependencies:
* [Linux instructions](https://github.com/elgopher/pi/blob/master/docs/install-linux.md)
* [macOS instructions](https://github.com/elgopher/pi/blob/master/docs/install-macos.md)
* Run the game with:
go run .
> Do not run `main.go` directly, because Go will not compile the other `main_*` files.
## How-to guides
### How to rename the module
* The template module is named `github.com/elgopher/pi-template`.
* Edit `go.mod` and replace the module name with your own, e.g. `module github.com/you/name`.
* Update the import path in `main.go` accordingly.
### How to edit PNG files
* Use a pixel art editor that supports indexed color mode, such as [Aseprite][aseprite] or [LibreSprite][libresprite].
* The palette for the game is stored inside `sprite-sheet.png`.
### How to create a release build (without dev tools)
```
go build -tags release .
```
## Attributions
* The palette used in `sprite-sheet.png` is the [original Picotron palette][picotron-faq] created by Zep.
[aseprite]: https://www.aseprite.org/
[libresprite]: https://libresprite.github.io/
[picotron-faq]: https://www.lexaloffle.com/picotron.php?page=faq