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 shmup2d template

shmup2d is one stage of a vertical shooter on a 270×480 portrait playfield. Enemy waves fly in on dive, weave, cross and hover paths and fire bullets patterns; destroying a whole wave drops a power, bomb or life item; a boss with three phases ends the stage. Defeating the boss is the win, losing the last life the loss. It plays with the keys or WASD, a controller's stick, D-pad and buttons, and by dragging with a finger or the mouse, with a bomb button on touch screens.

  • data/stage.yaml is the stage: the ship's speeds, lives, bombs and weapons, the enemy kinds with their paths and patterns, the waves with their times, places and drops, and the boss with its phases. stage.go defines the format, with a version, unknown fields refused and a canonical encoding, which a test and a fuzz test hold to.
  • data/patterns.yaml holds every bullet pattern in the bullets format and data/explosion.yaml the explosion in the particles format.
  • world.go is a run of the stage: the ship, enemies, waves, items and boss, and the systems that step them, which take one step's controls and report the events the game plays sounds for. controls.go turns the input map and the drag into those controls, game.go and hud.go hold the loop, the title, play and end screens and the native HUD.
  • The sprites are painted in code and the sounds come from the placeholder pack; CREDITS.md lists them.
  • The tests play the stage through nsgotest: a pilot that dodges and shoots clears it with a controller, and a ship left idle is shot down through the keyboard. Other tests cover touch, the mouse, pausing, every system of the world and the data files. playtest.yaml and playtest_test.go wire the shooter bot profile so go tool game playtest runs seeded stage playtests and reports clear rate, hits per wave and power-up pickup rate.

Its README.md lists the controls and where to change the stage, the patterns, the paths, the items, the art and the sound.

Editar esta página