Download Project or Preview Online
What It Does
Thebanet is a divination tool based on The Theban Oracle by Greg Jenkins. It is an example of how you can use Scratch to implement divination systems you have encountered in books or designed yourself.
Thebanet has 24 glyph tokens (letters of the Theban alphabet) + 1 blank “mystery” token, represented as nodes in a network. A network can have 1, 3, 6, or 9 nodes, and each node’s position in the network changes that node’s meaning (just like a Tarot card’s position in, say, a Celtic Cross spread qualifies the card’s inherent meaning). Instead of having the computer choose the tokens for you, it randomizes their order and then you select from among the set without consciously knowing what each token is (this is like drawing one or more rune-stones from a bag of mixed stones, or one or more Tarot cards from a shuffled deck). There are various options you can toggle on or off to help you select and read the tokens.
How It Works
The basic flow of interaction with Thebanet goes like this:
- Choose your network size: 1, 3, 6, or 9 nodes.
- Thebanet randomizes the 25 tokens (using a Fisher-Yates algorithm) and presents them as a 5 × 5 grid for you to select the chosen number of tokens from. You have the option of viewing a magic square of Mercury to concentrate on prior to selecting your tokens.1
- When you have selected the chosen number of tokens, Thebanet arranges them as hexagonal tiles. You may click any token to view a brief description of its meaning (expanded descriptions are given in Jenkins’s book). You can toggle an overlay that shows the number of each token’s position, or you may toggle a help screen that shows the meaning of each numbered position.
Thebanet has ten sprites—the most of any divination project in Technomancy 101.
NtwrkBttn
— Used to select the network size. When the project starts, this sprite creates four clones of itself, each having a different costume, and then waits for you to click one of them. Each clone has a different value 1–4, stored in thebuttonNum
variable; when one of the buttons is clicked, thelayout
variable, which determines the size of the network, is updated to the clicked button’sbuttonNum
. Finally, the sprite deletes all clones and broadcasts the messagedrawGrid
to activate theGrid
sprite.Grid
— This sprite randomizes a list of numbers (namedrandList
) from 1 to 25 corresponding to the 25 different Theban tokens, then it draws a 5 × 5 grid of buttons with each button assigned one of the randomized numbers (stored in the variable,cloneVal
). When you click a button itscloneVal
value is saved to theselectedNodes
list; also, its costume changes from a blue square to a green square, indicating that square has been selected. Each time a grid button is selected, the variableseleCount
increments by one, and when the count reaches the number of nodes in the chosen network size (1, 3, 6, or 9), the sprite broadcasts the messagebuildNodePosList
to activate theNode
sprite, and then broadcasts the messageeraseGrid
to itself to delete all 25 grid squares.KameaBttn
— This sprite is only shown when theGrid
sprite is active, and is used to activate theKamea
sprite.Kamea
— Displays the magic square of Mercury (as a costume). When theKameaBttn
is clicked, that sprite broadcasts the messageshowKamea
, which when received by theKamea
sprite, causes the latter to show.Node
— Draws the network nodes, i.e, Theban tokens. The number of nodes to draw and their arrangement is determined by the selected network size set earlier in thelayout
variable. Which nodes are drawn and the order in which they are drawn are determined by theselecteNodes
list that was built when you selected the squares from the grid. This sprite has two costumes for each possible node: a dim one and a bright one. The bright one displays whenever the mouse cursor is touching the node, thus the node appears to be highlighted. The value of each node (fromselectList
) is stored in the node’s local variable,nodeVal
. When a node is clicked, the global variablenodeIndex
is set to the clicked node’snodeVal
, and then the messageshowMeaning
is broadcast to activate theMeaning
sprite. If the mouse pointer is then moved away from the node, the sprite broadcasts the messagehideMeaning
telling theMeaning
sprite to hide.Meaning
— Shows a brief text description of a selected node’s meaning. This sprite simply shows when it receives theshowMeaning
message, and hides when it receives thehideMeaning
message.OvrlyBttn
— Sends a message to theOverlay
sprite telling the latter to turn on or off. TheOvrlyBttn
sprite does not show until the stage’s backdrop = 4, which is the backdrop displayed when theNode
sprite has drawn all of the nodes.Overlay
— Displays a diagram laid over the network, showing the number of each placement within the network. Like a Tarot card spread, the placement of each token within the scheme modifies that token’s meaning. The numbers within the network mean different things depending on the network’s size. If you are not sure what a number means, you can activate theHelp
sprite.HelpButton
— Sends a message to theHelp
sprite telling it to turn on or off. TheHelpButton
sprite is only visible and clickable when theOverlay
sprite is showing.Help
— Displays a help screen that briefly describes the meaning of each node placement within the network.
Make It Better
- Allow for token reversals, perhaps represented by red tokens.
- The
Node
sprite has 50 costumes, half of which are just brighter version of the other 25, to highlight a token when hovering over it with your mouse pointer. The same thing could be accomplished by keeping only the 25 brighter costumes and using Scratch’s set (brightness) effect to () or change (brightness) effect by () to dim the tokens a little when not selected. Adding red tokens for reversals as suggested above would expand the total number of costumes to 100, but could be accomplished with just the same 25 costumes and using a combination of the brightness and color effects (you would need to experiment a little to find the best values for dimming the tokens or changing them from blue to red). - Add the ability to de-select a square in the selection grid.