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

Post and try out addons that are currently in development.

Post » Sun Aug 07, 2011 10:35 pm

@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!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Mon Aug 08, 2011 7:19 am

Awesome plugin, thanks for relase.
B
9
S
2
G
1
Posts: 21
Reputation: 992

Post » Sun Aug 14, 2011 9:40 pm

@ 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/lbgncqnaufixv3umfyj1Tom2011-11-08 00:54:38
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Tue Aug 16, 2011 10:55 am

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?
B
2
G
1
Posts: 20
Reputation: 490

Post » Tue Aug 16, 2011 11:58 am

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.


~SolSoldjahBoy2011-08-16 12:32:31
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 » Wed Aug 17, 2011 1:06 am

[QUOTE=iamnp] 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?[/QUOTE]

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??scidave2011-08-17 01:10:16
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Aug 18, 2011 3:20 am

[QUOTE=scidave]Has anybody else experienced bugs with player tracking??[/QUOTE]

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.Jayjay2011-08-18 03:30:01
"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 » Thu Aug 18, 2011 3:44 am

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.   
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Thu Aug 18, 2011 6:18 am

[QUOTE=scidave] 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.    [/QUOTE]

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 =DJayjay2011-08-18 06:20: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 » Thu Aug 18, 2011 8:56 am

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)

It seems I solved this by using SUB EVENTS

~SolSoldjahBoy2011-08-18 12:12:38
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

PreviousNext

Return to Work-in-progress addons

Who is online

Users browsing this forum: No registered users and 1 guest