Multiplayer Demo in C2

  • I gotta say, this looks really amazing. I also gotta say, I have no idea how it works or what you're doing. <img src="smileys/smiley36.gif" border="0" align="middle" /> I guess your ultimate goal is to make it so accessible that even people like me can use it! Keep up the great work.

    you know the drill...what he said - lol.

    this sir, looks amazing. if you end up doing half of what you intend, this will open up incredible paths for more game types.

    i could finally make that networked cavemen checkers game...lol.

    in the words of the surgically enhanced north korean dictator, fencer and ice hotel manager...you can sleep when you're dead.

  • talkinghead: This sounds very promising.

    The "messing in runtime.js" part will indeed be a bit complicated for unexperienced users. But it looks like you majorly covered the documentation part and so this should go smoothly and painlessly for most users.

    arandaschimpf: The better place to start is the manual SDK. This is progressive, have good links to learn about JS with references and guides.

  • Hi talkinghead, good work on the demo. Do you know how big is the lag? Judging from the new video it looks like something around 100ms (or 80 - 160 ms), which is ok, but how it changes if you join more than 2 players?

  • The first multiplay concept I've seen since my start out here with C2. Hope it all goes to plan and works out, looks good so far!

  • i'm loving this because i would like to make some card game and turn based board games. so lag is of no matter to me. just being able to network two or more players for a game, and allowing them to interact is gravy on my potatoes.

    but i definitely understand, for people doing more action type games, they would want it as lag-free as possible.

    but if i can hook up players with this, then cavemen checkers...is a go - lol.

  • i'm loving this because i would like to make some card game and turn based board games. so lag is of no matter to me. just being able to network two or more players for a game, and allowing them to interact is gravy on my potatoes.

    but i definitely understand, for people doing more action type games, they would want it as lag-free as possible.

    but if i can hook up players with this, then cavemen checkers...is a go - lol.

    what he said...

  • talkinghead This is excellent! I have been looking and asking about this since I've joined C2.

    I am actually doing some testing today using socket.io & node.js but it looks like you are leaps and bounds ahead of me!

    Can't wait to try this out! Are you running this on Linux or Windows?

    The file system formatting is different for Linux & Windows backslash vs forwardslash - so projects with links to sub folders don't port well to windows.   

    I am currently using Ubuntu and Windows 7 to run Node.js.

    I have a post response here on how to setup Node.js on windows.

    scirra.com/forum/set-a-websocket-server-that-is-compatible-with-c2_topic47632_page2.html

    Also here is a little hack to get NowJS running on windows natively.

    blog.nowjs.com/running-nowjs-natively-on-windows

    Looking forward to see how you put this together!

    This reminds me some of your video demo:

    liveballs.nodejitsu.com

  • talkinghead Really cannot wait for this!!! It's gonna be amazing to make my first multiplayer game!!! :D:D:D:D <---- Excitement :D:D:D:D

  • Damn this marks a really important step on C2 ascension :D Great work !! It opens a lot of new possibilities for us all :D

  • Hey everyone, thanks a lot for the encouraging replies! I really do appreciate this a lot!

    Sorry for not being around the last couple of days, I was just so busy at work. Also haven't managed to progress a whole lot, plugin development wise. Will probably start working on the plugin from around Tuesday on, with the intention of releasing everything in about 2 weeks (hopefully, by that time, all will be a lot more stable).

    I'm gonna try to answer everybody's questions now, so brace yourself for a wall of text. lol

    smitchell

    This is indeed possible. However you will need to do a fair bit of coding, server side.

    arandaschimpf

    Thanks. A good starting point might be Mozilla's Javascript Guide: developer.mozilla.org/en/JavaScript/Guide

    Having the basics down will help out a lot, from there on its just a matter of phrasing your question the correct way and asking Google or Stackoverflow.

    GenkiGenga

    Thanks for the kind words! Yes, you understood correctly. In essence I'll just provide an infrastructure, a framework so to say. I'll probably build in some more functions apart from "call function" and "receive response" that will hopefully make your life a lot easier as I go along. But essentially yeah, it's just a "two action" plugin and you will need to modify the runtime.js file as well as of course your server coding itself.

    Kyatric

    Glad you like it! Extensive documentation is the plan, so hopefully it'll make the whole experience a lot smoother.

    Noga

    Thats fairly hard to asses tbh. Firstly, node as well as nowjs are non-blocking and can handle events asynchronously. Node by itself is designed to handle maximal server load fairly efficiently. Node for example is a lot faster than Apache (maybe not the best example, but just for the sake of it), can handle a lot more requests and greater server load at the same time. However, node is of course more resource intensive. Nowjs is essentially a socket.io wrapper, so it will achieve more or less the same performance (however, keep in mind that nowjs is written and optimized towards real-time applications/games).

    Another huge advantage of node is it's "out of the box" optimization. This matters greatly, because with node one doesn't need to embark on low-level concurrency optimization and can instead just write server code and deploy, most of the functionality will work out of the box.

    That being said, a lot will depend on your server as well as your game/server code and nothing can be easily determined without a working demo or a specific test case. Some further reading that might be of interest:

    blog.3rd-eden.com/post/5809079469/theoretical-node-js-real-time-performance

    harrio

    Cavemen checkers is indeed a go. Oh and:

    n the words of the surgically enhanced north korean dictator, fencer and ice hotel manager...you can sleep when you're dead.

    I think "what he said" has never applied more as it does right now haha.

    mars1985

    Actually, the most recent stable release of node as well as npm comes with a native win binary, so no need to hack around with cgywin (at least thats what I used to do). Just download the exe installer from node's homepage, install everything. Open up cmd, type "npm install now" and you are good to go.

    In regards to backslash vs. forwardslash, it is always recommended to go the unix way, so always use "/" whenever you can. Firstly, node will always normalize paths and windows itself has had support for "/" since forever (well, at least since winXP that is).

    Kiyoshi

    Glad you are as enthusiastic about this as I am! Hopefully, this will allow for a ton of new content to come out of the C2 community.

    Also, I just wanted to mention that I'll be including the following projects with the plugin (this includes server code, C2 files as well as modified runtime.js files).

    1. "Hello World" (of course haha)

    2. A real time game (most probably a clone of pong)

    3. A turn based game (probably a simple multiplayer card game)

    4. A couple of smaller projects

    5. ??? (requests are welcome, as long as its not overly complicated)

    Right, thats all for now. I've gotta run out and get some work related coding done (on a Saturday no less... but well, it's crunch season haha). Updates will follow.

    Cheers everyone!

  • "1. "Hello World" (of course haha)

    2. A real time game (most probably a clone of pong)

    3. A turn based game (probably a simple multiplayer card game)

    4. A couple of smaller projects

    5. ??? (requests are welcome, as long as its not overly complicated)"

    You could make a racing game, There is a standard top down racing game, and a isometric one you can download,they have most of the logic down, you just need to add your multiplayer plugin to it :)

    Quick Question

         - Will your plugin work on mobile games?

  • Quick Question

         - Will your plugin work on mobile games?

    what he said...

  • Just dont burn yourself out mate - (or forget about working on your little project as well!) Other than that - Awesome, as usual :)

    this sir, looks amazing. if you end up doing half of what you intend, this will open up incredible paths for more game types.

    Oh, and what he said!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey can you explain me how it works

    i am completely on the moon

  • : There's nothing that has been released yet.

    You can always dig informations in this very topic. It's only 5 pages to read, take your time and read it several times if you need.

    Talkinghead is working a complete solution with tutorials and easy access.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)