Modded Socket.io

1

Index

Attached Files

The following files have been attached to this tutorial:

.capx

socketioexample.capx

Download now 78.09 KB
.zip

socket-io-mod-johnnysheffield.zip

Download now 355.61 KB

Stats

12,103 visits, 30,087 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 2 Jun, 2013. Last updated 19 Feb, 2019

Construct 2

Yes, that was it, now you´re going to do the really fun stuff.

You´ll find the Capx on the left, it has all explanation it it, so please download it, and take a look on how it shall be done.

Remember, its only an example, do not copy&paste form it.

To find out all these informations I searched a very long time...

Possibilites

You could send very complicated data though Socket.io,

like “enemybuilt,tank,x,120,y,140,otherimportantinfos”.

The point is, not the server, need to recognize all this pile of data, it only need with what function it should be send further through. SO you in Construct 2, can take the data apart, analyze it, and use it.

The messages are going through SO FAST, that I would recommend everybody wanting to make a Multiplayer Game, willing to code, using Socket.io I used the testing with a DynDns address, and I can say, socket.io is very reliable.

Just don´t forget, the client emits data to the server, the server sends data to the client.

Mostly, broadcasting it to the specific room.

If you want to know more, use these links, they are very helpful, learning Javascript in Depth and learning more possibilities with Socket.io.

https://github.com/LearnBoost/socket.io/wiki/Rooms

https://gist.github.com/crabasa/2896891

http://udidu.blogspot.co.il/2012/11/chat-evolution-nodejs-and-socketio.html

http://socket.io/

DynDns get a HTTP address for your Server

.CAPX

socketioexample.capx

Download now 78.09 KB
.ZIP

socket-io-mod-johnnysheffield.zip

Download now 355.61 KB
  • 0 Comments

Want to leave a comment? Login or Register an account!