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)

SMF spam blocked by CleanTalk