Login Register
 
RSS Feed Twitter Facebook YouTube

Multiplayer!

Multiplayer!

Hi, everyone,

I’ve come to do a little report on the progress of multiplayer gameplay. Also I will try to add in some of the technical points, because I hope there are other people like me reading this, who will find that interesting!

Our plan is to ultimately be able to go onto various planets. On some of which you will be able to see other (real) people driving around. More importantly, you will also be able to destroy each others’ machines! (A little bit of competition will surely inspire you to build better and crazier machines 😉 )

I have been working on this for a while, and we have been doing some tests to determine how it will work. We don’t want to launch multiplayer before it is good enough – but we think it is important (I want to play it, too!), so we are going to launch it as soon as we can.

Now, anyone who does not know about making network multiplayer games will probably think it is quite simple, something like:

  1. move your character
  2. tell the server that you moved
  3. server tells everyone else
  4. continue having fun
  5. goto step 1

This is basically, true. But there are other factors to take into account. The main issue is latency (it can take a long time to send data over networks). Not having the latest data in time can cause players to see the wrong things happening, at the wrong times, which is bad. The way to deal with this is quite simple (sounds simple, anyway): your game must guess what is happening. This should be quite straightforward, since, based on the laws of the game engine, you can tell what should happen next by running the game.

Unfortunately, that isn’t good enough. Because while your game is “guessing” where another player (in another part of the world) is going to move, that player could, for example, change direction. You will receive that information after it has happened!

I don’t think there is any full solution to that problem, except to accept latency, and wait for 0.5 seconds or so after pressing a key for the server to validate your movement and send you the new position. However, such a delay is not fun!

So we have to solve that problem a different way: when you receive information that is different to what your version of the game thought was happening, you have to correct it. But instantly snapping an object to a new position is ugly and confusing. What will really happen is it will slowly blend to its true position.

Ultimately, this means that, strangely, nobody will see exactly the same things… But hopefully it will be close enough not to cause arguments!

Now, I wanted to add some media here, but I didn’t currently have any cool art of my own. So I’ve attached a little UML graph of the current state of the multiplayer network code. If you are one of those people like me, I’m sure you will see some beauty in it! If not, try squinting a little bit!

 

2 Comments

Leave A Reply
  1. TheTeddyTeam says
    15/06/2013, 20:17

    I do see beauty in this. Whenever I try to simply design a game, it ends up with lines everywhere and the friend I work with has absolutely no idea what any of it means. It’s funny and annoying at the same time 😛

  2. spudymark says
    13/06/2013, 21:12

    awesome

Comments are now closed.