Separate game logic on the server in Node.js​

How to make code easier to work with? DON’T WRITE IT IN ONE FILE!

And that is exactly what we are going to do here. It will be the last part of the Server-Side WebSocket series.

If you missed previous ones, you can go back to preparing the local environment or writing base for our server.

In this post, we will create a new script responsible for the game part of the server.

Continue reading “Separate game logic on the server in Node.js​”

Preparing the environment for WebSocket Server in Node.js

At Edge Experience Hackathon, I had to write client and server-side code in Node.js for our game. I wasn’t pleased with the quality of code there, so I decided to rewrite it and show you how to implement WebSocket communication between server and Unity client.

A little disclaimer. I’m working on Mac, and I have a Terminal, so if you are on a Windows machine, you might have to use CMD, but I’m not promising that Terminal commands will stay the same for you.

This post also starts the series on Client-Server communication based on WebSockets. If you want to follow this series, make sure to join my newsletter!

Continue reading “Preparing the environment for WebSocket Server in Node.js”