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 > 1997 > 03 > Features  

A Java-Based High-Score Server

A CGI Approach to Tracking High Scores

By Neil Bartlett

What compels you to play yet another turn of a computer game? Hands up everyone who, like me, replied, "to try and beat the high score." Aren't we a competitive bunch! Sure, playing the game is fun, but it's the quest to beat that darn high score that keeps you coming back for more. The game high-score recording mechanism is like a digital narcotic ý it keeps you hooked.

This article shows how to design a high-score recorder that can be used for any Web-based game. I'll first discuss the design, then I'll look at security issues, and finally I'll suggest improvements that will make it really sing.

The code samples are all written in Java since it is fast becoming the language of the Web, but most of the concepts are Java independent. The article assumes knowledge of Java programming, specifically, programming I/O, sockets, and ports.

Basic Score Recording

Writing a high-score recorder sounds remarkably easyýjust get the score, test if it is the high score, and shove it in a file somewhere, right? Well, the principles are simple, but the execution presents a few challenges.

Imagine a game, say, a zap-the-baddies game, in which players employ various weapons of mass destruction to blast alien bad guys in exchange for points (the less violently inclined can imagine a points-driven game). At the end of the game, we want to store our accumulated points as a score in a ranked high-score table.




  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