First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Prashanth Hirematada | Website:

Getting Started

The first thing to think about is how best way to share the game states among all the players in the room.
Model the game
For the tic tac toe game you would need to send the player action to the other player, meaning, the client has to send up the x and y position.
The first thing to do then is to create a simple xml file that defines the game state you need during game play.
There are two steps:
1. Create the XML file.
2. Generate the source using the PulseCodeGen located in the bin of installed folder.

In the above schema file, we would like to communicate to other players of their actions, what is needed for this game is quite simple. The player choosing the spot (row and column) and the value, meaning an “X” or an “O”, the put value is determined at the start of the game depending on who actually created the game room (the game host).
After having designed game states are needed for the game, we need to run the above xml file through the PulseCodeGen tool. Following is a listing of batch file that will do exactly that.\

IF EXIST .\src\tictactoe\gsrc\client del .\src\tictactoe\gsrc\client\*.as
CALL "%GAMANTRA%"\bin\PulseCodeGen.bat .\tictactoeSchema.xml tictactoe.gsrc .\src\tictactoe\gsrc
ECHO Success!
ECHO oops!

The batch file convenient so if you changed the schema, the regeneration of source files is a quick process.

» Level Intermediate

Added: 2009-02-21
Rating: 6.48 Votes: 23
(10 being the highest)
» Author
Prashanth Hirematada is the founder & Chief Architect of Gamantra, a game technology company.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.