Open the game in your browser. Then open the code file in a simple text editor (Notepad on Windows, TextEdit on Mac, or VS Code). Change the value, save the file, and refresh the browser to see your change in the game!
๐จ Change Belly's colour
Belly is pink โ but she doesn't have to be! A single line of code controls her colour. Find it and change it to any colour you like.
// Explorer Task 1: change this colour! this.color = '#ff79b4'; // โ this is Belly's colour
The #ff79b4 is a colour code โ a # sign followed by 6 characters. Try one of these:
'#00ccff' โ sky blue '#ffdd00' โ sunny yellow '#ff6600' โ orange '#44ff88' โ mint green '#cc44ff' โ purple
this.color = '#ff79b4'
means "set my colour to pink". Changing the text changes what the variable stores.
โฌ๏ธ Change how high Belly jumps
Want Belly to jump like a rocket? Or barely hop off the ground? One number controls the jump height.
static NORMAL_JUMP_IMPULSE = -9; // Explorer Task 2!
-5 โ tiny hop -9 โ normal jump (the default) -14 โ big jump -20 โ mega jump (nearly hits the top!)
NORMAL_JUMP_IMPULSE.
Naming it means you can find and change it easily. In game physics,
negative vertical speed means moving upward.
๐ฌ Change how many candy canes trigger Bonkers Mode
Bonkers Mode is the wild super-speed rush you get by collecting candy canes. You can make it trigger after just one candy cane โ or make it much harder to unlock!
normal sectionnormal: { candyCaneRequired: 3, โ change this number! candyCaneSpawnMin: 700, runDuration: 5.0, speedMultiplier: 3.0, // ... more settings },
1 โ Bonkers after just one candy cane! 3 โ normal (the default) 6 โ much harder to unlock 10 โ nearly impossible (good luck!)
candyCaneRequired: 3
means "the candyCaneRequired setting has a value of 3".
Change the number, change the game!
๐ Change the starting game speed
The game starts at a speed of 160 pixels per second. Change this to make the game feel really slow and relaxed โ or terrifyingly fast!
const CONFIG = { INITIAL_SPEED: 160, โ change this! (px/second) SPEED_RAMP: 2, โ how fast speed increases // ... more settings };
60 โ very slow โ easy for beginners 160 โ normal speed (the default) 300 โ fast from the start! 500 โ good luck catching anything...
SPEED_RAMP: 2
to 0 โ the speed will
never increase and the game stays the same speed forever!
๐ Change the sky colour
The level 1 sky is a gradient blend of three blue colours. Change them to create a sunset, a stormy sky, or even a night sky!
drawBackgroundLevel1 function and look for the sky gradient// Explorer Task 5: change the colour strings! const sky = ctx.createLinearGradient(0, 0, 0, groundY); sky.addColorStop(0, '#5bc8ff'); โ top of sky sky.addColorStop(0.65, '#a8e4ff'); โ middle of sky sky.addColorStop(1, '#d4f0ff'); โ bottom of sky
// Sunset sky sky.addColorStop(0, '#220066'); sky.addColorStop(0.65, '#cc3300'); sky.addColorStop(1, '#ffaa00'); // Night sky sky.addColorStop(0, '#020015'); sky.addColorStop(0.65, '#0a0a44'); sky.addColorStop(1, '#1a1a66'); // Candy-floss sky sky.addColorStop(0, '#ff88cc'); sky.addColorStop(0.65, '#ffbbee'); sky.addColorStop(1, '#fff0ff');
addColorStop(position, colour)
call is a function โ it does a job (adding a colour) when you call it.
The position is a number between 0 (top) and 1 (bottom).