Yet-another Multiplayer Demo (with capx)

0 favourites
From the Asset Store
Demo Game Multiplayer Online with member registration system
  • LimonSpace

    How did you do it. I can't for the life of me figure it out according to the post above that some one wrote (Thanks for that btw, it got me thinking)

  • it's even easier than that wall of text i wrote:

    To juantar's example server just add at the right place:

    socket.on('disconnect', function (data) {

         

          socket.broadcast.emit("message",'D,' + mySelf[0] );

          entities[myNumber] = null;

         

    });

    To capx just add (as sub-event of "is data available?" event):

    http://imgur.com/2YZR6

  • JohnnySheffield

    Ok then, just disregard that message I sent you then :P

    Edit: It works! Thank you very much.

    Thanks!

  • hi all,

    i've a problem i make a simple star's game with this tut and now i only wanna put this project online but when i try to connect to my game by internet he don't connect to my server what i can do?

    i put the client on apache in my pc and the people can visit the home of the game (made in construct) but don't connect on my server (always in my pc) i just do port forwarding and exections in firewall ecc but nothing.

    i try with your example but    <img src="smileys/smiley19.gif" border="0" align="middle" /> the same thing how can i solve? thanks simone

    PS with construct the connection is ok

  • LimonSpace

    How did you do it. I can't for the life of me figure it out according to the post above that some one wrote (Thanks for that btw, it got me thinking)

    I simply wrong to quote sorry <img src="smileys/smiley36.gif" border="0" align="middle" />

  • Am I the only one with the problem that If a new player Joins, He will see all the players who have already been destroyed before he joined?

    How would you fix that? MyID on destroyed, Disconnect?

  • Did not work.. Even when I use the plugins build in Disconnect, it still spawns all the entities. I believe it has to do with the server saving them, I would like some ideas to that.

  • Schoening

    I'm not on my computer so i cannot see the capx, but i think there is an event that sends "C" message to server whenever someone connects. Look what happens with that message. Also,you could be right, maybe server remembers disconnected player,but i believe if that is the case, you should check out the solution ?for the problem that lonehangman had few posts ago. If i'm wrong you should find out where the server sends "C" message, and mess around with that piece of code.

    I'm on my computer in a few hours so i'll look into it and come back with more details!

  • Schoening

    Have you tried this? When i do this changes to the example the problem you mentioned doesn't happen...

    it's even easier than that wall of text i wrote:

    To juantar's example server just add at the right place:

    socket.on('disconnect', function (data) {

           

           socket.broadcast.emit("message",'D,' + mySelf[0] );

           entities[myNumber] = null;

           

    });

    To capx just add (as sub-event of "is data available?" event):

    http://imgur.com/2YZR6

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi all,

    how can i connect the index file hosted on altervista to the server hosted on my pc?

    when i try the example in localhost everything gonna right and the server answers correctly but from altervista i can write every ip and compare always the sprite and the arrows but there are no connections to the server why?

    can anyone show me the right way?

    PS and the sprite don't move

  • nobody can help me?

  • LimonSpace

    Is your own server publicly available through the DNS? Assuming it is, then in your index.html you simply reference the appropriate URL to access your server. (But I hope you're taking all the necessary security precautions!)

  • LimonSpace

    Have you port forwarded?

  • LimonSpace here is a open port check tool you can use to test if your ports are properly forwarded:

    Open Port Check Tool

    Just download it, and follow the instructions on the page I linked you to. Check port 80, and any other ports your game might be using.

    If your ports are not open here is a list of all routers, and there port forwarding guides:

    Complete List of Port Forwarding Guides

    Find your router on there list, and follow there guide to forward your ports.

    If and or after all your necessary ports are open, and you still have the same issue it might be because some ISP's (Internet service providers) block port 80. If this is the case you will need to do a port 80 redirect. Here is a guide for that:

    So your ISP has decided to block port 80?

    And last but not least If the IP that your webserver runs on is dynamic, you'll want to make sure you are running a dynamic update client. Here is a good one that I have used in the past:

    Dynamic Update Client for Windows

    I hope this all helps   <img src="smileys/smiley1.gif" border="0" align="middle">

  • LimonSpace

    Have you port forwarded?

    Hmm. LimonSpace said on 3 Sep that he had: "i just do port forwarding and exections in firewall ecc but nothing."

    Wink's advice is spot on. I've used his linked free PFPortCheck Program very successfully on a number of occasions (but don't be misled into shelling out for PFConfig!).

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