How is it going people? most of you must probably have forgotten me by now. But I didn't get much time to post something in a while. Anyway, SO as the topic says I'm creating an online game with my friend, but we have encountered a situation we have no clue about. actually, we are not able to host server and connect with each other for some reason. We thought there is some error in the code so we tried playing other online games like dragon pong etc but we were not able to connect there either. anybody has a clue about it?
My friend tried to set up port forwarding in his router but no success. Any help in this matter will be highly appreciated. And by the way, if this was not the correct place to post this topic then I'm really sorry.

Thumbs up


Hi amit.
Well do you get some kind of error messages when you try to run online games? You need to be more specific about exactly what's going on when you try these games. One possibility is that your virus protection is blocking your access to the games because it thinks it's a virus. It happens with websites and things sometimes.

What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

Thumbs up


I don't have a virus protection software installed except windows defender. So as you  know, in any online game, one player has to host a server and another player tries to connect to it. What happens here is that, neither a firewall is blocking the connection nor a virus protection software. Still, none of us can connect with each other. I tried hosting the server, my friend tried hosting the server multiple times but no luck. Dragonpong only says "can't connect". and the BGT code I have, if I make a server on local computer and try to connect with it (, it works. but as soon as we take someone's IP and try to connect, it will fail to do so. therefore, probably there is some problem with hosting the server. I hope you understand my problem better now.

Thumbs up


anyone correct me if i get any of this wrong. What is basically happening is that the packets you are sending to him is being dropped by his router and vise versa for him. Our nat routers do a crucial job for us by filtering out the noise and garbage of the big bad internet so our personal networks don't get swamped.

what you will need to do is to both forward a port in your routers. a lot of router passwords and portforwarding guides are out on the internet. all you need to know is your router make and moddel.
You could also try and use up&p (universal plug and play). hoever, more and more routers are turning that off by default. there are many cable boxes from isp's that are locked down with a password and you can't change anything. you can't portforward, you can't tinker with up&p so games like DP are very difficult to play.

you can set the game to use a specific port, but i'd recommend letting the user provide a port number. you should check the number though and block any of the reserved port numbers already in use. only use ports 1025-65536.

you could use a sort of sudo vpn client like hamochee, but i think they no longer have a free version, and i'm not sure of an alternative.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

Thumbs up


so basically you are saying, that the game we are creating and other online games created by other developers are impossible to play unless both sides set up port forwarding in their routers? or, perhaps a VPN will do the job?
the amount of time spent in setting up these for playing just a game? and what about all those different possibilities which might stop a player from doing so are there also. Now it seems like creating an online multiplayer doesn't worth the time since no one will give their precious time for setting up those things just for a few minutes of a small game.
if there is another solution, I'd love to know it. if not, then I think we will have to release this game playable against computer only.

Thumbs up


You will probably need a server for what you want to do

best regards
never give up on what ever you are doing.

Thumbs up