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:

Beginners Column

Welcome to the REALbasic Developer Magazine Beginner's Corner!

Issue: 2.1 (August/September 2003)
Author: Thomas J. Cunningham
Author Bio: Thomas is a hobbyist programmer who enjoys sharing the RB loving with others ... His online RB Beginner tutorial has had over 20,000 hits!
Article Description: No description available.
Article Length (in bytes): 8,776
Starting Page Number: 28
RBD Number: 2113
Resource File(s):

Download Icon 2113.sit Updated: Friday, October 17, 2003 at 12:21 PM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

One of the fun things I like to do with REALbasic is write simple little games. Games have certain logical steps that are challenging to try and duplicate in a computer game. They are a fantastic way for a beginner to think logically. In this column and the next one, we will be writing a dice game called Craps.

Dice Game Description

You roll two dice and add the total of the numbers. This first roll total is your "point". You continue to roll the dice, and if you roll your point again before throwing a seven or eleven, you win. If you throw a seven or eleven before you throw your point, you lose - you Crap Out. If you throw a two, seven, or eleven on your first throw, you also lose. The player starts out with a certain amount of money. They are given a chance to bet an amount of this money. If they win, this same amount is added to their winnings. If they lose, the amount is deducted from their total.

Describing what you want your program to do, as I have done above is a great technique to help you with any project. It helps you to identify the players of your project. Now be sure to understand that there must be a hundred different ways to program this game to do the same things. Obviously, I am going to give you one approachwhich is how I would approach this game. However, I encourage you to try and program your own approach after reading through this tutorial. This is one of the subtle beauties of computer programming, i.e., you get to do it your way!

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