Posted By
|
Message
|
Fireline
Registered 27/10/2016 12:32:11
Points 7
|
1st December, 2016 at 01/12/2016 03:08:26 -
So. I've seen the extensions hanging around forever (MooClick etc) but never actually gotten one to work. Mostly through a lack of completed projects and a predisposition for single players games in the past, but I digress.
What's the goto multiplayer extension/systems for you guys currently? Ideally I'd like to not rely on an outside server, and have data just ping back and forth between a host player and a connected player, but I'll take whatever works.
Thanks!
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
4th December, 2016 at 04/12/2016 21:03:57 -
You'll want to use the lacewing extension, it has both a client and a server. Also a C++ & python version of the server if you want to go that route.
EDIT: If you want players to be able to play across the internet without a central server you'll need a way for them to exchange IP's and one of them needs to host the server. How you want to accomplish this is up to you. You can do the same thing for LAN play, but you use the internal IPs instead.
Edited by UrbanMonk
n/a
|
Fireline
Registered 27/10/2016 12:32:11
Points 7
|
16th December, 2016 at 16/12/2016 01:36:19 -
I definitely want it decentralised so two clients can just dial into each other and go. I feel like introducing a central server would be too risky in regards to ongoing support and such, and probably cost some cash to keep it running, so just having one player directly connect to another is the route I want to go.
However, with one player hosting a lacewing server and the other dialling in, I'm going to have to muck about with some port forwarding to get that to work, which means players downloading + booting it up are going to have to tinker with their router if they want to host.
Outside of the standard chat tutorial for Lacewing, has anyone had much success with a game running on Lacewing? A cursory google can only find the aforementioned tute.
Cheers Monk!
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
22nd December, 2016 at 22/12/2016 16:44:41 -
Lacewing is basically just a client socket with some extra features that make building games with it easy.
Channels, Usernames, Player management, ID'd messages, Sending to specific players, ect.
I've made a few simple things with it just for fun. In theory it can do anything you need to build as complicated a game as you want with the only limitation being your hardware and/or skill level.
You should really have a separate application for the server so you can add dedicated server support later if you want, and for users who want to direct connect have your game launch the server application in the background. You can use a commandline to pass the required setup information to the server application if necessary, or have your client send the information to the server over the socket since you'll have to connect to it anyway.
Here's a little thingy I made with it just for fun a while back. It included two applications (and their source). Launch server.exe and then two clients on the same machine and use your arrow keys to move the little character around. You should see it show up in the same position on all the clients.
https://www.dropbox.com/s/1y1hcv3mivs1emv/lacewing_experimenting.zip?dl=1
Oh and one more thing. The server.exe runs as an invisible application, so just use task manager to kill it when you're done.
n/a
|
Fireline
Registered 27/10/2016 12:32:11
Points 7
|
28th December, 2016 at 28/12/2016 00:09:15 -
Absolute champion UM. I'll test it out over the next few days.
Cheers!
n/a
|
Fireline
Registered 27/10/2016 12:32:11
Points 7
|
2nd January, 2017 at 02/01/2017 02:44:35 -
Just cracked this open and had a bit of a play - very very illuminating, thanks UM. Extending this out to work on non-local computers shouldn't be horribly difficulty once I've fully digested what is going on here. Also I usually never rename my alt values so I'm tripping myself up trying to read through the mfa, but that's on me.
Either way I'm very excited to know that implementing this is not impossible. All I'd really be sending over the network is updated positions of a couple of actives, and since it's a turn based game I'm working on that can happen once the position has been set for said player's move. Dice rolls can be handled locally and the gameboard updated with any deaths/stat changes etc... but now I'm just thinking out loud.
Separate server is 100% the way to go, also. I really like the idea of having the two options also - ie in game if you decide to play two screen multiplayer, the server application just opens in the background, and as you mentioned a dedicated server option could also be handy down the track. The fact that your server exe is like 3 lines was surprising - I assumed it would be handling all the traffic rather than the game.exe, but this way is so much simpler.
So cheers again UM. I'll probably be hitting you up with questions when it comes time to open it up to internet connections via IP because you seem the expert! And if I ask now I'll just forget it because I'm like 10% into the engine proper and information outside of that current task is just not sticking
Thanks!
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
3rd January, 2017 at 03/01/2017 21:01:04 -
Hey man glad I could help you out!
Yeah lacewing is ace, all of the server stuff is handled underneath automatically, but believe me it does a lot so don't discount it based on the amount of events/actions in fusion.
You can have the server manage the game also if you'd like, and that would actually be more secure, but require more processing on the server side. I prefer to do everything in the client though since it's more scale-able if you decide to add more than just a few players later. Plus a few years ago there were dedicated lacewing servers setup for this very purpose, so any game that does it's processing on the client side could use any basic lacewing server setup which is pretty awesome!
One more thing about IP addresses. You need to use the remote IP for a user to be able to connect to the host over the internet, use a site like http://ipchicken.com to get that and you need the port you use to be open on the local firewall and the router's (if used) firewall, and the port you use forwarded correctly. The easiest way to do this is to use DMZ which basically forwards all traffic to whatever internal IP you specify. Having the user's have to worry about all of this is why I recommended using dedicated servers since they don't require any network setup on the user's part.
Edited by UrbanMonk
n/a
|
|
|