IAWA Oracles For Android

Motivation

IAWA Oracles ScreenI decided to try out Google App Inventor, being invited to the Beta. I wanted a simple enough project to get a feel for the process without becoming bogged down in complex logic or user interface (UI) design. It occurred to me that a random Oracle generator for the In A Wicked Age role-playing game by Vincent Baker would be interesting enough and maybe even useful to others.

The Application

Here is a link to a ZIP of the APK file for the application:

IAWA Oracles For Android

The Logic

App Inventor uses OpenBlocks as a visual programming environment. Very cool for beginners, but also very mouse-intensive when one has repetitious tasks (like pasting in 208 lines of text!)—I’d have liked to be able to edit a TXT or XML file to populate the Oracles lists.

Here is an image of the basic logic for the Blood And Sex Oracles button:

IAWA Oracles Logic Blocks

Nothing too fancy going on here:

  1. Copy the set-specific list to the OraclesCurrent temporary list.
  2. Call the generic procedure that populates the Oracle labels:
    1. Populate the first Oracle label element’s Text with a random Oracle from the list.
    2. Set the second label’s text to the same value as the first.
    3. While the second is the same as the first, populate the second with a random Oracle from the list.
    4. Repeat Steps 2 and 3 for the remaining two label elements, checking them against all preceding labels.
      Put another way, an Oracle label element can not contain the same Oracle text that is currently in any preceding label element.

The rest of the app is a simple UI of buttons for choosing an Oracle set (the BloodAndSex.Click event in the logic shown) and, of course, four global list variables (one-dimensional arrays) to hold the Oracle-set-specific text (the OraclesBloodAndSex in the logic shown).

Credits

In A Wicked Age is ©2007, Vincent Baker, all rights reserved.

IAWA Oracles For Android app is ©2011, David Carle Artman, CC-BY NC 3.0.

Posted in Application, Design and tagged , , , .