Learn › GBA Beginner

Lesson 6 of 6 · About 5 min

Beeps, music and lives

Every coin here plays a few notes, and you will write new ones.

The hero of Spring Jump reaches for a coin in front of the boss.

Spring Jump's effects are short runs of notes and its music is an asset. Change a sound and how lives are earned.

How the GBA makes sound

The GBA has the four sound channels of the Game Boy (two square waves, one short wave and noise) and two more that play recorded sound. Many GBA games use the simple channels for effects and the others for music.

Spring Jump does the same. Each effect is a row of up to five notes in SFX_NOTE, written as pitches in Hz, each held for SFX_LEN frames. The music is the audio asset theme, which plays as a loop under the effects.

Notes as numbers

A pitch in Hz is how many times a second the sound wave repeats. 440 is the A above middle C; doubling a number raises the note by an octave. The coin sound is 988 then 1319: two quick notes going up, which reads as good news.

LIFE_EVERY says how many coins earn an extra life, up to MAX_LIVES.

A brighter coin

In the session you will make the coin sound brighter and earn a life every 10 coins instead of 15.

Spring Jump in the editor, with the AI's reply about the new coin sound in the chat.
Change the coin sound

Try it yourself

In the app this lesson opens a real game for you, with a guide that walks you through these steps:

  1. The first row of SFX_NOTE is the coin sound: 988 Hz then 1319 Hz.
  2. Make the coin sound brighter, and give an extra life every 10 coins.
  3. Collect a coin to hear it. Press Make this my game to keep this game in your games, where you can play it, change it and export it.
Start makingDownload on the App StoreGet it on Google Play