[Tech demo] AGS chat client - with source!

Started by Wyz, Wed 19/01/2011 02:39:55

Previous topic - Next topic

Wyz

I don't really know where to post this but I'm going to give it a try.

A while back I was working on a IRC client for the AGS awards ceremony to spice it a bit up. The idea got cancelled and since I promised to release the source afterwards I might as well do it now. :P
Since it is not finished in any way I will release it as a tech demo.

Bit of history: A while back Duals and JimReed made an interactive chat game which looked very fly but had a few connection issues. When someone had the idea to actually use it for the awards I decided to help out and redesign the connection part for IRC, it would also mean people with both the regular and special client could join the same server, a bit more convenient. Well the IRC part including a custom built TCP plugin are finished. There's a bit more but you should see that yourself! :D


  • agsIRC Tech Demo
    It will connect directly to the AGS irc server, so be warned ;)

  • editor templates
    You can use these if you want to make your own IRC chat thingy.

  • the source
    About the source: you are free to use it, modify it and redistribute it.
    (not the player art, but who wants to do that anyway)

My thanks go to JimReed and Dualnames for the initial idea, and Dualnames for testing it.

have fun!

- Wyz

Ps.
The TCP plugin was a rush job, I wouldn't advise you using it for other projects. I will make a better version in the future though.
Life is like an adventure without the pixel hunts.

DoorKnobHandle

Awesome, works fine! Excellent work! I will check out the source code and use it for my purposes. Evil purposes MAHAHAHA.

Phemar

Nice, I was playing with it just now when WHAM...

QuoteError: Error running function 'repeatedly_execute':
Error: Script appears to be hung (a while loop ran 150001 times). The problem may be in a calling function; check the call stack.

deadsuperhero

My god. Does it work across the AGS Mac and Linux runtimes as well?

Oh, man, the sheer potential of this...
The fediverse needs great indie game developers! Find me there!


DoorKnobHandle

I have zero knowledge about IRC but how is the character moving implemented? I briefly checked out the source but wasn't able to tell, are the move commands send over IRC somehow as well or via TCP/IP on its own somehow?

Calin Leafshade


Icey

#7
;D

Wyz

Quote from: dkh on Wed 19/01/2011 02:54:48
Awesome, works fine! Excellent work! I will check out the source code and use it for my purposes. Evil purposes MAHAHAHA.
Thanks! Uh-oh, is the world ready for it? :D

Quote from: Phemar on Wed 19/01/2011 05:50:35
Nice, I was playing with it just now when WHAM...
Did this happen when you reopened the chat window after a while? Sometimes AGS stops processing when the game window isn't selected.

Quote from: DeadSuperHero on Wed 19/01/2011 06:08:50
My god. Does it work across the AGS Mac and Linux runtimes as well?
All but the TCP plugin, but it can be ported in the future. Hmm it might work on wine and such though.

Quote from: dkh on Wed 19/01/2011 18:48:10
I have zero knowledge about IRC but how is the character moving implemented? I briefly checked out the source but wasn't able to tell, are the move commands send over IRC somehow as well or via TCP/IP on its own somehow?
IRC is a message based protocol, the character movements are sent using plain readable chat messages using the IRC protocol. It isn't the most efficient way, but it's convenient for testing. it looks something like this:
* WyzX is at 322 588
* WyzX walks to 579 498
* WyzX walks to 478 331

Quote from: Eggie on Wed 19/01/2011 18:45:27
Quote from: DeadSuperHero on Wed 19/01/2011 06:08:50Oh, man, the sheer potential of this...

AGSCluedoAGSCluedo!!
Yes please, that would be epic!
Life is like an adventure without the pixel hunts.

Construed

#9
Hey, I've incorperated it into my game, however i've noticed that the server side view of the characters goes wherever the char clicks including on walls and ceilings, Walkable areas are ignored. and also if if I use
Code: ags

(button==eMouseLeft) {
CafeDo(String.Format("walks to %d %d", mouse.x, mouse.y));
}

In global script, all the modes, look,talk,interact cause the player to walk to the clicked x,y coords ignoring walkable areas except the walk function, it works correctly client side, but the serverside error posted above occurs.

Also I'm using multiple characters and something in the way you scripted it is causing their images to be randomized server side.

If you could shine some light it would be great.

PS. Great job!

Thanks in advance.
-Jar
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Icey

I just found out the games can talk to each other.

I tried the following together :

my game

and the tech demo.

Dualnames

Quote from: Studio3 on Sat 22/01/2011 00:36:34
I just found out the games can talk to each other.

I tried the following together :

my game

and the tech demo.


I usually have Disquiet talk to McCarthy Chronicles. They talk for hours and hours and hours. Man those games speak more than me.
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)

Moogle

OSD online

Wyz

Quote from: GrimReapYou on Fri 21/01/2011 07:20:21
Hey, I've incorperated it into my game, however i've noticed that the server side view of the characters goes wherever the char clicks including on walls and ceilings, Walkable areas are ignored.
Check Chat.asc line 305 and you'll understand why. :D

Quote from: GrimReapYou on Fri 21/01/2011 07:20:21
In global script, all the modes, look,talk,interact cause the player to walk to the clicked x,y coords ignoring walkable areas except the walk function, it works correctly client side, but the serverside error posted above occurs.
That's general laziness, I didn't need it for the demo so I haven't implemented mouse modes. Check the global script for that. (don't forget to change the room script mouse-click event too)

Quote from: GrimReapYou on Fri 21/01/2011 07:20:21
Also I'm using multiple characters and something in the way you scripted it is causing their images to be randomized server side.
There is no way to be certain who joins the server and in what order. The first character is considered to be the player character, the others are the NPCs in random order. Well it is not random actually but expect them to be. If you want to specify views for certain users it must be in the communication protocol. It is not a very easy concept but try to see how I maintain a position for each user.

Quote from: Studio3 on Sat 22/01/2011 00:36:34
I just found out the games can talk to each other.
I tried the following together: my game and the tech demo.
Yes they can communicate if they are connected to the same IRC server. Note that the server the demo is set to use is the default AGS IRC server. If you are going to do some testing, please mind to use a different server and channels so you doesn't bother the IRC folks.
Life is like an adventure without the pixel hunts.

Icey


Wyz

Life is like an adventure without the pixel hunts.

Construed

Aha, indeed wyz.
Thanks for the reply.
I modified the enoblock and blocking functions work correctly now :D
I'm digging into the scripting language you used and its very complicated,however im getting a basic grasp of it.
You wouldnt know by chance how i could implement it in multiple rooms without having to disconnect/reconnect for each room would you?
I'll be working on displaying multiple chars and i'll send you the source to add to yours if you want it.
Thanks-Jar
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Construed

Well, we've sucessfully implemented multiple characters client and server side.
Does anyone have any good or innovative ideas about how I can create another meta channel to load another room, or perhaps apply the same room settings to the next room.
So that the character can continue to synchronize room to room.
This is not as simple as it sounds.In-depth knowledge on the current subject will be required.
I'm testing a few ideas now, Will post back if I solve the issue.
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Construed

All confusions about this source have been solved.
This source is A-OK!!!
;D Million thumbs up.
I felt sorry for myself because I had no shoes.
Then I met the man with no feet.

Akatosh

Time for my yearly post!

This... is actually really awesome. I mean, if you have a reliably working message exchange (and be it via IRC), that pretty much takes care of the biggest obstacle to multiplayer AGS games right there.

SMF spam blocked by CleanTalk