Create a Scoreboard

Learn how to make a super cool zombie game

2. In game.js delete the old getCharacters() code and ad the new code in the create() function.

		(player) => {
			g.handleLeaderboard('players', 'Scoreboard');
			if ( === g.myId()) {
		(player) => g.handleLeaderboard('players', 'Scoreboard'),
		(id, attr, value) => {
			if (attr == 'filled' && id == 'filled' &&
				value <= 1 && === g.myId()) {
			g.handleLeaderboard('players', 'Scoreboard');

3. In room.js, in the onupdate function, inside of your handleCollision method add a character with a score of 100 using the getACharacter() function.

	g.getACharacter('players', bullet.playerId).score += 100;

Now the scoreboard should be set up and our game is almost finished!

Download your zip, and upload it to, and you should have a background!

Add HowTo Screen
Zombie Game

Need Help?

Proofread your code, check with your team and classmates, and if you’re still stuck!

Click Here for Help