Network Plugin

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

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

Post » Wed Jul 07, 2010 2:28 pm

Basically port forwarding on either given IP ranges, or open completely will bypass any port blocks. Firewall may need to be adjusted as well...

Also route table may need to be adjusted depending on how the trafficking is set up.

If you go with a VPN for testing purposes (selected audience of testers for example) then you may need to manually set metric intervals in order to get the connection working properly.

There are numerous ways to make it work.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Jul 13, 2010 1:53 am

[quote="Ashley":3d5vadaf]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.[/quote:3d5vadaf]
I've been messing around with the SFML network library lately and it seems solid. It's definitely easier than straight up Winsock, and its Packet class greatly simplifies data transmission.

However, it gets really wonky whenever I try using it within a Construct plugin, which leads me to believe that something within the SDK is screwing it up to the point that it's useless. :?
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Tue Jul 13, 2010 4:30 am

[quote="linkman2004":3ukrxdvj]it gets really wonky whenever I try using it within a Construct plugin[/quote:3ukrxdvj]

Any details on the wonkyness? Does it try to steal the main loop for processing or is it something more minor that isn't working? I know very little about the SDK so not sure if I'd be much help. I was going to try making a simple screen capture plugin just to learn more about it.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Jul 13, 2010 10:38 pm

[quote="scidave":3phbqeb1]Any details on the wonkyness?[/quote:3phbqeb1]
Things like packet corruption and crashing if you do things a certain way. These problems don't happen when the client is a C++ application, so I don't know what's up.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Fri Jul 16, 2010 3:32 am

Alright, i've gone through with a debugger and it seems that at least some of the problems are due to heap corruption related to std::string. Why this is happening only in cases concerning the SFML library, I have no idea. Maybe somebody could help me out with this if I were to supply the code?
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Sun Jan 02, 2011 1:53 am

Bump.....

Is anybody still working on a network plugin? I've been considering trying to make a simple wrapper around a few basic functions in either Enet or Voidcom. Just to start learning plugins and brush up on my C++. Probably not the best plugin to tackle initially.. but heh I will plan on only implementing the basic features (message passing for the most part).

Anybody working on one still?

[quote="linkman2004":10xsodx2]Why this is happening only in cases concerning the SFML library, I have no idea. Maybe somebody could help me out with this if I were to supply the code?[/quote:10xsodx2]
I think either Enet or Voidcom would be a much better solution for a plugin that using SFML. They take care of alot of the asyncronous event handling for you and also have a nicer event callback interface. Wanna maybe give one of those libraries a shot with me? I'm a plugin noob though so would take some time to get up to speed.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Wed Jan 26, 2011 1:18 am

This might be too low level, but Boost.Asio might work.

[url:2eq88jxh]http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio.html[/url:2eq88jxh]
B
17
S
6
G
6
Posts: 113
Reputation: 4,161

Post » Sat Mar 19, 2011 4:42 am

I was going to suggest DirectX's DirectPlay, as that would provide a ton of features, including the ability to handle NATs. But it looks like Microsoft killed it...whyyyyyy. :C
B
8
G
1
Posts: 19
Reputation: 713

Previous

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests