Guide HubCentro de guías
Area Filler · Building your environmentArea Filler · Construye tu entorno

Threadbare · Building your environmentThreadbare · Construye tu entorno

Add Environmental Elements with Area FillerAñade elementos al entorno con Area Filler

The node can quickly place trees, rocks, plants, creatures, and other across part of your Playable Area.El nodo puede colocar rápido árboles, rocas, plantas, criaturas y otras por una parte de tu Playable Area.

Instead of placing every object by hand, you define an area, choose the scenes you want to use, and let Area Filler create an arrangement for you. You can refill the area to try something different, then adjust individual objects by hand.En vez de colocar cada objeto a mano, defines un área, eliges las escenas que quieres usar, y dejas que Area Filler cree una distribución por ti. Puedes rellenar el área otra vez para probar algo distinto, y luego ajustar objetos concretos a mano.

You can try this in a StoryQuest scene you are already building, or practice in a simple test scene first.Puedes probar esto en una escena de StoryQuest que ya estés construyendo, o practicar antes en una escena de prueba sencilla.

What Area Filler doesQué hace Area Filler

Words with an orange underline open a short explainer. Click any of them.Las palabras con subrayado naranja abren una breve explicación. Haz clic en cualquiera.

What you need firstLo que necesitas primero

This guide assumes you already have a scene to work in: a walkable Playable Area, a Player, and a Camera2D that follows the Player. If you are practicing, a simple test scene with those pieces is enough.Esta guía da por hecho que ya tienes una escena donde trabajar: una Playable Area por la que caminar, un Player, y una Camera2D que sigue al Player. Si estás practicando, basta con una escena de prueba sencilla que tenga esas piezas.

Want to set one up first?¿Quieres preparar una primero?

Mark the area you want to fillMarca el área que quieres rellenar

Step 1Paso 1

Click a number when you finish that step.Haz clic en un número cuando termines ese paso.

Create the area you want to fillCrea el área que quieres rellenar

Start by adding an Area2D node to your scene.Empieza añadiendo un nodo Area2D a tu escena.

For this setup, the Area2D will hold the area you want to decorate. An Area2D does not have a size or shape on its own, so you will add a collision shape to give it boundaries. Area Filler will use those boundaries to decide where it can place objects.Para esta configuración, el Area2D contendrá el área que quieres decorar. Un Area2D no tiene tamaño ni forma por sí solo, así que le añadirás una forma de colisión para darle límites. Area Filler usará esos límites para decidir dónde puede colocar objetos.

  • Add an Area2D node to your scene.Añade un nodo Area2D a tu escena.
  • Rename it Decorative Assets. (Double-click its name in the Scene tree.)Renómbralo Decorative Assets. (Doble clic en su nombre en el Scene tree.)
  • Select Decorative Assets in the Scene tree, then add a CollisionShape2D as its child.Selecciona Decorative Assets en el Scene tree, y añade un CollisionShape2D como su hijo.
  • A CollisionShape2D can use different shapes and sizes depending on the space you want to mark. For this example, choose a RectangleShape2D to keep things simple. Move and resize the rectangle until it covers the part of the Playable Area where you want decorative objects to appear.Un CollisionShape2D puede usar distintas formas y tamaños según el espacio que quieras marcar. Para este ejemplo, elige un RectangleShape2D para no complicarlo. Mueve y ajusta el tamaño del rectángulo hasta que cubra la parte de la Playable Area donde quieres que aparezcan los objetos decorativos.

If a node is hard to find in the 2D view, select it in the Scene tree and press F to focus on it.Si te cuesta encontrar un nodo en la vista 2D, selecciónalo en el Scene tree y pulsa F para enfocarlo.

Adding the area and its shapeAñadir el área y su forma
Area2D or StaticBody2D?¿Area2D o StaticBody2D?

Add Area Filler and choose what appearsAñade Area Filler y elige qué aparece

Step 2Paso 2

Add Area Filler and choose what can appearAñade Area Filler y elige qué puede aparecer

Select Decorative Assets and add another child node. Search for AreaFiller.Selecciona Decorative Assets y añade otro nodo hijo. Busca AreaFiller.

is a custom Threadbare node powered by a script. It uses the area you just defined under Decorative Assets to know where to place objects. es un nodo personalizado de Threadbare, impulsado por un script. Usa el área que acabas de definir bajo Decorative Assets para saber dónde colocar los objetos.

You may see a warning icon on AreaFiller for now. That's expected while the setup is unfinished. Keep going through the next few steps and it will disappear once AreaFiller is set up.Puede que veas un icono de advertencia en AreaFiller por ahora. Es lo normal mientras la configuración está sin terminar. Sigue con los próximos pasos y desaparecerá en cuanto AreaFiller esté configurado.

Select AreaFiller and find Scenes in the Inspector. Scenes is the list of different things Area Filler is allowed to place in the area.Selecciona AreaFiller y busca Scenes en el Inspector. Scenes es la lista de las distintas cosas que Area Filler tiene permitido colocar en el área.

  • Expand Scenes.Despliega Scenes.
  • Click Add Element. A new element appears as Empty.Haz clic en Add Element. Aparece un elemento nuevo como Empty.
  • Click Empty, choose Quick Load, and select a scene. You can type in Quick Load to search if you do not see what you want.Haz clic en Empty, elige Quick Load, y selecciona una escena. Puedes escribir en Quick Load para buscar si no ves lo que quieres.
  • Repeat Add Element for each other kind of scene you want, for example a Tree, a Bush, a Rock, or a Butterfly. These are just examples, not requirements.Repite Add Element por cada otro tipo de escena que quieras, por ejemplo un árbol, un arbusto, una roca o una mariposa. Son solo ejemplos, no obligaciones.
Adding Area Filler and choosing scenesAñadir Area Filler y elegir escenas

Fill the area, then adjust itRellena el área y luego ajústala

Steps 3–4Pasos 3–4

Refill the area and adjust the spacingRellena el área y ajusta el espaciado

Use Minimum Separation to control how far apart objects are placed. Adjust the value and click Refill to try a new arrangement. Keep experimenting until the overall spread feels right. The button is called Refill even the first time you use it.Usa Minimum Separation para controlar cuánto se separan los objetos. Cambia el valor y haz clic en Refill para probar una nueva distribución. Sigue experimentando hasta que el reparto en conjunto se vea bien. El botón se llama Refill incluso la primera vez que lo usas.

Fine-tune individual objects by handAjusta objetos concretos a mano

Once the overall arrangement is close, you can adjust individual objects by hand. Move a bush out of a path, shift a tree, or move a few objects around to make the area feel more natural.Cuando el reparto en conjunto esté cerca, puedes ajustar objetos concretos a mano. Saca un arbusto de un camino, corre un árbol de sitio, o mueve unos cuantos objetos para que el área se sienta más natural.

Make these changes after your final Refill, since refilling creates a new arrangement.Haz estos cambios después de tu último Refill, ya que rellenar de nuevo crea una nueva distribución.

Refill, then fine-tune by handRellena y luego ajusta a mano

Check how everything looks when you playComprueba cómo se ve todo al jugar

Step 5Paso 5

Check how everything looks, then set up Y sortingComprueba cómo se ve todo, y configura el ordenado en Y

After adding the decorative objects, try moving the Player around them.Después de añadir los objetos decorativos, prueba a mover al Player alrededor de ellos.

You may notice the Player sometimes appears in front of or behind an object at the wrong time. In a top-down scene, that can make it look like the Player is slipping underneath a rock, or standing on top of something that should be in front of them.Puede que notes que el Player a veces aparece delante o detrás de un objeto en el momento equivocado. En una escena cenital, eso puede hacer que parezca que el Player se cuela por debajo de una roca, o que está encima de algo que debería estar delante de él.

helps Godot draw those objects in an order that better matches where they are standing.El ayuda a Godot a dibujar esos objetos en un orden que se ajusta mejor a dónde están situados.

  • Add a plain Node2D.Añade un Node2D simple.
  • Rename it On the Ground.Renómbralo On the Ground.
  • Turn on Y Sort Enabled for On the Ground in the Inspector.Activa Y Sort Enabled para On the Ground en el Inspector.
  • Move the Player underneath On the Ground, and keep the Camera2D with the Player.Mueve el Player debajo de On the Ground, y mantén la Camera2D con el Player.
  • Move the Decorative Assets area underneath On the Ground. Its CollisionShape2D, AreaFiller, and all the generated objects come with it, so leave them where they are.Mueve el área Decorative Assets debajo de On the Ground. Su CollisionShape2D, su AreaFiller y todos los objetos generados van con ella, así que déjalos donde están.
  • Turn on Y Sort Enabled for Decorative Assets too, so the generated objects inside it take part in the same Y-sorted order.Activa también Y Sort Enabled en Decorative Assets, para que los objetos generados dentro de ella participen en el mismo orden por Y.

Now the Player and the generated ground objects take part in the same Y-sorted order, so which one appears in front can change as the Player moves around them. Play the scene again and check that it looks right.Ahora el Player y los objetos del suelo generados participan en el mismo orden por Y, así que cuál aparece delante puede cambiar según el Player se mueve entre ellos. Vuelve a jugar la escena y comprueba que se ve bien.

Setting up Y sortingConfigurar el ordenado en Y

You should now be able to…Ahora deberías poder…

use Area Filler to fill a space in your scene with environmental elements like trees or rocks.usar Area Filler para rellenar un espacio de tu escena con elementos del entorno como árboles o rocas.

Find quick help inside GodotEncuentra ayuda rápida dentro de Godot

You will not always need a full guide to figure out how something in Threadbare works.No siempre necesitarás una guía completa para averiguar cómo funciona algo en Threadbare.

If you find an unfamiliar custom node, such as AreaFiller, right-click it in the Scene tree and choose Open Documentation.Si te encuentras con un nodo personalizado que no conoces, como AreaFiller, haz clic derecho en él en el Scene tree y elige Open Documentation.

Many custom Threadbare nodes include built-in documentation that explains what they do and how some of their settings work.Muchos nodos personalizados de Threadbare incluyen documentación integrada que explica qué hacen y cómo funcionan algunos de sus ajustes.

If you come across something interesting in an existing Threadbare scene and want to know more about it, try opening its documentation and see what you can figure out.Si te topas con algo interesante en una escena de Threadbare que ya existe y quieres saber más, prueba a abrir su documentación y mira qué puedes descubrir.