Premium Features

Download Video

Connect and disconnect players

Published a year ago

Time to learn about backend connections with socket.io. There's a lot to cover here, but the most important takeaway is that all game data is stored on the backend and broadcasted to connected users.

This lesson will teach you how to:

- Connect and disconnect players

- Remove enemies

- Install nodemon

- Install socket.io@4.6.1

- Create initial connection

- Create new http server

- Use new http server required for socket.io server

- Listen for a connection event

- Create first player using sockets

- Create multiple players with sockets

- Remove players on disconnect and timeout

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.