Setup Camera Follow

Learn how to make a super cool zombie game

1. In game.js, Setup the camera follow function in the create() function.
code/client/src/game.js

		g.getCharacters('players', (player) => {
		if (player.id === g.myId()) {
			g.cameraFollow(player.sprite);
		}
	});

Make sure that you **don’t write a new getCharacters function, just change the one you already had for 'players'.**


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


Add a Background
Add Zombies

Need Help?

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

Click Here for Help