Article Preview
Buy Now
COLUMN
From Scratch: Networked TanGram
Issue: 3.4 (March/April 2005)
Author: William Leshner
Author Bio: William Leshner has been programming for twenty-five years and programming Macs for fifteen. He has spent a good deal of the last several years building REALbasic applications, utilities, and plugins, including KidzMail, KidzLog, and SQLitePluginPro. You can also check out his REALbasic weblog at
Article Description: No description available.
Article Length (in bytes): 12,348
Starting Page Number: 40
Article Number: 3418
Resource File(s):
3418.zip Updated: 2005-03-15 19:48:51
Related Web Link(s):
http://www.rbgazette.com/
Excerpt of article text...
Introduction
This is the first of three bonus articles about designing and building TanGram, a game where players drag around polygonal shapes and arrange them to make pictures. As you may recall, we finished up the TanGram application in the last article. You may be wondering what else there is to do. Among the possible TanGram extensions we could implement, I have decided that adding networked play would be the most interesting. You might not think that TanGram is the best candidate for networked play, but if we design and implement the networked play correctly, it may turn out to be a lot of fun. And it gives us a chance to experience just how easy it is to build simple networked games in REALbasic.
The Plan
I envision the networked version of TanGram to be a game that can be played on multiple computers connected to the same local network. When TanGram launches, it will discover the other players on the network and immediately join their in-progress game. Each copy of TanGram will show a list of all the players currently playing. If a new player joins the game, every other player will know it immediately. When a player moves a piece of the puzzle, every other player will see the same move in their own TanGram. Also, there will be a chat area so that players can chat with each other as they play. For extra credit, and if we have time, we will implement the ability to send private messages to individual players.
...End of Excerpt. Please purchase the magazine to read the full article.