Ir al contenido
levelmock.com
  • Home
  • Documentation
  • Contact
202-555-0188
202-555-0188
levelmock.com
  • Home
  • Documentation
  • Contact

The basics

2
  • Introduction
  • Basic concepts

workflows

4
  • Typical Workflow
  • Creating Reusable Pieces
  • Sprite-Based Animations
  • Sprite Editor
View Categories
  • Home
  • docs
  • workflows
  • Creating Reusable Pieces

Creating Reusable Pieces

2 min read

Pieces allow you to group and reuse sets of elements that repeat throughout your project.

When should you create a Piece? #

It is best to create a piece when a set of elements with the same characteristics repeats frequently, making manual reconstruction tedious. Common examples:

  • Repeated terrain areas.
  • Animated elements, such as torches in a corridor.
  • Complex reusable structures.
  • UI components.

How are they used? #

Once created, a piece can be added to a scene just like:

  • A sprite.
  • An atlas region.

Pieces:

  • Appear in the palette under the Pieces category.
  • Can also be dragged directly from the Pieces list.

How do they impact exporting? #

Pieces can be exported independently to integrate them into custom workflows. However, in the most common scenario:

  • If a piece is used within a scene, it does not need to be exported separately.
  • When exporting the scene, a copy of the piece is included within it.

Important: If you modify a piece after using it in a scene, you must resave the scene and export it again. Changes to the reference piece will only reflect in the scene after this step.

Creating a Piece #

  1. In the top menu, go to Pieces → Create Piece.
  2. In the left panel, locate the newly created piece.
  3. Right-click on it and select Load.

Editing a Piece #

Once the piece is loaded, you can:

  • Drag elements onto the canvas.
  • Build the necessary composition.

Key differences from Scenes:

  • Pieces do not have layers.
  • Hierarchy is managed through element nesting.

To nest elements:

  1. Drag one element over another in the right panel.
  2. They will group automatically.
  3. When nested, the rotation points of the parent element affect the transformation of its children, similar to a skeletal/bone system.

Physics Properties in Pieces #

Elements within a piece can have physics properties. To configure them:

  1. Select an element.
  2. Define the physics shape type.
  3. Edit its values in the Properties panel.

Saving a Piece #

To save a piece:

  • Go to the top menu: Pieces → Save Piece.

Usage via Code #

If you want to use a piece directly from your code, you can export it independently. If you only use it as part of a scene, simply load the scene and drag the pieces from the palette or list.

Updated on enero 31, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Typical WorkflowSprite-Based Animations

Powered by BetterDocs

Deja un comentario Cancelar respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Table of Contents
  • When should you create a Piece?
  • How are they used?
  • How do they impact exporting?
  • Creating a Piece
  • Editing a Piece
  • Physics Properties in Pieces
  • Saving a Piece
  • Usage via Code
  • Home
  • Documentation
  • Contact

Levelmock