Tic-Tac-Toe Design and Task List

Author: Patrick Bergeron (sierragamers.com development team member)

Copyright © 2004

Design Considerations

Design Initiative 1 – Tic-tac-toe (Flash Game)

This initiative would be the coolest and is the design I have chosen to write about in detail:

Pros

1)Support for both Windows and Mac Users (if they download Flash player that is).

2)Distribution would no longer be an issue. Players surf to site, nothing to download and install locally. This makes for lesser maintenance/support nightmares.

3)Robust platform created for bringing multi-media to the web.

Cons

1)Need licenses (legally purchased copies)

2)Need a web-server to host the game

See Process Flow diagram below for details about how this would work.

Tech question: Can we start timers or an equivalent component that will allow us to requery a server for the latest game state? This needs to be answered, and unfortunately, I have not been able to find an answer to this.

Design Initiative 2 – Tic-tac-toe (via email)

This is really the type of game I had in mind when I first began the design process. It fit Ken’s “all text” concept to a T. But I am having trouble answering certain questions at the moment, but am still researching.

How this one would work (if at all) – We create a Windows Service to poll a designated POP3 server every n secs. We only process the emails that we recognize as a tic-tac-toe game in progress command. This could possibly be done by stuffing a special code (string) in the subject line to indicate that the email is a game command. Maybe a game session ID or something.

Questions:

1)If the player has another email client open (e.g. Outlook Express) with auto-polling turned on, that client will receive the message prior to us being able to process it. A case where this matters is if Player X sends an email command that wins the game. I would envision our “pre-processor” grabbing this command and changing the text of the message to something like “Player X has won” with a display of the winning board. This will not be possible if Outlook Express gets to the message before we do or if it gets to the message at all.

2)Assume #1 is possible to overcome. How do we pre-process email? For example: Under the assumption that we create a Windows service to read from POP3 Server, is it then possible, to pull down the mail, process the text within the message (change it to something else), and then place the message back into the queue for later “default” mail handling. I would assume all messages are read-only and therefore we cannot do this.

3)Assume #1 and #2 are possible – Certain clients (again Outlook Express) delete the messages from the server when they are done downloading the message to the local machine. This setting will need to be turned off (pre-requisite) or it is possible that OE “eats” the message without us ever seeing it. Do we want this kind of requirement? It does not seem to be the default setting for an email account in Outlook Express.

Concerns: Windows Service excludes non-Windows gamers (e.g. Mac Users)

Design Initiative 3 - Tic-tac-toe (via special email client –but only for game commands)

This design works much like Design 1, but instead of relying on OE (or some other email client) to display the game state, we could pop-up a window (like Messenger) in the bottom right hand corner of the desktop (above the clock) that would display the latest state of the game with the last move hightlighted as well as other information, like player names, etc… All of the issues above ^^ would still be a concern.

If not Messenger pop-up, then the message would be intercepted and sent to our special client app for processing (the one that I designed in this document).

Concerns: Windows Service excludes non-Windows gamers (e.g. Mac Users)

Design Initiative4 - Tic-tac-toe (via client –and non-email network communications)

This is the design described in the document (see below). All of the issues about tic-tac-toe via email are no longer an issue. This is why I decided to create the concept based on this Design Initiative. If we could come up with ways to address Design Initiative 1 issues, I would rather go that route.

Design Initiative 1 Specifics – Flash

Source Control

Does anyone have a registered copy of Flash? If someone does, that individual will be our official Flash code builder (compiler). If not, we would need to get one.

I have a registered copy of Microsoft Visual Studio .NET (for ASP.NET Web Services) that we will be able to use. We really need for both of these to be compiled and generated on the same machine (if for no other reason than that it will be easier to maintain).

Deployment (for Testing purposes)

I would suggest daily builds be performed and hosted somewhere on a daily basis so that the team can begin testing/debugging the game from the start. Where the hosting will occur is yet to be defined.

General

Tools: Flash and ASP.NET Web Services for Network communication.

This implies that we will have a server to maintain gameplay and state. Ken, if you do not want to give us this, another option would be to program using DirectPlay interfaces (Microsoft DirectX v. 8.0 and higher). These are set of interfaces designed specifically for gaming over a network connection.

Implications: If DirectPlay and DirectX are used, we can only target Windows platforms. By using Flash and ASP.NET Web Services, we can expand our audience by support for other platforms.

Departments

Art Dept Tasks (Under 2D Assumption)

I want to give the Art Dept. the freedom to choose a theme for the game. Each screen will carry that general theme. For example, the them could be a space station :P .. Each screen could have a ‘mechanical’ looking border and the fonts and user input controls could have a very technical computerized feel. Does that make sense?

Home Screen: Splash screen. Use your imagination .

3 Input controls

1) Edit field for player’s name

2) Enter Game Room (Single or 2 player mode needs to be selected also).

3) Credits

Game Room: If you’ve ever played chess at zone.com, then you have a pretty good idea of what I envision. Up to 5 tables, each having 2 chairs, each having 0 or 1 players sitting at them.

Piece Type Screen: Radio button controls to the right of the art (these are input controls, not graphics).

Game board: 3x3 board . Do what you will .. just make sure there are 9 squares on the board.

Pieces: 1 X piece -> static image

1 O piece -> static image

Programming Tasks

Tic-Tac-Toe Engine Programmer -> State-machine. For each move, the game will transition into a new state. As long as this state is not the “GAME WON” state, gameplay continues. This programmer would be responsible for supporting 2 different modes:

1)Single player mode (New Game Against Computer)

2)2 player mode (New Game Against Human Opponent)

Single Player Mode: Implements random moves based on his/her own algorithm.

Network Communications Programmer -> Plan A) ASP.NET Web Services Plan B) Program using DirectPlay interfaces (Microsoft DirectX v. 8.0) and higher specifically designed for gaming over a network connection. Pending approval from Ken as to what technology we would use.

Graphics Programmer -> Utility guy in a sense. Works with music and art to get what these 2 groups create into the game interface. This programmer will also be responsible for communicating with the Game Engine (see above). Player moves are gathered and passed to the engine for processing. Game board states can then be queried for repainting purposes.

The graphics programmer will also be responsible for the scrolling Credits screen.

Sound/Music Tasks

We will need an opening score. You will have your hands tied at the moment, because I see your score being influenced by the theme that ART creates.

Player move sound effect – when a player moves a piece, we will need the sound of the piece moving.

Game over sound effect – when a player defeats another player, play a sound to indicate the loss, and then begin looping the same song used for the opening score.

Credits – when the credits for the game are rolling, we will need a catchy little tune here as well.

Credits Screen

Scrolling screen with sierragamers.com development team names. Broken up by Departments: Sound, Programming, and Art

Gameplay

When the active player (his/her turn to move) transitions from off to on, there will need to be a visual indication that the active player has changed. This could be as simple as making the player’s name red or something. We can add more detail later.

When a player becomes active, one possibility is to change the cursor from a default pointer to the shape of the piece that the player is currently using (X or O). Or, to keep things simple, there is no visual change anywhere (with the exception of the red name). The player then simply clicks on an open spot on the board, and that player’s corresponding shape is drawn.

Things to Consider

  • Sound when player attempts invalid move?

Questions

1)Why not 3D?

  1. It’s tic-tac-toe for crying out loud. Flash is great for 2D and will be much easier for us to create something as simple as this in 2D then 3D – since there is no animation. I have different opinions when we start dealing with adventure though. 2D animation may be a nightmare for us for more complicated projects.

Tic-Tac-Toe Design and Task List

Author: Patrick Bergeron (sierragamers.com development team member)