[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
  • Im kinda new to the whole idea, but yeah that's pretty much it.

    From what little I've read about it, it sounds ideal for that scenario, but there's also a lot of negative feedback, network support, etc.

  • It worked now! Looks very promising! <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Minor update...

    Added expression "RoundTripTime" to get ping from client to server and back. Also, added a "On connect" condition to the client (only the server had support before).

    Readme and example .cap update to show new additions.

  • I can't get this to work T _T

    I enabled port forwarding to 5000

    I started netshooter, clicked HOST, it gave me an IP in the chatbox.

    I started 2 more clients, entered that IP, names, and clicked play client on both.

    Afterwards, both client apps disappear, the host app quits responding, then crashes.

    Derp?

  • wow incredible but... how do i use it, i have no idea how network programming work.A tutorial would be really usefull.

    I'll take a look at the cap and try to find it myself until a tutorial is written...

    edit: found some info on the readme...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tokinsom - The default behavior for a client that can't connect to a server is to exit. I guess I should change that with a messagebox or something else to say couldn't connect. So most likely the IP address you are using is not the actual IP you need. For example, the IP that the server displays is the computer IP....the IP you actually need is the router IP that you enabled port forwarding. You want your clients to connect to the router which then forwards traffic to your computer. If that isn't it please let me know!

    On the server side...can you post a screenshot of the crash? I haven't been able to duplicate a crash on my end.

    thoughtzone Thanks! I do plan on posting a tut once I know I don't plan to make major changes. For now the README is pretty detailed so if you don't find anything you need in it please let me know!

  • Awesome plugin, thanks for relase.

  • Notsu - Thanks!

    Based on Jayjay's and some other feedback. Fixed two bugs.

    1. Now you can send any characters in chat messages.

    2. Instead of the client closing when it can't connect to the server..instead condition "On connect failed" is triggered.

    Enjoy!

    http://www.box.net/shared/lbgncqnaufixv3umfyj1

  • scidave, in your netsooter there are server and 2 clients, so to play we need to open 3 apps(1x server and 2x clients).

    Can i make like this(in my game): Host server for 1st player and 2nd player will connect to this server(use only 2 apps and use server like client)?

    OR like this: Host server and connect to it in 1 app(use 1 app to server and client in the same time) and other client will connect to server? What about this methods?

  • This is the best news I have ever had Scidave.

    Thank you for your dedication to bring this to life, as it will help many users (including myself) to really start working on projects that have been in the "soup" for years.

    Now things can start coming to life.

    I will be checking this out over the next few days. I look forward to experimenting with it!

    *EDIT*

    There appears to be a bug in your example when collecting ammo. The ammo/bullet icon disappears but reappears instantly, so if the player stands in the place where ammo appears they can gain thousands of ammo in seconds. I looked at the event sheet and cannot see a reason why this may be happening.

    I thought I would point it out in case there is another error in the plugin causing it perhaps. This happens with lag compensation turned ON, since I have not been able to test without lag compensation (I have nobody else to play with just at the moment).

    *EDIT AGAIN*

    OK so it appears this bug was a once-off... since I'm not sure how but I managed to connect to my local IP with only the one player. I thought it was directly linked to the lag compensation option, but after trying to reproduce the error it would not connect until a second client was also connecting.

    If it happens again I will try to document what I did better.

    ~Sol

  • OR like this: Host server and connect to it in 1 app(use 1 app to server and client in the same time) and other client will connect to server? What about this methods?

    I think I should be able to implement this method, but it will require quite a bit of update to the Plugin code. It's not a major change, just a change that is in every part of the plugin. I think it is a good idea since lots of casual players will not want to have an extra app just to play a two player game. It on my TODO for version 0.4. :-)

    Soldjahboy. Thanks!! :-) Let me know as you spend more time with the plugin how it goes. It was exciting to see Jayjay make a short game with it so hopefully others follow suit.

    On the bug you mentioned...I have too experience a very, very hard to duplicate bug where one player is able to connect even though the other hasn't yet. I can never reduplicate though until maybe a week later. I believe it is tied to messages being used for Player tracking vs being built into the plugin.

    Both the host/client update and player tracking are pretty time intensive so not sure how long until I get to that...I'm technically still on my "break" from this plugin. ;-)

    Has anybody else experienced bugs with player tracking??

  • Has anybody else experienced bugs with player tracking??

    Well, I was going to send it in a PM but I realised it may be the only bug I have. I had trouble with players being shown in other layouts even though I had (virtually) restricted the players from being created again, on layout start, to the ones in the same room as the player. The players that were not meant to be in the room still moved as the real player did, but were not able to chat with each other (as expected/wanted).

    My eventual fix for this was to spawn/destroy a player object whenever they join or quit the server, and make them invisible if they are not in the same "room". That's why they flicker out as an always event is used to send constant requests of who else is in the current virtual room.

    Edit: I haven't figured out how to send data to the server on connection, but something like that for disconnecting would be nice as well, so I can have players tell the server their ID (sending a message and then having the disconnect action straight after causes a crash).

    This required another work around through having a custom disconnect message sent, and then when the client recieved their own disconnect message they closed the program (once again, using the disconnect action in the same condition a message is recieved/sent causes a crash, so closing the application is the only option). However, clients can screw this up by clicking the X button or alt-f4-ing. A forced message to send on close would be sweet.

  • Hey Jayjay,

    Can you post or PM me a simple .cap that will trigger crashes? Or a step 1-3 that will duplicate crash. I'll take a look at it his weekend and see what might be a good solution.   <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hey Jayjay,

    Can you post or PM me a simple .cap that will trigger crashes? Or a step 1-3 that will duplicate crash. I'll take a look at it his weekend and see what might be a good solution.   <img src="smileys/smiley1.gif" border="0" align="middle">

    Yup, I also stumbled across another bug where disconnecting and then trying to connect to the same server again without re-opening the program crashes.

    Here

    Edit: I also didn't get to mention yet, thanks very much for 0.3 SciDave, the chat and client connection fixes are really helpful =D

  • Has anyone managed to get more than 2 players to connect and operate nicely?

    So far if a third or fourth person join my example I get a lot of flickering of graphics between the various player locations. It's clear I am either doing something wrong, or the behaviour is not working as it should... I just don't know which.

    I am using a loop for each "other player", on packetdata "pos" (trying to stick as close to scidave's original example, Net Shooter)... but I am having some issues.

    I have set a creation of a new "other player" and "light" graphic each time a player connects, but I'm not sure if is ignoring this, or if every instance of the object is simply stacking up on itself and flickering between each instance of an "other player".

    PLEASE HALP D:

    Other than that, I'm having some fun with this... it has huge potential and the speed seems fine! I had a friend from Malaysia connect (and his internet is pretty slow) with a ping of only 112ms! :D

    *EDIT*

    Also I have discovered that if you have conditions on an event "On packet type X" it does not seem to work.

    Example:

    On Packet Type X   -   Do something (this works)

    On Packet Type X

    PlayerObject.Count = 0   -   Do something (does not work)

    <font color=red> It seems I solved this by using SUB EVENTS</font>

    ~Sol

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