[PLUGIN] Network v0.3a update***

Post and try out addons that are currently in development.

Post » Tue Aug 30, 2011 7:59 pm

Thanks Jayjay, it's working perfectly.
B
9
S
2
G
1
Posts: 21
Reputation: 992

Post » Tue Aug 30, 2011 8:35 pm

[QUOTE=Notsu] Thanks Jayjay, it's working perfectly.[/QUOTE]

Awesome, glad to hear Feel free to PM me if you have any other problems with the plugin.Jayjay2011-08-30 20:40:50
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Wed Aug 31, 2011 11:30 pm

scidave, Thanks for relase this plugin!

I want to make a server for 20 players. It is for a simple turn-based game with players in pairs... I can understand the scidave's example with 2 players, but I can't get more than 2 players connected...
Since a turn-based game don't need to send messages always (every tick), I think a Chat example should be perfect for this. Would anybody be kind enough to make a Chat example?Deko2011-09-03 20:33:56
B
3
S
1
G
2
Posts: 8
Reputation: 866

Post » Sun Sep 25, 2011 11:22 am

Hi everyone! I haven't tried this plugin yet since it was said to be for turn-based games and not fast shooters. Im making a fast and heavy shooter game and wonder if it'd work on LAN with this plugin.

I was hoping for Davo/Arsonide's Raknet plugin to be released sometime in the future. But until then is it meaningful to try this plugin together with smart programming.

My game will have large backgrounds, advanced physics with fluids, alot of bullets in the air and destructible terrain.

:)
B
7
G
1
Posts: 14
Reputation: 710

Post » Sun Sep 25, 2011 2:32 pm

[QUOTE=Segoi] Hi everyone! I haven't tried this plugin yet since it was said to be for turn-based games and not fast shooters. Im making a fast and heavy shooter game and wonder if it'd work on LAN with this plugin.

I was hoping for Davo/Arsonide's Raknet plugin to be released sometime in the future. But until then is it meaningful to try this plugin together with smart programming.

My game will have large backgrounds, advanced physics with fluids, alot of bullets in the air and destructible terrain.

:)[/QUOTE]

If you can compress how much data you're sending each tick, and do some basic lag compensation, I think the plugin will work fine for that.

EG: Instead of sending every objects position all the time for the physics objects, just send their position and velocities after hiting something. And if your fluids are only graphical, they can afford to look slightly different on each computer

You can grab the source to a "Casual MMO" I made here if you want to see ways to use plugin.

Right now there is a pretty bad bug over the internet however, the instant someone starts losing packets everybody starts repeating the same messages to each other tonnes of times. This seems to depend on either connection quality, or connection speed, but I'm not sure which. You want to make your game LAN so it shouldn't be a problem (even wireless is fine).
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sun Sep 25, 2011 7:04 pm

Cool! Thanks for the info. Gonna start asap :)

The fluids are physics objects, one water and one lava and they interact with the game until they hit the ocean.
B
7
G
1
Posts: 14
Reputation: 710

Post » Mon Sep 26, 2011 12:58 pm

[QUOTE=Segoi] Cool! Thanks for the info. Gonna start asap :)

The fluids are physics objects, one water and one lava and they interact with the game until they hit the ocean.[/QUOTE]

No problem, and ok, does the water and lava get created randomly, or in certain positions?

If it's randomly positioned, send a packet "Spawn:Type:SpawnX:SpawnY" which then creates the type of liquid, and then you don't need to send every X and Y co-ordinate for each particle.

If it's constant positions in the map, then just send the positions of all the other objects.

However, if the water and lava need to be 100% accurate, then you're probably going to take a slow-down positioning each object.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Sep 26, 2011 4:55 pm

Hmm... Server can't send message?

My suggestions:
- Add condition "on server full"
- 3rd Parameter of action "connect" can use any channel without not listed. For example: 1-st and 8-th channel is used.
- add condition "on server host" and "on server host failed".rafradek2011-09-26 17:30:49
B
15
S
1
G
3
Posts: 12
Reputation: 1,641

Post » Mon Sep 26, 2011 8:14 pm

[QUOTE=rafradek] Hmm... Server can't send message?

My suggestions:
- Add condition "on server full"
- 3rd Parameter of action "connect" can use any channel without not listed. For example: 1-st and 8-th channel is used.
- add condition "on server host" and "on server host failed".[/QUOTE]

The server can send messages, take a look at my Server cap from Pixel People Online.

Those suggestions would be nice though, right now the only way to tell the user it's full is to say "Can't connect, is the server full?" when connection fails.

I think you can use the other channels already, but the 4 listed behave in special ways if I'm reading what SciDave wrote correctly.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Sep 27, 2011 1:28 am

Hey All,

>> - Add condition "on server full"
Good suggestion. I'll have to think about this one a little...maybe a lowlevel error code when connect fails.

>> - 3rd Parameter of action "connect" can use any channel without not listed. For example: 1-st and 8-th channel is used.

I'm not sure it makes sense to look at channels when you first connect as the only point of specifying the # of channels to use is to match the number of the server. At this point you wouldn't know which channels are being used. So the number when connecting is not the channel to use but the maximum number to use.

The reason I listed the 4 channels is to offer some guidance on how the channels might be used for communication. The main point was to make sure people didn't send reliable and unreliable comms on the same channel. The only special channel that the plugin uses is channel 0. All of the other channels are open for the user to use as they see fit.

There might be some value in having each client talk to the server on their own channels..for example you want to broadcast out to team 1 chat messages..but that could probably be programmed in using server messages.

You could handle keeping track of which channels are being used by having an array/hashtable for the channels mapped to the clients.

There are a maximum of 255 channels that you can allocate (although I doubt you need to do more than 4 or so in practice).

So a proper scheme might be for a 4 player game (2 teams) would be 6 channels:

0: Built in messages and main state change messages to all clients
1: Global chat messages
2: Chat Team 1
3: Chat Team 2
4: Position Updates
5: Reliable Updates

If congestion is a problem then you could always use a separate channel per client for position and reliable updates but I don't think it is necessary. I'd play around with it and see if you notice any game speed improvements.


>> - add condition "on server host" and "on server host failed".
Good suggestions as well.

p.s. I've looked into that bug..hasn't been obvious the problem but it appears related to establishing a connection. So I've instead focused my efforts on building a new version of the plugin that handles connections. Been busy lately and haven't been able to work on the plugin though.
scidave2011-09-27 01:31:55
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

PreviousNext

Return to Work-in-progress addons

Who is online

Users browsing this forum: No registered users and 0 guests