Log inGet started
Package

game.module

Newest version

README.md

game

Paper Boat as curtainKit hooks plus its config: a two-button game where you hold Left (Space / Z / W / left mouse / pad A) or Right (X / Shift / S / right mouse / pad B) to steer a folded paper boat down the garden brook to the pond.

local Curtain = require("curtainKit.api")
local PaperBoat = require("games.paperBoat.game")
Curtain.start(PaperBoat.config)   -- the scene's onLoad, in play
  • PaperBoat.game: reset (boat to the start, blossoms back, paper from the newest unlock), begin, update (steering, blossoms and streaks, distance points, knocks, the pond), idle (bobbing on the title, drifting into the pond or sinking during the ending), stop, pause.
  • PaperBoat.config: title, paper look, two buttons, title camera, opening cutscene, win / lose endings with their cutscenes, four stats (distance, blossoms with a running total, dry folds, best streak), grades and four unlocks (Newsprint, Origami red, Sky-blue, Gold-leaf boat papers).
  • PaperBoat.state: the live run (z, off, folds, blossoms, streak, ...), read by tests and autopilots.

Scoring: 1 point a metre; a blossom is 10 x the streak multiplier (x2 at 5 in a row, up to x4); reaching the pond is +500 and +250 for every dry fold left. Three knocks sink the boat.

Needs the scene scenes/paperBoat.scene (entities Boat, hull, paper_<id> and one per course id) and the course (games.paperBoat.course).