Learning

    Documentation

    Balancing difficulty and score

    Balancing difficulty and score

    The following example is based on Stack Jump (App Store; Google Play) developed by ChimpWorks and published by VooDoo.

    In Stack Jump, you’re tasked with building the highest tower possible. Instead of dropping blocks on top of each other, your character needs to jump into the air as blocks slide underneath it. Timing your jumps is key: if you jump too early, or too late, you’ll get knocked off and it’s game over.

    gameplay stack jump game design with machinations
    info

    Core mechanic: Jump to stack blocks, and build the tower.

    Score System: Perfectly aligning blocks gives a boost in points. Consecutive perfect jumps act as points multipliers. Imperfect jumps reset the multiplier.

    Lose condition: Failing a jump.

    Hit the Play button and follow what happens:

    1. The Source (triangle shaped component) produces a Block every second.
    2. The action of the player jumping is represented by the Jump Gate
    3. The Jump Gate will distribute the Jump towards either the Failed or the Successful jump Pools
    4. This is done according to the % on the connections (Resource Connections) going out of the Fail/Jump Gate. The player has a 5% chance to Fail a jump and a 95% chance to Succeed.
    5. The Failed and Sucessful Pools store the Resources (the Jumps) that were transferred.
    info
    All Nodes on a diagram change their state synchronously during a Step.
    1 Step = 1 player action OR
    1 Step = 1 core loop OR
    1 Step = 1 game played
    In this example, 1 Step represents the generation of 1 Block.
    Speed: Adjust the diagram execution speed. The default value is 1 second/Step. Decreasing that value “speeds up” time; increasing it “slows down time.
    game design adjusting speed on a diagram
    So, in the Stack Jump diagram, if you want to speed up Blocks generation, you can change the execution Speed.

    Hit the Play button and follow what happens:

    1. The dotted line (State Connection) going from the Fail Pool, towards the Game Over component, constantly checks the “state” of the Pool that gathers Failed Jumps.
    2. Once the Pool has a number of Resources which is “>0”, it will activate the Game Over component.
    3. The Game Over component is an End Condition. When triggered, this will immediately stop the diagram from playing.
    info

    The State of a Machinations diagram refers to the current distribution of Resources among its Nodes. When Resources get redistributed, the State of the diagram/system changes.

    Normal Jump Score System

    You know the drill: hit Play.

    1. Successful jumps can be Normal or Perfect. That’s why the Pool that in the previous versions of the diagram stored Successful jump Resources, is now replaced by a Gate.
    2. Same as with the Fail/Succeed Gate, the Successful Gate redirects a Successful jump Resource towards a Normal or a Perfect jump.
    3. We’ve given the player a fifty-fifty chance of making either one. This is achieved by the 50%-50% chances on the Resource Connections going out of the Gate.
    4. 1 Normal jump gives out 1 Point to the player.
    5. When a Normal jump Resource goes into the Pool that stores them, the Activate State Connection activates the Source. This generates 1 Point, which is then stored in the Normal Jump Points Pool.
    info

    State Connections are used to influence the state of components on the diagram.

    State connection with the * formula are called Triggers.

    Triggers are commonly used to react to state changes or perform state changes.

    Perfect Jump Score System

    1. Perfect jumps get stored in the Perfect Pool.
    2. The more consecutive Perfect jumps a player performs, a score multiplier is applied.
    3. When a Perfect Jump is performed, so a Perfect Jump Resource reaches the Perfect Pool, the Activate State Connection activates the Points Source.
    4. You will notice that the Resource Connection that goes from the Source to the Perfect Jump Points is 0.
    5. This is where the second State Connection Labeled multiplier comes in. This connection takes the input from the Perfect Pool (the number of Resources present in the Pool) and populates the multiplier variable from the Register’s formula: floor((1+sqrt(1+8*multiplier))/2)
    6. The result of the formula is added to the 0 on the Resource Connection that sets how many Point Resources get produced by the Source.
    info

    In Machinations, Registers are used to alter the state of Nodes or influence the flow of Resources based on the computation of multiple inputs coming from either Nodes in the diagram or your own input during a diagram Step-by-Step Run.

    The Formula field for Registers supports functions from the math.js library.

    The floor(x) formula in this example, rounds the multiplier value applied to the Perfect Jump Score towards minus infinity, so that the score is always an integer.

    Resetting the Perfect Jump Multiplier

    1. The Reset Multiplier Drain (the up-side-down triangle) is activated when a Normal jump is performed. This will drain all (notice the Fromula on the Resource Connection going out of the Perfect Pool to the Drain) Resources from the Perfect Pool. This Resets the Multiplier points system untill another Perfect jump is performed.
    info

    A Resource that goes into a Drain is permanently removed from a game’s economy.

    The Score

    This is the last note and the big reveal 💪 Hit Play.

    1. The Score Register adds the Normal Jump Points and the Perfect Jump Points, stored in their respective Pools.

    Once your model is where you envisioned it, it’s time to balance it.

    Whenever you hit Play on a diagram, each Node produces data points. Pools and Registers can be plotted on the Chart, so you can visualize their evolution.

    In the final model for Stack Jump, I have already added the Score Register to the Chart. Hit Play and witness how a player’s score may evolve during a game, considering all the parameters we’ve set.

    In the top right of the embed widget, there’s a blue button “Add to my Machinations”. This will add a copy of this diagram to your Machinations account, and it will allow you to perform even more powerful simulations. Do this, and follow along.

    Now that you’ve added the diagram to your account, you can perform Batch Plays on it. Batch Plays are a powerful tool in Machinations, that allows you to perform multiple run-throughs of the system you created. These simulations, as opposed to Interactive Plays (Step and Play), are performed on our servers, so they do not overburden your browser.

    From the Batch Plays number drop-down, select 100 Batch Plays and hit the Batch Plays button.

    The Orchestrator will start playing through the diagram, and retrieving and plotting the data from our servers. At the end of the 100 Batch Plays, you’ll get a Chart that looks similar to this.

    Insights:

    1. The highest score out of 100 games: is 176, with a tower that’s 99 blocks high (Step count, since 1 Step is 1 Block)
    2. The player will typically build a 30-40 blocks tower during one game

    A more in-depth analysis can be performed if using Indicators (Pro Feature).

    In the top right of the Chart tool, click Indicators > Mean Average; Min value; Max value

    1. For where the density of the graph is highest, a player will reach a score of maximum 67, minimum 47 and an average of 54
    warning

    Your simulations, on the same diagram, with the same odds, might look slightly different than the ones above. That’s because Machinations accounts for randomness at each of the action it computes during a play of the diagram.

    In the beginning of this example, we made several assumptions, the first being about player skill. This translates into the % of Fail vs Succeed. We assumed players will succeed at a jump 95% of the time. This may be true for a skilled player, but how would our stats look like for a beginner?

    On the diagram copy you’ve made, change the % on the Fail and Succeed Resource Connections to 25% and 75%, respectively.

    From the 3-dots menu to the right of the 10 Batch Plays performed previously, deselect Show in Chart.

    Perform another 100 Batch Plays with the new parameters.

    How do the stats for a beginner look like as opposed to an advanced/more skilled player?

    All Batch Plays performed on the diagram will be (persistently) saved in Play History. With each change you make on a diagram, a new set of Batch Plays will appear in the list. You can Rename them, to have a clear record of what simulations you have performed and their results.

    Since we’re looking at types of players, we named these two Advanced and Beginner Player.

    As with any type of simulation, the more Batch Plays you perform on a model, the more accurate your results will be.

    Stack Jump monetizes in 3 ways: via banner ads and forced videos, via a premium version with no ads, and via rewarded videos – the Second Chance mechanic.

    How would you model the Second Chance mechanic and connect it to the gameplay diagram in the example above?

    Hints:

    1. The Second Chance is granted only once per game. First figure out how you need to expand the Fail branch of the diagram to implement a Second Chance mechanic that’s granted each time a Fail happens.
    2. Once you have figured that out, how do you stop offering Second Chances? Is it a secondary condition that can trigger the Game Over Node?

    Stack Jump also has 4 types of challenges each with 12 levels. These are used as training grounds.

    1. How would you model them in Machinations?
    2. How would you implement a system that influences the Fail/Succeed parameters, based on challenge completion, considering their level of completion would increase a player’s skill?
    Contents

    All Rights Reserved © Machinations S.àr.l

    8217, Mamer, Luxembourg, accounts at BGL BNP PARIBAS, VAT number: LU30464284

    We use cookies for marketing and analytics. We also share information about your use of our site with our marketing and analytics partners who may combine it with other information that you’ve provided to them. You consent to our cookies if you continue to use our site. Learn more