april 13th
New York City 2017


networked media
#33 _waster 01 · Servers?


Before we talk about how the server and client relate to each other on a space like this. First I should explain what the heck _waster is and how it plays.

_waster is an html multiplayer game where the user has to empty a pile of paper before other players do. (the paper might become dollar bills).

The image bellow is a simple wire-frame of what I have in mind. Pretty simple. In this case, 2 players are playing against each other to be the first to empty the pile of paper. In the example, there are to bars, that represent the piles, and a counter and a timer under them, the counter is to tell the player how far along they are, and the timer tells for how long they have been swiping.

alt text

The next image is a representation of how the player interacts with the game to make the papers fly away. Each swipe from a to f, takes a paper off the pile.

This first iteration of the game is meant to be played on desktop, and in a very specific manner. There are provably better inputs for a swipe than the keyboard, but the due to the time constraint of this project and my coding knowledge at this point in time, this is the best solution. And the experience for the user is as good as any other.

alt text

Now, to the “good” stuff

Running a server for multiplayer games

First of all, this is my interpretation of this text, so if I make no sense, first, tell me on the comments bellow, and then visit the linked page and check out the documentation for Lance. This is a Node.js based server done specifically for html multiplayer games.

alt text

This is a re-draw of the graph in the before-linked text, and it is a very good diagram of how the relationship between both sides of a webpage is, in this instance a MP game.

On one side, you have the Server, that has the game running, When I say game, I’m talking about the components that create the game; which mainly are, the Game Engine that includes physics and basically the backbone of the playable part of the game. And the Game World which is the result of the Engine and what you see once playing.

The only job the Server has is to communicate with all the different clients and to do so at a certain pace.

The tricky part are all the Clients. These function in the same way that the server does, but with an added step. They have to make sure that the data they send and receive is properly synced with the server and all the other clients. This means that before any data comes in or out of the client when a sync is called, it has to be sure that the sent information is up to date with all the others. A good example of this situation is when “lag” happens when playing a Online Multiplayer Video-game, When the latency is delayed and you connect to the server late, and therefore you are out of sync.

So sad... graphical representation

That’s it folks! I hope this has helped you to get the basics of how a server for MP games works. I did help me to write it down. There’s much more to it in each once of the stages but the essentials are there. I am still a n00b and I got much to learn. Hopefully the next post will show much more insight into the matter and some code of how to set it up.

Last, if you wanna see how the project is doing right now check out the repository or clone it

git@github.com:grauPuche/_waster.git


links that either, you should check out, or have been mentioned in this post

gP




Please, tell me how good or bad this post was. And comment on anything that comes up in that beautiful brain of yours.

0 Comments