このページはまだ日本語訳がないため、英語の原文を表示しています。
ガイドTeaching and game jams
A class or a jam needs a path that works on a prepared machine and ends with a playable web build. Pin the Go and NSGo versions used by the templates, keep each student's project in its own directory, and run the same go tool nsgo commands locally and in CI.
Prepare a lab image
Install the Go version listed by the repository's compatibility table and one current NSGo release. Create one project while the network is available so Go downloads the game module and the game tool into the module cache; replace latest with the game release the class pins:
go run github.com/nsgo-dev/game/cmd/game@latest new -template starter starter-demo
cd starter-demo
go tool nsgo test ./...
Copy the module and build caches to the lab image, or warm each machine with the same command. With a complete cache, project creation and builds can run without a proxy:
export GOPROXY=off
export GOFLAGS=-mod=mod
go tool nsgo test ./...
The first download, a new Go toolchain, a new template version and any external service still need a network connection. Do not put personal API keys in the image. Give each student a project directory and a separate .game or .nsgo cache when machines are shared.
Pick a scope
Start with starter for a one-session exercise. platformer2d, puzzle2d, cards2d and visualnovel fit a weekend when students change one mechanic and a small amount of art. rpg2d, rts2d, shmup2d and the 3D templates need more content and should be a team project. The Templates page lists each template's controls, files and test entry points.
A 48-hour loop
- First hour. Create a project, run its tests, and start
go tool nsgo dev. Change one value in a YAML data file and one line of Go so every student sees the edit-run loop. - First day. Keep the first playable scene small. Use placeholder sprites and sounds, commit after each working change, and run
go tool nsgo test ./...before adding a new mechanic. - Second day. Add a menu, one complete level and a deterministic test. Use Testing games for
nsgotest, replay and golden-image checks. - Ship. Build the web export and serve its directory from a local static server; once it plays, upload the
.zipthatnsgo buildwrites in the releases directory to itch.io:
go tool nsgo check
go tool nsgo build -target web
python3 -m http.server -d dist/<name>-<version>-web 8000
Open the exported page from http://localhost:8000 and try it in a private browser window. A web game needs a click or tap before audio can start. Keep the first scene and downloaded assets small enough for the jam's connection and itch.io's upload limit.
Organizer checklist
- Pin the Go, NSGo and game-layer versions in the starter project.
- Prepare one project per student or team, with a writable directory and no shared credentials.
- Warm the module cache and verify
GOPROXY=offon a disconnected test machine. - Install a browser, a text editor and the target platform tools before the session.
- Keep a known-good web zip and a static-server command for upload failures.
- Ask every team to run
go tool nsgo test ./...andgo tool nsgo checkbefore submitting. - Collect the project source,
game.yaml,nsgo.yamland the web release zip.
Follow the Getting Started guide for the first project, the Tutorial for a structured class, and Building and Shipping for signed platform releases.