:: Join-Up4 ::
You probably all remember the game "Connect4" from when you were children, or that time you played it last week at the party because you were so drunk. Well, this is just like that - except you don't need to be drunk to enjoy it. This version is a plugin for XChat on *nix systems (this should, after some modifying, compile on Windows) and runs in a public channel.
"So... Why?" It all started back in the summer of 2003. Whiffletree, Javman, and I, were all discussing stuff (as you do), then Whiffletree came up with the ingenius idea of making some games for IRC. The first few suggestions were pretty stupid ("ASCII Street Fighter" anyone?), but we stumbled upon the idea of a version of Connect4 for IRC.
Back then, I'd never written a plugin for XChat in C - I'd only done tiny things in perl. But I didn't know perl well - so doing something like that in perl would be a nightmare for me. I did, however, have a wealth of knowlegde in the department of mIRC scripting. Yay...
I'd written many things for mIRC: quote bots, welcome back things, full trivia bots - loads of stuff (no fserves, though). The problem was that I was, by that time, a Linux user - and it'd been a very long time since I'd used mIRC. WINE came to the rescue. Yes, that's right: I wrote a working version of connect4 for IRC in mIRC script - with mIRC running under WINE on Linux... Not on my own, you understand. Javman helped with the look of it and helped with ideas, feedback and testing. I just took care of the code. Fun, fun, fun...
mIRC script lacked many things, though. And I hated it. I really hated it. Especially under WINE. To say it was annoying is an understatment... But, I did it. It worked great. Except for the fact that it had no idea if anyone had won or not. That didn't matter to us, though. We had some fun with it.
Then, at about the start of October, wise-old-Whiffletree suddenly remembered our previous excursions into the land or IRC multiplayer games. He proceeded to ask if I could set it up. So, after several mIRC-cursing filled hours later, I yet again had my connect4 game running in mIRC under WINE (previously, when we had a gaming channel dedicated to this game, Javman actually ran the game - he had Windows). By this time I had a lot of experience at writing XChat plugins in C.
"I know - I'll rewrite it in C!" I thought. So, one quiet afternoon, I did. And what's more, it now knew if someone had won or not. Yay. Several #oldskool-ers (Whiffletree and Moobert) helped out with the testing of the latest version - and fun was had by all. That brings us to about now - when I decide it's ready to release unto the public.
So, here it is; fresh out of GCC and renamed "Join-up4". This, as with all my work, is released under the GNU/GPL - so feel free to play with it, and/or destroy the code. The link to download it is at the bottom of the page.
:: How To Compile, Install, And Run This Fine Piece Of Gamery ::
If you've used TuxServe before, you'll be pleased to know this this is a Hell of a lot easier to get going. First off; how to compile it. After you've downloaded the archive, change directory to where it was saved to, and carry out these instructions:
tar -zxvf joinup4-0.3.tar.gz
"make install" will install the file "join-up4.so" into "~/.xchat2/", which means that it will load everytime XChat is started. If you don't want this, don't use the command "make install" - or do that, but move it to wherever you want it.
As always, there's Mac OS X support. Well, this is theoretical - it's not been tested on Mac OS X yet. Here's how to do it:
tar -zxvf joinup4-0.3.tar.gz
There is no "make install" for you Mac OS X users, as I don't know the directory structure of OS X or XChat Aqua well enough. Just place the file "join-up4.so" wherever you want it to be.
For compiling this on Windows... I don't know. I can't test it, as I don't have any Windows boxen. If you have gotten it to compile under Windows, I'd be happy to have a copy of the binary, or info on how to do it.
Now that it's compiled and/or installed, you'll want to load it. Go to the text input box of XChat (the bit where you type all your normal text) and type this:
/load <path to join-up4.so>/join-up4.so
You must include the full path to the the file "join-up4.so" (substituing "~/" for your home will also work). Something like:
Or, if you used "make install":
Now, you'll probably wanting to use it. To find a list of commands, type:
This will display something like this:
Join-up4 help ::
/join-up4 on -- Allows people to play the game.
/join-up4 off -- Stops people from being able to play the game.
/join-up4 channel #channel_name -- Sets the channel that the game should run in.
/join-up4 help -- Displays this help.
In-game commands ::
!start -- Starts a game (whomever types this is player 1).
!stop -- Stops a game (only player 1 or 2 can use this).
!join -- Join the game as player 2.
!put # -- Puts your peice in the selected column (# is a number from 1 to 7).
!help -- Sends a list of these in-game commands to whomever typed this.
!noob -- Sends a list of the basic rules of the game to whomever typed this.
I can't really be bothered to explain all of that at the moment - mainly because they're already explained. The first 4 command are for you to control the plugin. First off, you need to set a single channel for it to use. NOTE: You have to set the channel everytime you load the plugin/XChat - it won't remember it!. Set the channel like this:
/join-up4 channel #monkeys
Then you need to enable it:
After it's been enabled, users in the channel you set can use any of the commands in the second section, titled "In-game commands". It also needs to be enabled for anyone to be able to play the game. If you want to disable the game, you can use the command:
This is basically the same as unloading the plugin - except that you can still use the 4 commands and it remembers the channel you set it to use.
The users commands are pretty simple to work out, too. NOTE: these commands won't work for you - if you want to join in the game, you will have to run another copy of XChat. Or get someone else to run this game. "!start" starts a game - player 1 is whomever typed "!start". "!join" is for a second person to join the game. Player 1 cannot join as player 2. Also, if no-one joins as player 2 within 5 minutes, the game will idle out and quit. It can be restarted by typing "!start" again.
"!stop" stops the current game - but only player 1 and player 2 can use this command. Join-up4 will ignore "!stop" by anyone else. "!put #" will put the peice of player 1 or 2 (depending on who typed the "!put" command) into the column "#" - "#" must be a number between 1 and 7. "!help" is just what it says on the tin - it will send a list of help to whomever typed that command (the help gets sent via PM, so the channel won't see it). The same goes for "!noob" - this just explains the basic rules of the game.
:: Help And Other Info ::
This first bit of info is very important:
THIS GAME WILL SEND A *LOT* OF DATA TO THE CHANNEL!
So, please make sure you have permission from whomever the channel belongs to before you run this game.
Secondly; this game will seem rather slow (from the gamers point of view). This is normal, as XChat has a flood limiter. Just live with it. It has been suggested that this use DCC rather than privmsg (eg, in the channel) - but that'd spoil the fun. This is a spectators game - it's fun to watch others play it. There are no plans for a DCC version yet. But I may make one at some point.
If people are typing those commands and nothing is happening, check that it is actually enabled, and that you've set it to use the correct channel.
As usual - all comments, suggestions, bug reports, ideas, compliments, money, girls, etc, can be given to me via IRC or email (see the contact button).