[PLUGIN] Network v0.3a update***

This forum is currently in read-only mode.
0 favourites
From the Asset Store
[C3] Banner ads, Interstitial ads, Rewared video ads, Rewarded Interstitial Ads
  • Here it is folks...I think I've worked out enough bugs to be comfortable posting an Alpha.

    <img src="http://i52.tinypic.com/2yxljx2.png" border="0">

    I implemented the plugin on top of ENET (a very fast lightweight UDP library). ENET was specifically designed for fast online multiplayer gaming. enet.bespin.org It can be used for free or commercial games w/o cost just reference me and the ENET license enet.bespin.org/License.html.

    The plugin uses UDP (both a fast unreliable (e.g. position updates) and a slower reliable (e.g. chats)) for communication. It also supports virtual channels so you should never put reliable and unreliable comms on same channel.

    I built an example net shooter game w/ CC v1.1 to show you how it works and also included a short README.

    <img src="http://i51.tinypic.com/5fpwkw.png" border="0">

    Network Plugin - Download

    Updated v0.3a - Aug 14th to add condition "On connect failed" for the client and fixed chat bug (you can type any characters now).

    Enjoy!

  • Wow, its nice and simple as well.

    Runs off to play.

    Makes new thread on forum called "Lets talk turn based games".

    Nice job there Scidave, Construct is officially now multiplayer.

  • Amazing! =D I can't wait to play around with this <img src="smileys/smiley15.gif" border="0" align="middle" />

    Thanks a tonne SciDave!

  • YES! Finally!

    Networking with Construct. Hopefully this will become a standard plug for future releases of CC <img src="smileys/smiley4.gif" border="0" align="middle" />

    Can't wait to test it myself. Your work is much appreciated. Thank you.

    (But don't you dare to take a break now <img src="smileys/smiley17.gif" border="0" align="middle" /> )

  • Is there any kind of prediction in this?

  • Wow!, nice job scidave

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome! Can't wait for a tutorial. <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Is there any kind of prediction in this?

    Nope. It does keep track of ping RoundTripTime (although I haven't exposed that yet) so I could add prediction, but I have no plans to. There is no lag compensation built into the plugin.

    If you are wondering if you should finish the Online plugin..I'd say definitely yes! That plugin is much different than mine with player tracking, uses parameter actions to push new parameters, and with your plan to add lag compensation would make online much better.

    I see my plugin being more for really simple games/turn based games or users who know how to add prediction/lag compensation to their games.

    Phobos and all   Thanks! I don't know how many hours I put into this plugin so it feels good to have released it. :-) The readme combined with the net shooter.cap should serve as the tutorial. It is super simple to use.

    Edit: Although, I probably will due a tut once the final plugin is released.. but who knows when that will be. ;-)

  • This is freaking awesome!!!

    Already reworking on some projects now thanks to this!! Amazing scidave

  • still haven't had the chance to try this, and I really haven't look into network code yet, but I would definitely want to be able to add my own prediction. I'm assuming this RoundTripTime is needed to be able to attempt any real prediction, could you please add an expression for it?

    thanks again for this

  • This is what I did:

    I opened cmd and got my ip, pasted it in the ip editbox and entered a name, and hosted the game.

    Then i started a second instance of the application and pressed join after having inserted a ip adress and a name and it does not work.

  • lucid - Yes, I'll add adding the RoundTripTime to first thing for 0.2 build.

    Urled - To host a server you simply click "Host Server". After the server starts it will show you what IP it is listening on in the chat box. If you are on a Lan that is the IP you need to connect to ( if on local machine you can just use 127.0.0.1). If not see below.

    You need two client instances to play the game. Put in the IP address of the server and your name and click "connect client" button. You should see the client "waiting for other player to join".

    NOTE:   If you are playing over the internet then you need to enable port forwarding to port 5000 on that same server IP on your router. The router IP is then the one that the clients connect to.

    Are you playing on LAN, local computer, or Internet?

  • I used with hamachi. It works great. Thank you. Superb plugin.

  • Was just poking around at enet.bespin.org, and didn't see anything about multicasting. So I guess that's not possible?

  • Was just poking around at enet.bespin.org, and didn't see anything about multicasting. So I guess that's not possible?

    True, Enet by itself doesn't support it. But I could probably implement it separate from Enet if only a simple server discovery was required..

    Are you looking to just discover which servers are on the LAN without knowing the IP address? So basically, the client could send out a broadcast and the server would constantly be listening and then respond with its own broadcast to tell the client (and anybody else) that it is ready for a game (IP, port).

    Where would multicast come into play?

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