My new project: Cube IRC

What is it?

Cube IRC is a 3d IRC client that I’ve been working on for the last two weeks off and on. What I want to do is be able to connect to a chat room and visualize what’s going on. Who are the frequent talkers? Who is lurking? Who are the talkative groups? Right now the client isn’t at the stage where I can answer those questions, but it does connect to a room and create an avatar for everyone joining the room and talking in it.

The architecture

(so far)

Working with threads

There are two major elements so far, the graphics thread and the IRC thread. Threading is implemented using boost::thread, which ended up being very simple. The program starts off initializing the graphical client and setting the parameters of the IRC client, which is then started. Communication between the two threads is handled with a message queue that passes every IRC event to the graphics thread. The upside of this method is that it is very simple, but the downside is that the graphics thread has to do all the processing, the IRC thread only keeps state as much as it needs to to stay connected to the server.


The IRC client is implemented with libircclient in a custom C++ wrapper. There’s not much more to it other than a configuration file read in using Ogre::ConfigFile. Currently there is support for joining a single server and multiple channels, although the graphics side does not really differentiate between channels. That’s one more hurdle to jump, how I am going to deal with a user that is in more than one channel.


I’m using Ogre3D for the graphics side of the client. Every time someone on IRC joins or talks to the channel, an avatar is created and if necessary a chat overlay will pop up over their head. When they quit the server or part a channel, the corresponding model is deleted. Right now this side doesn’t have much depth, because most of my time spent so far was getting the basics to work, such as thread communications and popping up an overlay to represent a line from IRC.

Future Plans

I would like to use some of the animations available in the current model and attach those to specific phrases, such as starting the dancing animation when someone mentions dancing in the channel. I also want to have some sort of AI in the avatars that moves them closer to avatars they’re addressing, but still maintaining a distance and not colliding with others. Also, ideally, when someone joins the channel, the avatar should enter from a “doorway” and walk over to their default position.

The Goods

Current progress: Screenshot 1 Screenshot 2

Sooner or later I’ll open up the git repo as well.