Learn SugarIntermediate

Apps

Use one App when several Items and Boops need to share variables, media, embeds, or scheduled changes.

An Item or Boop can build a complete activity by itself. An App is for ideas that use several creations together.

Imagine a city game with:

  • A Boop for taking a daily job
  • An Item that shows the player’s reputation
  • A ticket Item that opens special events
  • A community goal that every player can help complete

An App lets all of those creations use the same player progress and community total.

What an App can provide

An App can contain:

  • Variables for each JOI
  • Variables in the App scope used by everyone
  • Variables in the Host scope provided to each linked Item or Boop
  • Constants calculated from other App variables
  • Functions shared by linked Items and Boops
  • Embed Templates, defaults, and mixins for composing linked creations
  • A Media Library and reusable Media Pools
  • Automations

Link an Item or Boop to the App to make those parts available to it. The Item or Boop keeps its own variables, media, and templates too.

Open Apps from Mint or Boops, then create a new App.

After creating it:

  1. Add shared variables, functions, Embed Templates, defaults, and mixins to Main, then add any media or Automations the connected experience needs.
  2. Open an Item or Boop that should use the App.
  3. Choose the App in that creation’s App section.
  4. Save the creation.

Repeat the linking step for every Item or Boop that belongs to the experience.

When an App is useful

Use an App when you need at least one of these:

  • One JOI’s progress across several Items and Boops
  • A number or choice shared by every player
  • The same media or Embed Template in several creations
  • A program that runs hourly, daily, weekly, or monthly
  • Lore rewards from an App verified by JOI

When an App is not needed

Do not create an App only because an Item has several actions or a long program.

A standalone Item can already have its own variables, Memory variables, functions, Media Library, Media Pools, and Embed Templates. A standalone Boop can do the same for its own interactions.

App functions are useful when several linked creations repeat the same calculation or behavior.

When several linked creations need the same declarations or action structure, App Main can provide them without copying the source into every creation. Learn the complete pattern in Defaults and mixins.

Apps require Plus. The exact creation limits are listed in the Limits and errors reference.

The next page teaches the three App variable scopes and how each scope composes with the variable declarations you already know.