Setup Login Screen

Learn how to make a super cool zombie game

1. In game.js, delete g.connect(); and replace it with login screen code.
code/client/src/game.js

	g.useLoginScreen(name => g.connect ({name}), 'Zombies', 'Username', 'Start!');


2. In room.js, add this code to the bottom of your onJoin() function to customize the login screen.
code/server/rooms/room.js

	g.attachTo('players', client.sessionId, {  
		name: 'nameTag',
		x: -50,
		y: -60,
		type: 'text',
		text: data.name
	});


3. In room.js, Delete the existing createACharacter() function and replace it with a new one!
code/server/rooms/room.js

	g.createACharacter('players', client.sessionId, { x: 200, y: 200, score: 0, ...data });


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


Setup Bullets
Set Players Rotation

Need Help?

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

Click Here for Help