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

Getting Started On TanGram

Building a puzzle game

Issue: 2.4 (March/April 2004)
Author: William Leshner
Author Bio: William Leshner has been programming for twenty years and programming Macs for ten. He has spent a good deal of the last several years building REALbasic applications, utilities, and plugins, including KidzMail and SQLitePluginPro.
Article Description: No description available.
Article Length (in bytes): 8,440
Starting Page Number: 40
RBD Number: 2420
Resource File(s): None
Related Link(s): None
Known Limitations: None

Excerpt of article text...

In our last article we finished off the StocksSocket project and we are ready to begin something new. I thought this time we'd work on a puzzle game. The game I have in mind is modeled after a popular puzzle called Tangram, in which you manipulate various polygons to make pictures. Usually you have a book of pictures and you have to construct each picture with the polygons. Each picture is a miniature version of an already constructed picture drawn all in black so you can't tell where the individual pieces go. In our REALbasic version of Tangram, the puzzles will be randomly selected from a pool and shown to the user to solve. The user will drag seven shapes around with the mouse in an attempt to create the picture. At any time the user can ask to see the solution. It may sound a little complicated right now, but once we get into it, things should become clearer. What makes TanGram particularly interesting is that it lends itself quite well to REALbasic's Object2D classes. We will be making heavy use of those classes both to draw the basic shapes the user will drag around, and to draw the small puzzle picture itself. I also plan to touch a bit on some of the issues involved in creating a cross-platform application. TanGram should run equally well on Mac OS 9, Mac OS X, and Windows. However, we will have to be careful in a few places to make sure that we achieve a good user experience on all platforms.

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