Cold Virtual Beer (Using the famous TCP/IP Plugin + Source code available)

Started by Dualnames, Mon 19/07/2010 16:04:09

Previous topic - Next topic

Dualnames

Quote
It may not blow your mind off.
It may not make you horny at nights.
It may not drive you crazy.

You can select your avatar from a great variety of AGS IRC forum members.
You can have different names
There's a chatlog!

->Prologue:

But after some hard work, I've managed to figure the TCP/IP PLUGIN by a-v-o, and here's something terribly simple and easy, but I don't recall it been done over INTERNET. Cause you see routers have NAT and it blocks incoming direct access over IPs. I will make something really big out of this, but I might also not, so here's Johnie.

 

This is the 3rd attempt  to ever provide a working link to a game created with a TCP/IP Plugin. I must say, I haven't seen what was done before, cause links don't work anymore. I've actually however managed to figure out this plugin, and I offer my knowledge if one needs it.

->Controls:
Simple left click walks/interacts and right click examines, though you won't have much use for it on this version.

when IPs appear over the listbox please click on them IF you're not connected to them.

->About this game's connectivity.
A) Over LAN:

Works like a charm you'll have no problems whatsoever.

b)Over the internet:

Due to most users being behind routers, you either need to portforward and have all the guys/gals you'll connect to portforward to, or you can use Hamachi.

Hamachi bypasses your NAT by simply creating another IP over your router. That IP is what you need.

HOST:
The game requires one host. The host doesn't need to type other's people IPs but instead needs to create a Network at Hamachi, and tell people to join it.

POWER Hamachi->Network->Create ->Make up network credentials

I'm having a network called dualnames, with network password #ags and my IP is 5.47.124.125, I will be online at long times.

CLIENT:
All you require as client is to enter the IP of the HOST
And the IPs of the people he wants to see as well, via the listbox.

POWER Hamachi->Network->Join an existing ->Enter network credentials


->What you need to get some (BOTH are required over INTERNET):
Download Game
Download Source+plugin
Download Hamachi (The unmanaged version)

->Team:
Dualnames - Coding, and lots of googling
JimReed - Graphics, GUI design and GOD ON EARTH
Specials thanks to IRC GUYS!
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

FSi++


Jim Reed

In order of appearance:
AngelicCharon
Al_Ninio
Babar
CalinLeafshade
ShiverMeSideways
FSi
JimReed
Jon_swe
NsMn
Stee
Wonkyth
Dualnames

And, yes, they're based on real pics of the above-mentioned people.

EDIT: New avatars:
Scarab
Jimbob
Monsiuer OUXX
Snake

Shane 'ProgZmax' Stevens

I logged in just to have a look and I think it's neat.  Could easily be expanded to have some 2-4 people puzzles and stuff like that (and minigames like beer drinking!).

Monk

i love this thing, i love become yoda! i wish you will continue to work on some magic and continue developing this, wish you the very best of luck!

Wonkyth

"But with a ninja on your face, you live longer!"

Technocrat

Are you going to make the AGS files for this available? That would certainly make it a bit less nigh-on impossible for me to figure out getting the plugin to work for other games (like, I dunno, turn based strategy games). Just a thought.

Jim Reed

Be warned:
If you see Dualnames network working on Hamachi, he might not be runing CVB at the current moment so you will not be able to connect. Connecting to each other will work though, if you start your own session.

Currently, new versions come out about 10 times a day, but there is no notification of that. Best guess is to redownload the client every time you want to connect.
This is being worked upon, too.

Sorry for the inconvinience.

EDIT:
If you connect to the IRC #ags channel, you can get the latest low-down directly from him, and find out when he is runing CVB.
Snake even got his custom avatar in. Please refrain from bugging the hard-working man much, he is sweating blood over this piece of software as it is.
Thank you.

Dualnames

Quote from: Technocrat on Tue 20/07/2010 10:26:49
Are you going to make the AGS files for this available? That would certainly make it a bit less nigh-on impossible for me to figure out getting the plugin to work for other games (like, I dunno, turn based strategy games). Just a thought.

Damnit, Technocrat, I'm no fucking elitist. :D Of course i will.

EDIT :If you want the code at any point don't hesitate to ask.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Jim Reed

Upon seeing how Dualnames is a cool guy, I can safely say that he will import any avatar you can provide. So, yes, please bug the lazy mofo.

Dualnames

Okay added a minigame. Plus some cool stuff.



Also featuring two rooms, one being unfinished. But its a strip club... :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)


GreenBoy


Galen


Dualnames

Okay so here's the source code. Get it going lads.

Download Source+plugin

It's not much but I know someone working on a super clean version of that and much user friendlier. So wait up if you're bored.

3.1.2 compiled. But works on all 3.x.x versions before that.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

DoorKnobHandle

Doesn't work with versions later than 3.1.2? I tried it in 3.2 Final 5 and it crashes.

Dualnames

Quote from: dkh on Fri 23/07/2010 16:21:43
Doesn't work with versions later than 3.1.2? I tried it in 3.2 Final 5 and it crashes.

A) depends on the crash. And as i said, compiled with 3.1.2.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

DoorKnobHandle

It just crashes the application, I have to open the task manager and shut it down manually. No error message.

Moogle

how do i get this to work?

Code: ags

goon[0]=TcpListenIP (ServerIndex);


what do i have to do cause my game wont load with out it plus i think i might need the other script for it...oh

and msg
test.asc(36): Error (line 36): Type mismatch: cannot convert 'String*' to 'string'

and SpeechChannel
test.asc(37): Error (line 37): undefined symbol 'SpeechChannel'

Code: ags

TcpSetString (ServerIndex, Broadcast, SpeechChannel, 0, msg);
TcpSend (ServerIndex, Broadcast, SpeechChannel);
OSD online

Dualnames

Quote from: dkh on Fri 23/07/2010 18:47:50
It just crashes the application, I have to open the task manager and shut it down manually. No error message.

Anyhow, it's possible I haven't fully tested the code in AGS 3.1.2 and haven't tested at all after that version, this was mostly built in 2.72.
But I had no trouble when I checked this. dkh, I'd like you if its possible to tell me what are you doing and its causing the crash.

Quote from: mog.net on Fri 23/07/2010 19:35:54
how do i get this to work?

Code: ags

goon[0]=TcpListenIP (ServerIndex);

what do i have to do cause my game wont load with out it plus i think i might need the other script for it...oh
and msg
test.asc(36): Error (line 36): Type mismatch: cannot convert 'String*' to 'string'

and SpeechChannel
test.asc(37): Error (line 37): undefined symbol 'SpeechChannel'

Code: ags

TcpSetString (ServerIndex, Broadcast, SpeechChannel, 0, msg);
TcpSend (ServerIndex, Broadcast, SpeechChannel);


What you fully need to actually make a connection is this:
Code: ags

int ServerIndex;
int ChatChannel;

function game_start() {
string text1;
StrCopy(text1, VersionInfo);

  int port=28166; //port depends on the server you are connecting. Normally any port will do. NORMALLY.

 ServerIndex = TcpAddServer (port, text1);
 ChatChannel = TcpAddChannel (ServerIndex, 2, 1, 0);//The 2,1, 0 aren't random numbers but depends on the packets sends. 2 means that two integer values will be sent and received via the ChatChannel and 1 String.

string ip;
StrCopy(ip,"192.168.1.5"); The IP, this can probably be the IP of the server. For now it's just local.
TcpConnect (ServerIndex, ip); 

TcpListen (ServerIndex);
TcpProcessMessages (ServerIndex);

}


The rest as theories are barely developed in the source code.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

LGM

You. Me. Denny's.

tzachs

This looks very promising indeed... I logged in and had a look, pity I was all alone in there...

Stupot


Dualnames

Quote from: Stupot on Sat 24/07/2010 16:33:28
Quote from: LGM on Sat 24/07/2010 08:22:59
The server is full :(

Yeh I get that too :(  How many people can it hold?

11-12
if you adjust a variable at the source up to infinite -1. You get that cause you probably didn't really manage to connect. Try your own local ip (if it works your character will triple)
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

LGM

You. Me. Denny's.

Dualnames

Quote from: LGM on Sun 25/07/2010 08:26:18
I don't know what that means :(

On the connect button, enter your local IP. If you haven't blocked the program via the firewall, you will manage to see three of you stacked one behind the other. My local IP is 192.168.1.6 or 5. Assuming that the server is full happens because you haven't really connected anywhere.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Stupot

I can get the guy to triple when I put in the IP that Hamachi has given me...
But If I try to enter your I get "10060 can not connect to [your IP]"

And I still get "The network appears to be full" no matter how many times I try to join your existing network.

And I can't get the drawing board to work either :(

Jim Reed

If Dualnames is offline, any of you can come to the ags IRC channel, and I'll set up a game and talk you through the process of connecting.

Dualnames

The drawing boards just needs middle mouse to activate/deactivate
And left click draws black
right click draws white
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

LGM

You. Me. Denny's.

Dualnames

Quote from: LGM on Sun 25/07/2010 19:48:26
No no, the HAMACHI network is full..

I actually realized that, a little too late, now it shouldn't be.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Yuri Patrick

Alright. I searched for the original TCP/IP plugin thread and was brought here...

I was wondering, is the TCP/IP plugin high-level only or would it be capable of handling a connection to a Telnet server? Or would I need to write another plugin, a telnet plugin or something for it to be able to communicate with my game server?

Hercule Poirot

Hello!
I like this idea and I would really like to study the source or download the project, but all the links are dead. :~(
Please, could you re-upload it or send it to me by e-mail?
Thanks! (roll)

EDIT: Never mind, I found it myself!
Here's the link if anyone wants it:
Click here to download

Yuri Patrick

I know that this topic is horribly old, but I am still interested in trying to get some MMO technology going here inside of AGS.

Does anyone still have a copy of the source code for the TCP/IP Plugin itself? I use to have it, it use to be all over the place, and now it is very difficult to find. If you still have the source code to the plugin itself, would you please post a link or email it to me?

Icey


Monsieur OUXX

yep, definitely. The "AGS chat client" system is still one bit more recent, stable and easy to use than the TCP/IP plugin --even though CVB was great in its time! What we still need is a system to exchange sprites between clients ;)
 

Sledgy

Smb got copy of this game and plugin? (links are dead)

And there's another way to do multiplayer (net play) in AGS?

Crimson Wizard

Quote from: Sledgy on Sun 21/09/2014 08:57:21
Smb got copy of this game and plugin? (links are dead)

And there's another way to do multiplayer (net play) in AGS?

Answered your PM, for others, there's a new Sockets for AGS by WyZ:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48937.0
Open source project that uses it:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=50165.0

SMF spam blocked by CleanTalk