This repo contains a simple game (yes, very very very simple game) for Game Boy Advance (GBA) in Go, with a basic code organization.
We use:
- TinyGo
- TinyFont
- TinyDraw
- Gopher font (thanks @rakyll <3)
Please read the Learning Go by examples: part 5 - Create a Game Boy Advance (GBA) game in Go article in order to know more about this Git repository.
This simple app/game run on Game Boy Advance portable console and:
- display a screen with "Gopher" text and "Press START button"
- display two gophers
- When you press START button: your Gopher player just appear
- With multi directionnal arrows you can move your Gopher at left, right, top or bottom
- When you press A button: your Gopher jump :-D
- When you press SELECT button, you go back to "Start" screen
Install Go in 1.16 version minimum.
Install TinyGo.
Install mGBA emulator.
or:
$ tinygo run -target=gameboy-advance gopher.go
tinygo:ld.lld: warning: lld uses blx instruction, no object with architecture supporting feature detected
$ tinygo build -size short -o bin/gopher.elf -target=gameboy-advance gopher.go; mv bin/gopher.elf bin/gopher.gba
or
$ task build
Let's run our app on mGBA emulator:
$ mgba bin/gopher.gba
Controls are configurable in the settings menu of mGBA. Many game controllers should be automatically mapped by default. The default keyboard controls are as follows:
A: X
B: Z
L: A
R: S
Start: Enter
Select: Backspace