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.5 (May/June 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): 10,999
Starting Page Number: 40
RBD Number: 3518
Resource File(s):

Download Icon 3518.sit Updated: Wednesday, May 18, 2005 at 11:40 AM
Download Icon 3518.zip Updated: Wednesday, May 18, 2005 at 11:40 AM

Related Web Link(s):

http://www.rbgazette.com/

Known Limitations: None

Excerpt of article text...

Introduction

This is the second of three bonus articles about designing and building TanGram, a game whereby players drag around polygonal shapes and arrange them to make pictures. As you may recall from the previous article, I have decided to add networked play to the original TanGram application. In this article we will implement the functionality necessary for broadcasting game moves to everybody in the multicast group. We need to make a number of changes to our original TanGram code in order to accommodate the new functionality. This often happens in software development. You should always be prepared to rip code up and rebuild it if the result is a more flexible design.

Before I go any further, I must correct an omission from my previous article. Aaron Ballman kindly answered my many questions about UDP and the EasyUDPSocket class. I utterly failed to thank him publicly for that help, so I am doing that now.

Moving Around

You may recall from the previous article that in the networked version of TanGram, every copy of TanGram running on a local network automatically joins the same multicast group. We implemented group chat in the last article. In this article we implement group moves.

...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