GitHubComeçar

Esta página ainda não foi traduzida para português, por isso a versão em inglês é exibida abaixo.

Guias

The rhythm template

Notes fall down four lanes to the beat of a song, and the player hits each lane as its note reaches the line; hits build a combo and fill the energy bar, misses drain it, and the chart is cleared by reaching the song's end with energy left and failed by running out. Because the four falling lanes and stacked menus are tall, the root scope requests portrait orientation on phones (cx.RequestOrientation(core.OrientationPortrait)). The template shows how a rhythm game grows: the song list, the judgement windows and the energy rules in songs.yaml, a versioned YAML file with unknown fields refused and a canonical form, which songs.go reads and writes, with each song's tempo in a rhythm beat map beside it; the rules in run.go, a Run that judges hits by track position and knows no clock, so its tests drive it exactly; the music played through an audio.Player and followed by a rhythm.Clock, with the template unwrapping the position a looping track shorter than the song reports (unwrapLoop) before passing it to rhythm.Clock.Sync; hits judged by when the key or the finger went down rather than by the game step that reads them; latency calibration on rhythm.CalibrationScreen, through the same input as the charts, kept per device by rhythm.OffsetStore; the input map in game.yaml, bound into input.Actions with each lane's column bound to touches and the mouse; and the best clear of each chart kept with save. To change the game, chart a new song in songs.yaml with its beat map and music under songs/, whose tests check the file is canonical and every chart fair; tune the windows and the energy there too; rebind the controls in game.yaml; and change how the playfield looks in draw.go. The template's README lists the controls, the songs format and every file.

Saving records

Pulse Lanes keeps the best clear and its longest combo for each chart. If the record slot came from a newer game version or cannot be recovered, the game keeps the original save and tracks new results for the current session. Update the game to open a newer save.

The menu and results show the notice. When a write fails, choose Retry save to write the best clears earned so far. Free up space first if the notice says storage is full. Save details lets you copy the slot error, game version and build for support. The English and Chinese notices live in strings/.

Editar esta página