☉Getting Started

    Documentation Tutorials

    Infinite Runner Game Loop

    Infinite Runner Game Loop

    Think about Subway Surfers, Temple Run or Sonic Dash
    success

    Hit PLAY on the diagrams embedded throughout this example.

    Players △ Sprint5 meters/Step. ◯ Distance keeps track of how far they get.

    • △ Sources produce Resources
      • Sprint generates meters
    • → Resource Connections transfer Resources
      • The amount of meters Sprint generates is stated by the 5 on the meters Resource Connection’s Formula
    • ◯ Pools collect Resources
      • Distance keeps track of the distance (meters) the player runs

    △ Sprint generates ◯ Distance AND a ◯ Difficulty Factor. Distance is generated for each Step. The Difficulty Factor is generated once every 2 Steps.

    success

    resource connection with interval in machinations

    The Formulas on → Resource Connections set the rules of the flows.

    In this case, the connection works in intervals. It sends 1 Resource every 2 Steps.

    • ⇢ State Connections change the state of elements on the diagram
      • We use the ◯ Distance Pool to determine how many Coins the players get, depending on how far they get
      • Each of the 3 State Connections leaving the ◯ Distance Pool do 3 things:
        1. Take feedback from ◯ Distance (how far did the player get)
        2. Check the condition in their Formula
        3. Dectivate/Activate the output △ Sources
    • Upon activation, the △ Sources generate ◯ Coins
    • The ◯ Coins Pool keeps track of the amount accumulated by the player

    If the Difficulty Factor is >1, then generate Obstacles.

    Each Obstacle can cause the player to crash.

    The ◇ Chance of Error is →10%.

    If the ◯ Player Crashes, 🔳 End Run.

    With each increase in ◯ Difficulty Factor, the → chance of Error increases by ⇢ 1%.

    Contents

    Used by 2500+ game studios all over the world

    350+ universities & academic institutions use Machinations

    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