Article Preview
Buy Now
| PDF: |
Feature
Karel the REALbasic Robot
How the rbKarel robot simulation teaches logic with RBScript
Issue: 8.1 (November/December 2009)
Author: Andy Dent
Article Description: No description available.
Article Length (in bytes): 22,739
Starting Page Number: 30
RBD Number: 8110
Resource File(s):
project8110.zip Updated: Monday, November 2, 2009 at 11:57 AM
Related Web Link(s):
http://code.google.com/p/rbstuff/wiki/rbKarelOverview
http://www.cs.mtsu.edu/~untch/karel/
http://sourceforge.net/projects/karel/
http://karel.sourceforge.net/doc/html_mono/karel.html
http://www.amazon.com/Karel-Robot-Gentle-Introduction-Programming/dp/0471597252
http://www.amazon.com/Karel-Gentle-Introduction-Object-Oriented-Programming/dp/0471138096
HTTP://www.gametraining.net
http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.1615329425.01615329428
http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.1615329425.01615329428
http://karel.sourceforge.net/
Known Limitations: None
Excerpt of article text...
Karel the Robot has been around for nearly thirty years as a way to teach people the basics of logic through solving simple problems. The rbKarel project uses RBScript to provide the language interpreter for Karel along with a few goodies like spoken output and single-stepping. It also uses a much simpler context object for a second RBScript to define worlds. Why write a parser when RBScript does the hard work for you? This article doesn't attempt to teach the basics of RBScript -- see the resources list at the end for past RBDeveloper articles on that topic. What I do cover are some of the interesting challenges in adapting RBScript for Karel and particularly how to add single-stepping and other controls over the script execution. As I wrote the article I also found myself explaining a few points about the software design decisions, which may seem heavy-handed to experienced programmers but hopefully will keep reminding others of some core principles.
When Jeff Ayling posted his request for help, I was intrigued by the "Just how hard could it be?" prospect of trying to implement a particularly REALbasic style of Karel.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







