Skip to content

elgopher/pi-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi game template

This is a template for writing new games powered by Pi.

What's in the box?

  • sprite-sheet file with 16 colors palette from Pico-8.
  • the sprite-sheet file has one sprite with number 0
  • project is a Go module importing all the necessary dependencies
  • main.go file contains code running the game
  • game code is inside game package
  • two variants of code: for development (with devtools) and release (no devtools)

How to use it?

  • Go 1.20+ is required
  • Use any Go editor such as Visual Studio Code or GoLand
  • If not on Windows, please install additional dependencies for Linux or macOS
  • Run the game with go run . (or run directly from your editor)

Howtos

How to rename the module?

  • this template has a module named github.com/elgopher/pi-template
  • edit the go.mod and replace the module name with your own, e.g. module github.com/you/name
  • do the same with import in main.go

How to edit PNG files?

  • Use a pixel-art editor which supports indexed color mode, such as Aseprite or LibreSprite.
  • Palette for the game is stored inside sprite-sheet.png.

How to create release build (with no devtools)?

go build -tags release .

Attributions

Releases

No releases published

Packages

No packages published

Languages