Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 2.1

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): 9,871
Starting Page Number: 28
Article Number: 2113
Resource File(s):

Download Icon 2113.zip Updated: 2013-03-11 19:07:57

Related Link(s): 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.