Simple networking with Monkey, node and Socket.io

Monkey Targets Forums/HTML5/Simple networking with Monkey, node and Socket.io

Salmakis(Posted 2016) [#1]
I made a quick sample how we can use Socket.io and monkey-x for Network stuff using a nodeJS server.

I tried alot solutions with own websockets, get/post, nuggetta and some other frameworks, that are usually cost money from a specific amount of messages send.

Socket.io is a very cool network api for browser communication with nodejs, it uses a websockets and also a fallback swf in the background if the browser not supports them.
games like agar.io, slither.io are made with socket.io

its usually used with jQuery, anuglarJS or Phaser, but i want to stick with monkey so i made spend a few hours to get into it, and suprisingly this was very easy to achieve.

the one and only "bad" thing is that it needs a server running nodejs service with an open port, wich may be a problem for some hosters.

I wrote down a bit on my site how to do it, also you can "play" a sample there:
http://www.moonforge.net/?page_id=405

you can find the small simple test "game" also on github:
https://github.com/Salmakis/MonkeySocket.io

im happy for any suggestions, questions or an info if i make a mistake or worst practicing somehwere, also feel free to use it in one of your projects.
maybe someone hase the time and willingness to make a android / ios version to.
(socket.io is cross plattform compatible on that)


Landon(Posted 2016) [#2]
very cool thanks!


Landon(Posted 2016) [#3]
HAHA Sweet i got it running

http://s18858330.onlinehome-server.com:3000/MonkeyGame.html


arawkins(Posted 2016) [#4]
Nice! I'm going to give this a shot as well.


arawkins(Posted 2016) [#5]
Ok, managed to get it up and running! I gave the blobs some movement & graphics and tried updating them in real time.

http://monkeyserver-dev.us-west-2.elasticbeanstalk.com/

Seems a bit jittery but it manages to keep the cars in sync (I've only tested with a couple of browser windows so far).


Salmakis(Posted 2016) [#6]
Cool stuff guys =)