Special

Clearance Sale!

We've been publishing for over five years now and it's time to clear out our inventory of back issues, so we're slashing prices!

RBD Magazines

Check out this amazing clearance sale of all our past issues. Missing some issues? This is a great time to complete your RBD collection. Save up to 40% off the regular price of our printed back issue packages. These prices are only good until the end of the year May 2008 and supplies are limited, so place your order today.

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