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:

Feature

Adventure Games

A look at a simple state machine

Issue: 4.1 (September/October 2005)
Author: Thomas Reed
Article Description: No description available.
Article Length (in bytes): 7,721
Starting Page Number: 34
RBD Number: 4116
Resource File(s): None
Related Link(s): None
Known Limitations: None

Excerpt of article text...

When I was a kid, I learned the basics of BASIC (forgive the unintentional pun). However, being primarily self-taught, I knew nothing that my BASIC language book could not teach me, which was nothing more than syntax. I possessed no understanding of such things as data structures and algorithms. I suppose I did know about arrays, but I had yet to figure out exactly what they were good for. When I imagined such advanced concepts as artificial intelligence, all I could envision was a huge conglomeration of loops and if-then statements, hard-coding every possible response to every possible stimulus. Ahh, the ignorance of youth!

It was they heyday of the Commodore-64 and the text-based adventure games made popular by Infocom. Since I had always been very interested in Dungeons & Dragons, the idea of creating my own adventure game fascinated me. However, my first attempts were cumbersome to write and play, since every room had its own convoluted if-then-else statement designed to handle all allowed user inputs. As you might imagine, my first games never got larger than maybe a dozen rooms with only a handful of things you could interact with, in only very limited ways. Not much fun.

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