Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Client-side Data Access
By Rajeev Hariharan

Beginning this month, will feature a new twice-monthly column on Web-based game design and programming. We hope to bring you a brand new full-featured game every month, along with the techniques and technology used in its implementation. It is our belief that the level of sophistication that most on-line gamers expect presents unique design challenges, whose solution would be of interest not only to game programmers, but to the entire Web development community as well. This column will focus only on Microsoft Windows Web technologies and their uses in solving some of these challenges.

In this article we will cover the data access technologies used in our implementation of the classic puzzle game Sokoban, which is scheduled for release exclusively on later this month. The game was written with certain design goals in mind:

  • It should have the look and feel of a commercial-quality executable (.EXE) game.
  • It should be playable both on-line and off-line.
  • While on-line, the emphasis should be on speedy game-play and a minimum of features.
  • While off-line, more advanced features like saving game state and recording high scores should be possible.
  • It should be playable on IE4.

The last goal was the biggest challenge - IE4 has a very strict security model which makes it difficult to modify, create, or find data stored on the client-side. We will discuss a variety of techniques that we used to make this possible including:

  • Using the Common Dialog Control for File Selection.
  • Using the Tabular Data Control for data retrieval and manipulation.
  • Saving changes made to the data on the client disk.

First of all, let us look at some common techniques used by web developers to enable the user to choose a client-side data file, the problems associated with these techniques, and how the Common Dialog Control offers an elegant solution to these problems.