Networking Without LAN [solved]
Networking Without LAN [solved]
I was wondering how I could network a game that could connect with say (for example).. a friend who lives on the other side of the US. How can I make my love hosting game connect to their joining game? I feel like the answer involves port forwarding but I am unsure. Also, it this safe to do for a homebrew game? Do i need to check for anything in particular in my source before I open my program up to the insecurity of the internet? Thanks all.
Last edited by harrison on Mon Feb 09, 2015 11:15 pm, edited 1 time in total.
Re: Networking Without LAN
Löve comes with lua-enet and LuaSocket which can both be used for networking. There's also a user made library called LUBE which uses LuaSocket but simplifies things for you a bit.
If you want to host a server non locally you first need to figure out on what port the server is running, Then forward that port. Then you and your friend from the other side of the US can both connect to it.
If you want to host a server non locally you first need to figure out on what port the server is running, Then forward that port. Then you and your friend from the other side of the US can both connect to it.
Re: Networking Without LAN
@veethree
Thank you for the information! I will look into port forwarding further. Do you know if port forwarding home-made games is (relatively) safe compared to professional games?
Thank you for the information! I will look into port forwarding further. Do you know if port forwarding home-made games is (relatively) safe compared to professional games?
Re: Networking Without LAN
I'd like to note that LUBE also supports lua-enet.
If you want to play a small game with your friend, port-forwarding and hosting your own server should be fine. If you want to set up a dedicated server for your game, you may need to purchase a virtual private server (and scale up as needed).
If you want to play a small game with your friend, port-forwarding and hosting your own server should be fine. If you want to set up a dedicated server for your game, you may need to purchase a virtual private server (and scale up as needed).
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Networking Without LAN
I feel that my main question has been answered so I will try to add a [solved] tag if I can. I may actually be able to make some fun coop games now with a little research
Thanks veethree and Karai17.
Thanks veethree and Karai17.
Re: Networking Without LAN
On a final note, I highly recommend using ENet for any multiplayer games. Using TCP to send statistical data would be fine if it was relevant to your game, but ultimately ENet is a fantastic protocol designed specifically for real time games in mind.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests