magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 01 > Features  

A Graphical Internet Chat

A Roll-Your-Own Approach to Internet Chat

By Andrew Davison

The allure of chat servers is considerably heightened if you can connect to them via a graphical client. To that end, in this article I'll show how to create a graphical client for the telnet-based Chat server written in C that I described in my article, "An Internet Chat Server" (Web Techniques, May '97).

When users enter a room, their pictures will be displayed, along with the room's other occupants and their names; see Figure 1. When people speak, speech bubbles will appear above their heads (although the actual text will appear in another window). Users can change body form and mood, and these changes are reflected in the picture.

The client was developed in four stages:

  • Writing a basic client program.
  • Modifying the Chat server to output visualization codes at the start of messages containing information that can be used to draw the user's room: the name of the room, visitor details, and who is speaking.
  • Modifying the client to recognize the visualization cues coming from the server and storing them in suitable rooms and visitor data structures. To simplify coding, the software does not display the information graphically.
  • Adding the necessary graphical features, which are coded with the gd graphics library. Whenever an aspect of the room changes, these functions rebuild a GIF file holding the room picture.



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2