Network Plugin

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Tue May 04, 2010 3:49 am

I don't know about the rest of you but I'm fairly certain most, if not all, are on the same page as me when I say that I really want a network/online plugin.

I've taken computer science classes in high school and in university but only at the introduction level so it's not much to work with but it's something.

Right now, I'm in pain from having both wisdom teeth removed from my lower jaw but also curious as to what goes into making a networking plugin and what it consists of?

I'm hoping to get a discussion flowing where anyone can contribute to the actual development of a networking plugin instead of waiting around for one to be developed.

Hopefully this discussion will also help teach people how to create plugins. (Although a guide probably already exists, I can no longer recall)

At the same time, I DO recall that someone was working on a networking plugin. If you are still working on it, care to pitch in or let us know how we can help out?

Let's get some motivation flying!!
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Tue May 04, 2010 5:36 am

I've been considering giving this a go lately, although learning Winsock is currently a roadblock as there's not much in the way of decent tutorials for it, nor are there any other decent networking libraries that I can find. :?
Moderator
B
99
S
37
G
19
Posts: 1,584
Reputation: 17,842

Post » Tue May 04, 2010 6:49 am

I notice there's been a lot of requests for this lately, and frankly I'm not too terribly interested in it, especially since I don't have a server to test things out. So that makes me wonder how many people here already have a server ready to test things on?
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Tue May 04, 2010 10:09 am

[quote="newt":1l0ipi11]I notice there's been a lot of requests for this lately, and frankly I'm not too terribly interested in it, especially since I don't have a server to test things out. So that makes me wonder how many people here already have a server ready to test things on?[/quote:1l0ipi11]
Is a server absolutely necessary? What about connecting to another computer instead?
I'm hoping most of it is simply tedious work; in which case, I wouldn't mind dogging away at it.
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Tue May 04, 2010 10:17 am

A player can act as a server so there doesn't need to be a hosted server somewhere else to connect to, but this can cause issues with players behind routers (it's possible to work around though I believe, but I don't know much about networking).

There definitely are libraries for networking around - you could have a look at SFML for example, which has an OOP layer over TCP and UDP sockets, which should make things a bit simpler. You'll probably still be working with raw bytes and addresses though - might want to find a higher level library.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Tue May 04, 2010 11:05 am

ooo! I actually have a friend who majored in networking, I'll definitely ask him for him for help but for the time being where would I start? It's been years since I've touched Java and C++ (I'm in school for Fitness and Health Promotion now so it's pretty much the opposite end of all this hahaha)
My understanding so far is that I'd use the SDK and import the networking library, is this correct?
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Tue May 04, 2010 12:33 pm

[quote="newt":2bppc99o]So that makes me wonder how many people here already have a server ready to test things on?[/quote:2bppc99o]
This is not a big deal since any player can host a game. Unless we are talking about large persistent worlds then a player can host any online multiplayer game by doing:
1. Enable NAT passthrough on their router. This is really easy to setup. You then run the "server" on an internal IP on your home network and the router forwards traffic from a particular port to your system.
2. Use a free networking tool like Hamachi. https://secure.logmein.com/products/hamachi2/ Now everybody is on a virtual LAN and you host the server on your Hamachi IP address. Added benefit of this is you get lower lantency and more reliable connections.

[quote="vinny":2bppc99o]I DO recall that someone was working on a networking plugin.[/quote:2bppc99o]
Dataflashbot mentioned a few weeks ago that he was, but he didn't want anybody to hold him to it so I'm not sure if he will end up making one or not. viewtopic.php?f=17&t=6142

[quote="Ashley":2bppc99o]but this can cause issues with players behind routers[/quote:2bppc99o]
This will only be an issue for all players if the plugin is a peer-to-peer type. Even in that case the best solution is to have everybody use Hamachi or as secondary solution all players would have to enable NAT passthrough. An alternative is to have the online plugin itself use NAT punch-through like what Raknet uses.

Edit: If someone starts making a plugin definitely DON'T write from scratch using sockets. Like Ashley mentioned there are libraries out there. For example, Sun99 pointed out the Zig library which wraps HawkNL. Take a look at this thread before starting out on making a plugin.
http://www.gamedevid.org/forum/archive/ ... -3577.html Some of the libraries are old and haven't been updated but it's better than starting from scratch!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue May 04, 2010 1:07 pm

[quote="scidave":1s4ljj19]An alternative is to have the online plugin itself use NAT punch-through like what Raknet uses.[/quote:1s4ljj19]
That sounds like the smartest thing to do, so nobody has to set anything up to play. I think that's what I was thinking of but didn't know the name. I think it's actually very important since a lot of gamers are behind routers which do NAT.

RakNet looks promising, and is free for indy games (revenue under 250k) but some restrictions ("Must display RakNet logo in your game's splash screen or credits", "Downloadable distribution"), and has NAT punchthrough. SDL_net might be a good alternative, but I can't find much information about it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Tue May 04, 2010 2:55 pm

First off I know very little about networking but am using a free very nice game system that you might want to see how it is done since it works so well. http://rptools.net/

I play a weekly on line game using MAPTool (by RPTools) where one of us has to be the server, and all the others just log in to the name of the server. So that may mean someone has some kind of host set up? I am the server but see all the other people's servers for the game too.

Anyway the players just use my created server name and log in to my game with an optional password.

I also have a router and it was very easy to open the port for this program.

Here is a picture of the Start up Server
http://lmwcs.com/rptools/wiki/Image:mt-start-server.jpg
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Tue May 04, 2010 8:02 pm

[quote="Guyon":3qzcw844]First off I know very little about networking but am using a free very nice game system that you might want to see how it is done since it works so well. http://rptools.net/

I play a weekly on line game using MAPTool (by RPTools) where one of us has to be the server, and all the others just log in to the name of the server. So that may mean someone has some kind of host set up? I am the server but see all the other people's servers for the game too.

Anyway the players just use my created server name and log in to my game with an optional password.

I also have a router and it was very easy to open the port for this program.

Here is a picture of the Start up Server
http://lmwcs.com/rptools/wiki/Image:mt-start-server.jpg[/quote:3qzcw844]
We get to see the results but unfortunately, not how it was implemented. Thanks for sharing though!

With regards to conditions and actions, the most basic form of data to transfer would be text (at least that's what comes to mind) I'm not sure about receiving though, would the game have to constantly check for incoming data? Let's get a list of conditions and actions going!
B
4
G
2
Posts: 27
Reputation: 854

Next

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests

cron