AxZee! / Fun with Random!

Greetings Axurians!

The team at Axure HQ is back with another instant classic addition to the “Fun with Random” series of games! In the unlikely event that you’re unfamiliar with our classic lineup of games, please take some time to check out past hits Grub Guess, Rock, Paper, Scissors, Lizard, Spock, Simon’s Great Sloth Hunt, as well as Axure Quest VIII, The Monty Hall Problem, Julie’s Game of Cards, and Deal or No Deal. Without further ado, I am happy to bring to you our latest gem, our take on a dice rolling classic, AxZee!!!

The rules of AxZee are fairly simple and should be somewhat familiar if you’ve ever played its classic IRL dice rolling counterpart. The game consists of 13 total rounds; during a round each player gets up to 3 rolls of the dice, after each roll the player has the option to hold any amount of dice and can then roll or re-roll the remainder of the unselected dice. Once the player is happy with the dice they’ve rolled and/or reached the 3 roll limit they must select one of the 13 categories to apply their score to, or score 0 in the category of their choice if the dice they’ve rolled do not meet any category’s scoring requirements. Below are example rolls and scores for the upper and lower sections of the scorecard.

Upper Section


Lower Section

In the case that a player rolls an AxZee, they are required to scream “AxZee!!!” as loud as possible regardless of their current surroundings.

See it Live!

Breakdown

Dice
All of the “Randomness” of Axzee is contained within the dice rolling phase of the game. After you’ve filled out all player names the “Roll” button is activated. When Roll is clicked, it triggers several Set Panel State actions that randomly set the states of the five dynamic panels that represent the AxZee dice. The interaction associated with the Roll button looks like this:
37%20PM
The expression used to generate the random value is displayed below, where “6-1” is the range of random values and represents the six dynamic panel states and the six sides of the dice:

[[Math.floor(Math.random() * (6-1+1)) + 1)]]

By default, generating a random value within a range of set values is inclusive at the lower end of the range, ie “1” but exclusive at the higher end, ie “6”. The addition of “+1” to “6-1+1” makes the function inclusive at both ends. This makes it possible to roll any one of the six sides of the dice.

Score Counter
While putting together the game I decided that I wanted to include a “dice total” widget that would display the sum of the dice including any held dice from previous rolls. This is to spare the player from having to tally the total dice values themselves. This initially presented an issue as when dice were held and frozen at a certain value (dynamic panel state), the held dice were still being rolled in the background but not displayed, causing the counter to display a value that did not reflect any held dice. This also prevented players from being able to deselect and reselect dice as the deselected die’s value would update to the value of the hidden re-roll.

These issues influenced the decision to create separate cases and interactions for each separate die (as pictured above), as opposed to one interaction where all dice are rolled. This also created the requirement to add a selected/checked value to each of the dice so that when the Roll button is clicked, dice are only rolled if their selected value is false. If the selected value is true, those dice values are retained and the dice total is recalculated.

Scorecard
When a score is entered into one of the scorecard cells and the field is escaped this triggers a reset of the state of the dice, the roll count, and the dice value counter, setting up the game for the next player’s turn. After playing a few rounds, you may also notice that the upper section, lower section, and grand totals are all calculated automatically based on the scores that you’ve set within a given game’s column. This is done simply using Set Text interactions that add the values of local variables (LVAR1-6) that represent the previous scores added to the scorecard, which looks something like this:


That pretty much covers the specifics of the game. Now that you have the inside scoop on how it works, grab a friend and get rolling with AxZee!!!

In case you’re interested in breaking down the game’s inner workings at a more granular level, the source .rp file is attached to this post.

AxZee.rp (3.1 MB)

2 Likes