Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: atigoli on Mon 07/05/2012 08:15:59

Title: AGS/Server send and recieve events
Post by: atigoli on Mon 07/05/2012 08:15:59
Hi,

I'm going to develop an Intelligent Tutoring System using AGS. I only can do it if my game can send every single event to a server and recieve some variables from the server to be able to control the game's environment. Is there such a feature in AGS?

Many thanks in advance
Title: Re: AGS/Server send and recieve events
Post by: suicidal pencil on Mon 07/05/2012 08:50:50
I know that a few people set up a multiplayer-AGS game using a connection to an IRC server, so I can imagine that setting up AGS to send and receive data from a database instead is plausible.

Could one of them please stand up? I'm kinda curious about this as well.
Title: Re: AGS/Server send and recieve events
Post by: Gilbert on Mon 07/05/2012 09:40:48
This is currently only possible if you use a plugin in the game.
Try to look up in the Modules & Plugins (http://www.adventuregamestudio.co.uk/yabb/index.php?board=10.0) forum and the (probably incomplete) List of Plugins (http://www.adventuregamestudio.co.uk/wiki/?title=List_of_plugins) on the wiki. The best bet is via the TCP/IP plugin (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=4343).
As I have zero interest in networking, I can only offer limited help.
Title: Re: AGS/Server send and recieve events
Post by: Khris on Mon 07/05/2012 11:31:13
Another way is to implement Wyz's IRC plugin & module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42648.0).
Using that, two (or more) games can communicate via an IRC server.

After both games have established a connection, they can basically chat with each other, so as long as you're fine with exchanging and parsing text messages, all the hard work is already done.
Title: Re: AGS/Server send and recieve events
Post by: suicidal pencil on Mon 07/05/2012 19:15:19
Quote from: Khris on Mon 07/05/2012 11:31:13
Another way is to implement Wyz's IRC plugin & module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42648.0).
Using that, two (or more) games can communicate via an IRC server.

After both games have established a connection, they can basically chat with each other, so as long as you're fine with exchanging and parsing text messages, all the hard work is already done.

That's awesome. So for your tutoring system, you could make two AGS programs: one acts as the server/database and the other is used as a client, with data exchange happening on the IRC server. However, I'm almost 100% sure that there is something better then AGS for making something like this. Can it be done in AGS? Absolutely. Is it worth it to use AGS? I'm not so sure.

What are you trying to teach/do?
Title: Re: AGS/Server send and recieve events
Post by: atigoli on Tue 08/05/2012 07:18:19
Many thanks for th replies. Although I do not know any of the AGS plug-ins yet, I try to get some ideas about them. Please tell me more if you come up with any other ideas.

My tutoring system will teach social skills.

Hey Suicidal Pencil do you have any other suggestions rather than AGS?
Thanks
Title: Re: AGS/Server send and recieve events
Post by: atigoli on Thu 10/05/2012 04:12:50
Is there any way that my game works with my local server? The way my system works is when student plays with the tutoring system, some variables is saved and sent to the server. On that server we have some special functions with them the next approppriate stage is chosen for the student to work with. So, I need to send my data to the lacal server. Can I do such a thing using AGS?
Title: Re: AGS/Server send and recieve events
Post by: Khris on Thu 10/05/2012 07:09:41
By local server, do you mean inside the same LAN?
That's perfectly possible and should be even easier to set up than a remote connection since you don't have to go through any firewalls.
Provided you're using the IRC method, the client PC will connect to the server's IP, and the server PC, which is also running the IRC service, connects to localhost/127.0.0.1
Title: Re: AGS/Server send and recieve events
Post by: atigoli on Mon 14/05/2012 06:47:42
Hi,

No, not inside the same LAN. It work in a way that students are playing with my game in the client side, then according to their actions the program send all the events to a server which is situated in another country. That Server analyse those parameters and choose the next appropriatephase of the game for the student to work with. Now would you mind telling me whether iit is possible or not and how?
Thanks in advance :smiley:
Title: Re: AGS/Server send and recieve events
Post by: Khris on Mon 14/05/2012 07:50:29
It will work as long as both computers can connect to the server. It doesn't matter where the server is physically, and like I explained, it can even be running on one of the two computers that are supposed to communicate.

Either: [AGS client 1] ----------------- [IRC server] ---------------- [AGS client 2]

Or: [AGS client 1] -------------------- [AGS client 2 + IRC server]

Now, any one of the AGS clients can of course act like a server in the sense that it processes requests sent by multiple clients.

Not sure what's so difficult about the concept of AGS games IRCing with each other, to be honest.
Title: Re: AGS/Server send and recieve events
Post by: Monsieur OUXX on Tue 15/05/2012 10:40:47
I just want to mention that the requirement of having all machines in a LAN is easily overcome by suing a virtual network (VPN) that simulates a LAN.
You can easily set one up, for example by using IBM's Ayudame, like it's been done in Cold Virtual Beer (search the forums for that).

But that solution works only if you have access to all servers, in order to set them up to use Ayudame.
I suppose so, since your "server in another country" couldn't "process the game results" if you didn't have access to it to set it up first.
Title: Re: AGS/Server send and recieve events
Post by: Khris on Tue 15/05/2012 13:50:27
There's also LogMeIn's Hamachi.

On the other hand, there's no requirement to have all machines in one LAN since we're talking about IRC. I'm not sure if IRC even requires additional firewall rules, afaik it should just work. The default port is TCP 6667, so you might have to open that first, but GrimQuest uses the same method for it's client-server connection and I didn't have to open any ports.
Title: Re: AGS/Server send and recieve events
Post by: void on Tue 15/05/2012 16:13:46
I've also developed a plugin providing game state synchronization in a server/client structure using tcp networking, but I did not spot any interest around here. The plugin is already in a usable state, you may want to check out the topic in the critics lounge.
Title: Re: AGS/Server send and recieve events
Post by: Monsieur OUXX on Tue 15/05/2012 16:18:27
Quote from: void on Tue 15/05/2012 16:13:46
I've also developed a plugin providing game state synchronization in a server/client structure using tcp networking, but I did not spot any interest around here. The plugin is already in a usable state, you may want to check out the topic in the critics lounge.

What's the name of it? I'm very interested in it for AGS Kart.
Title: Re: AGS/Server send and recieve events
Post by: Kweepa on Tue 15/05/2012 22:32:49
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45714
Title: Re: AGS/Server send and recieve events
Post by: Monsieur OUXX on Wed 16/05/2012 11:12:17
Quote from: Kweepa on Tue 15/05/2012 22:32:49
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45714

Alright! I'm silly, I already asked about that specific plugin. But I totally overlooked the whole "remote objects sync." aspect. That's very interesting.
That's teh problem with both network and 3D plugins at the moment : all of them each have a very distinctive feature, but they are quite heterogeneous. Hard to review, and hard to choose