You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
11 Hrs
34 Min
35 Seg

Crea la estructura del fantasma

4/21
Resources

How do you deal with the first enemies in a mini-game?

Developing logic and animation for video game characters, such as ghosts, can be an exciting and enriching challenge. In this educational guide we will explore how to approach this task in the context of developing a mini-game. We will focus on the process of animating and coordinating these virtual entities when using tools such as Spark AR.

How to start the ghost rendering?

  1. We start by using a plane that visually represents the ghost, renamed as "ghost 1".
  2. It is essential to define its position in the playing area. To prevent visual errors, we establish a range of appearance for these characters:
    • Vertical position: from point 35 to minus point 35.
    • Horizontal spacing: from minus point 10 to point 10.

How is the movement of the ghost modified?

For correct vertical and horizontal movement, we set up the following:

  1. Vertical movement:
  • We use the loop animation node which allows us to create a cyclic movement from top to bottom.
  • We adjust the duration of this animation by changing the progress from 0 to 1 using the transition node, to span values from minus point 35 to point 35.
  1. Horizontal movement:
  • Using the random node, a random number within the desired range is generated each time the ghost completes its vertical travel.
  • For testing, screenTap can be used, simulating touch screen interactions to generate random positions.

How is the phantom logic grouped?

To simplify and better organize the node structure, we proceed as follows:

  • All the previously created logic is grouped in a patch called "ghost".
  • This group is converted into a patch asset, which allows to easily replicate this behavior in multiple ghosts. This avoids modifying one by one when a global change is needed.

What is achieved by using patch assets?

  1. A speed attribute can be added by adjusting the animation:
  • We modify the patch asset properties with a new input called "speed" that proportionally affects the speed across all phantoms.
  1. Improved customization:
  • With a single control, the speed of multiple ghost instances can be managed, avoiding individual changes.
  • Ghosts can receive color as output from the patch asset, adapting their materials for better visualization with flat shaders.

What additional challenges are presented?

Despite the initial setup, facing multiple enemies introduces the need to define more precise rules:

  • Synchronization and animation of multiple ghosts to use sender and receiver to better coordinate the start and end of their cycles.
  • Implementation of visual elements to perceive connections and errors.
  • Preparation to detect interactions with the player, such as touches.

Through these methodologies and tools, you will increase your skills in mini-game development, preparing you to face even higher level challenges in future stages. Continue exploring and learning more about the exciting world of game development!

Contributions 11

Questions 5

Sort by:

Want to see more contributions, questions and answers from the community?

Entendí todo y a la vez nada :-0

Excelente curso! Estoy muy emocionada

Vaya cuantas herramientas y funcionalidades en el Editor, me encanto esta clase

Al principio entender el patch editor no es fácil pero practicando y cometiendo errores es que uno le toma amor.

Siento que ha sido de las clases que menos he entendido pero más me ha emocionado 😮 ❤️

tengo problemas jajjajaj no cambian de posicion los tres todos quedan en el mismo sitio y el momento de receiver no me da opcion de poner el send ![](https://static.platzi.com/media/user_upload/image-fd8ffd59-29c6-4085-951b-00318fb6658f.jpg) receiver no da ninguna opcion. ![](https://static.platzi.com/media/user_upload/image-7973a192-f934-457d-a477-683f0385de83.jpg)![]()![]()

fue muy caótico la primera vez intentado hacer la estructura XD… pero con el tiempo y practica todo se va solucionando

Uf, estuvo complicado pero se pudo jaja

Ahora si siento el nivel avanzado 😯

Esa musica no cuadra de nada.

¿Quieres agregar imágenes a tus animaciones?
En esta clase puedes aprovechar para agregar imágenes a tus materiales