Multiplayer tutorial 1: concepts

Favourite 220 favourites
Tutorial written by AshleyOriginally published on 3rd, March 2014 - 4 revisions


Developing multiplayer games is difficult, even though Construct 2's Multiplayer object takes care of many of the complexities for you. In the same way the events to every game are different, the way multiplayer messages and data are handled will depend on the type of game you are making. As a result the Multiplayer object has relatively abstract general-purpose features so you can make best use of it for your particular game. To make best use of these features it is important to understand how multiplayer online games fundamentally work, the problems that arise, and how they are resolved.

If the features are used incorrectly, your game could end up being unnecessarily laggy, have strange and difficult bugs, or make it possible for players to cheat. While you may be keen to start designing your multiplayer games as soon as possible, it is strongly recommended to read through the complete set of multiplayer tutorials before starting. Additionally this should be considered an advanced feature: beginners may find it very difficult, and intermediate users may find themselves stretched.

If you're ready to begin learning how multiplayer games work, read on!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.


SergioRM 6,968 rep

very interesting thanks for the tips and waiting for the beta!

Monday, March 03, 2014 at 11:36:00 PM
exertia 2,630 rep

Thanks, this is an impressive feature that I'm looking forward to, and will make our games much more addictive and fun!

Eager to see the next round of tutorials, showing how this is implemented, and hopefully the next beta will ship with an example Multiplayer project / template.

Tuesday, March 04, 2014 at 12:17:36 AM
Pennington Games 3,087 rep

It is all very clear thank you for taking this time to educate us in all of this. I know there is more to learn but if you continue to teach with this simplicity I am anxious to learn ....Thanks!

Tuesday, March 04, 2014 at 12:53:46 AM
farsmile90 10.9k rep

It's a good beginning of the MP plugin, i can't wait to get my hand real dirty on the beta R164 included multiplay.

Tuesday, March 04, 2014 at 2:08:50 AM
jimmycat 2,500 rep

Brilliant food for thought, anxious to learn more

Tuesday, March 04, 2014 at 2:14:01 AM
russpuppy 9,482 rep

so will LAN only games be possible if a signalling server is required?

Tuesday, March 04, 2014 at 2:33:47 AM
eroder 829 rep

I wanna try

Tuesday, March 04, 2014 at 4:40:33 AM
jayderyu 15.2k rep

"A common solution is to not clearly indicate where players are aiming, so player B can't easily see player A appears to be aiming behind them, making it look more acceptable when they are hit."
The Ghost shooter demonstrates the problem when you can see a been or particles left behind. :D

I have to say after having started to write my own client side code(server core disapeared). I'm impressed that at how much is being done. Even offering a signalling server goes beyond just providing an api. Kudos Ashley Gullen for your fantastic work. Not just on this impressive plugin, but on C2 in general. I believe the fortunes of Scirra will be increased in the following couple of years.

Everything Ashley addressed is pretty much standard. I'm actually more impressed that Ashley is doing so much work on this to provide pretty much as much coverage for the C2 developers as possible. Ashley is doing a fantastic job and well beyond my expectations.

The article I thought was very clear of what the plugin will be capable of doing, but the article was technical. So it's what ever you want and structure however you want. There is no mention that a signalling server is required. The article only mentions that Scirra will provide an optional signalling server.

It's still possible to use central servers though: you can design your game so the host is not a participant, and leave it running on a dedicated server. However this requires paying for the server hosting, so the peer-to-peer approach is likely to be cheaper.

----For a joining peer to be able to connect to the host, it needs to know where they are and how to connect to them. This involves finding out their IP address, finding out if they have a router that restricts connections, and working around those restrictions if possible.-------

As long as you have the IP and all LAN gamers should certainly know how to get an IP. There is no problem for LAN games.

Tuesday, March 04, 2014 at 4:56:45 AM
Gaming Mantis 772 rep

Fantastic introduction to the Multiplayer plugin. I have almost no knowledge of networking and I understood almost everything written here.

Tuesday, March 04, 2014 at 5:42:13 AM
aerger 4,957 rep

All tutorials should be as well-written. Thanks again, guys.

Tuesday, March 04, 2014 at 7:31:50 AM
Doc Ai 2,306 rep

This is really amazing. Btw,I love the Multiplayer test sessions.

Tuesday, March 04, 2014 at 9:54:25 AM
thehorseman007 14.8k rep

Awesome as always, the for sharing.

Wednesday, March 05, 2014 at 1:11:36 PM
Mulkaccino 7,316 rep

As an America English speaker, I got really tripped up on the sentence "Google also publish statistics on the..."

Wednesday, March 05, 2014 at 4:36:19 PM
Bigheti 17.5k rep


Thursday, March 06, 2014 at 2:56:16 PM
AbelaNET 14.9k rep

What a nice easy article to follow Ashley. Thanks. Looking forward to read more on this subject and to start using such a cool feature. Keep it up.

Thursday, March 06, 2014 at 11:24:39 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.