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

This forum is currently in read-only mode.
From the Asset Store
[C3] Banner ads, Interstitial ads, Rewared video ads, Rewarded Interstitial Ads
  • > Will my projects work?

    Yes, 0.3 doesn't introduce any breaking changes. 0.4 MIGHT..still doing testing, but changes will be minor and should only take a few minutes to clean up an old .cap.

    And when version 0.4 will br ready?

    If you give me $1000 I'll have it to you this weekend! :-) All joking aside I have player tracking 75% implemented, but I gotta admit I'm impressed with Jayjay's player tracking on his Pixel Online game so not sure how much it is needed. I have implemented adding an ID to all connections so you can check the ID on disconnect to remove a player...which was a missing feature.

    The server/client combination will probably get pushed back to 0.5 or later as it isn't an essential feature right now. I'm more concerned with investigating/reducing bandwidth usage.

  • scidave, okay i'll think about $1000 <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I have implemented adding an ID to all connections so you can check the ID on disconnect to remove a player

    YES!! Thanks SciDave! <img src="smileys/smiley4.gif" border="0" align="middle" />

    I was using a "rotating pool" of 4095 ID numbers stored in each clients global variable ID. This meant that a player who was AFK for long enough to have 4095 clients join and disconnect has the next player steal his ID =/

  • I have a small problem, when I'm try to include more than 1 layout client loses connection with server.

    How to go from Layout1 to Layout2 out of lose connetion?

    It's showed in Netshooter example but I don't understand these.

    Anyone can explain me step by step how to do this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have a small problem, when I'm try to include more than 1 layout client loses connection with server.

    How to go from Layout1 to Layout2 out of lose connetion?

    It's showed in Netshooter example but I don't understand these.

    Anyone can explain me step by step how to do this?

    If you select the Network plugin in layout 1 and tick the box "Global", it should stay connected across all layouts. This is because objects with the global property will automatically spawn across all layouts.

  • Thanks Jayjay, it's working perfectly.

  • Thanks Jayjay, it's working perfectly.

    Awesome, glad to hear <img src="smileys/smiley1.gif" border="0" align="middle" /> Feel free to PM me if you have any other problems with the plugin.

  • 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?

  • 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.

    :)

  • 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.

    :)

    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).

  • 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.

  • 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.

    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.

  • 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".
  • 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".

    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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)