Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

Print:
PDF:

From Scratch

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 http://www.rbgazette.com/.
Article Description: No description available.
Article Length (in bytes): 11,282
Starting Page Number: 40
RBD Number: 3418
Resource File(s):

Download Icon 3418.sit Updated: Tuesday, March 15, 2005 at 7:49 PM
Download Icon 3418.zip Updated: Tuesday, March 15, 2005 at 7:49 PM

Related Web Link(s):

http://www.rbgazette.com/

Known Limitations: None

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. It sounds like an ambitious plan, but it is surprisingly easy to implement, as we will see. As always, our first step is the user interface. New TanGram UI

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com