Special

Special Print Offer

Get the RBD Archive 7 printed book for FREE when you buy an Ultimate Combo printed back issue package! This perfect-bound book is over 300 pages and contains the full year 7 of RBD. Normally this book sells for $50, but with this special offer you not only save 25% off the normal package price, you get the book included for free!

RBD Magazines

Supplies are limited, so take advantage of this offer before it goes away.

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