Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SSH on Thu 15/09/2005 21:47:55

Title: Appeal for help from plugin writers, TCP/IP experts
Post by: SSH on Thu 15/09/2005 21:47:55
I've been trying to use a-v-o's TCP/IP plugin to write a game (see http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22650.0) but it crashes out without any message a lot, and I'm having a nightmare debugging it. Can any plugin writers offer any advice or help or even do a remake of the plugin with some kind of diagnostic/logging capability?

Or any other ideas on how to debug!

Thanks!
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Kweepa on Thu 15/09/2005 23:45:44
If you can convince a-v-o to supply the source code you can debug the plugin, using the compiled game (in windowed mode, natch) as the debug executable.
That's a big if of course. I haven't seen him around much.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Scorpiorus on Fri 16/09/2005 16:02:00
I was fiddling with the tcp/ip plugin before and pestered #ags people with testing it out.Ã,  :=

I don't now how (if) it's compatible with latest versions of AGS though.

The main problem is synchronization of events happening on client sides. Usually games use various approaches to fight lag, eg: prediction of events using currently avaible data or timestamp approach when server sends snapshots at measured time intervals to its cliens and clients then interpolate between two most recent snapshots until the next one is recieved, or combined approaches, etc.

Another problem I bumped into is that AGS repeatedly_execute function (which handles sorting of incoming data) is likely to be called at a different rate on different systems and thus it all depends on how slow/fast the system is.

It may be not that critical for adventure games but still introduces some issues to deal with.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: SSH on Fri 16/09/2005 16:18:16
Well, my immediate probelm is that it is crashing all over the place...
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Scorpiorus on Fri 16/09/2005 16:26:08
Do error messages say its a plugin error? Or is it a standart AGS error message?
I remember a-v-o said he didn't add error handing support for all events and would be adding them on when one encounters a problem but even with that the plugin should however report at least something why it crashed.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: SSH on Fri 16/09/2005 16:44:00
No, the whole game dies without a message and sometime I even got one of those "Send error report to MS" dialogs!

Some errors did bring up an err message, but recently, it just dies.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Scorpiorus on Fri 16/09/2005 18:37:14
Strange, I can't recall having such problems. Possibly the plugin may be incompatible with present AGS versions and needs updating but I'm not sure wondering what changes in plugin API could cause it because plugin interface should be backwards compatible.

By the way, what version of tcp/ip plugin are you using? Have you tried tcp/ip demo game? Does it crash too?
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: SSH on Fri 16/09/2005 20:55:44
Well, i didn't have any crashes when I just had 2 channels going (like the demo game), but now I am using 3, 4 or 5 channels I am getting them. Also, they are allegedly occuring at pretty random points in time, which makes me suspect some kind of buffer overflow in the plugin or somesuch.

Other than making sure I used string instead of String with the plugin, I dont think it is a compatibility issue.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Scorpiorus on Fri 16/09/2005 21:10:00
That may be the case, I didn't use more than 2 channels if memory serves me right.
Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: SSH on Fri 16/09/2005 21:19:11
Maybe I can reorganise the structure to use less channels
but I really do need 3 as a minimum, I think  :(

Oh well, worth a try maybe

Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: a-v-o on Tue 20/09/2005 21:58:21
Hello Steve,

Quote from: SteveMcCrea on Thu 15/09/2005 23:45:44
If you can convince a-v-o to supply the source code you can debug the plugin, using the compiled game (in windowed mode, natch) as the debug executable.
That's a big if of course. I haven't seen him around much.

The "if" isn't that big, I've already sent him the source code.

The bigger problem is probably that the plugin is written in Delphi, so you must understand Object Pascal and how WinSockets are implemented. For debugging you must switch between AGS, Delphi and the compiled game to sort out wether if it's a scripting problem (that's what I think) or a plugin problem.

I have a question to all who tested the plugin with me a long time ago: Has anyone used it on WinXP? I can't remember. Maybe WinSockets are handled different on WinXP.


Title: Re: Appeal for help from plugin writers, TCP/IP experts
Post by: Privateer Puddin' on Tue 20/09/2005 22:29:53
I tested on XP with you (when it was just a message) as did I with SSH and an earlier version of the game.