Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Mon Sep 03, 2012 11:29 pm

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?
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue Sep 04, 2012 8:14 am

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.
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue Sep 04, 2012 9:22 am

@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!JohnnySheffield2012-09-04 09:24:01
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Tue Sep 04, 2012 4:29 pm

@Schoening

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


[QUOTE=JohnnySheffield] @lonehangman
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[/QUOTE] JohnnySheffield2012-09-04 16:30:58
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Sun Sep 09, 2012 5:15 pm

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
LimonSpace2012-09-09 17:16:29
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Thu Sep 13, 2012 5:10 pm

nobody can help me?
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Thu Sep 13, 2012 8:33 pm

@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!)
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Fri Sep 14, 2012 1:30 am

@LimonSpace

Have you port forwarded?
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Fri Sep 14, 2012 3:35 am

@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   
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Fri Sep 14, 2012 9:16 am

[QUOTE=lonehangman] @LimonSpace
Have you port forwarded?[/QUOTE]
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!).
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 6 guests