Introducci贸n

1

Game Design del juego

2

La estructura y assets de un proyecto en Unity

3

Convirtiendo nuestros assets en Tiles

4

Tilemaps y creaci贸n del escenario

5

Bonus: FastForward de la creaci贸n del escenario, sorting layers y creaci贸n de colliders

6

Ac谩 encontrar谩s los archivos de este curso

Personaje principal: Movimiento y Animaciones

7

El jugador y el movimiento

8

Creando nuestra primera animaci贸n

9

Creando el grafo de animaciones

10

Usando un 谩rbol de animaciones

11

Mostrando la soluci贸n del desaf铆o e implementando transici贸n entre blended trees

12

Programando una c谩mara que siga al jugador

13

Correcci贸n del bug gr谩fico

14

l铆mites del escenario, rigid bodies

15

Ejercicio: dise帽o de interiores

Escenarios Avanzados

16

Transiciones entre escenas

17

Mantener Player y Camera entre escenas

18

Spawning Points: programando que el jugador y la c谩mara aparezcan en el lugar correcto al cambiar de escena

19

Agregando Identificadores a nuestros Spawning Points para controlar mejor el flujo de nuestro juego

Enemigos Avanzados

20

Creando nuestro enemigo

21

Programando las f铆sicas y el patrullaje del enemigo

22

Generando movimiento completamente aleatorio

23

Programando el ataque del enemigo

24

Crear Manager de Health del Player

25

Crear armas

26

Programando el ataque del Player con arma

27

Mover la espada al caminar

28

Creando el ataque con espada

29

Ejecutando el ataque con un bot贸n

30

Movimiento en diagonal

31

Optimizando nuestro player controller

32

Ataque mejorado

33

Uso de part铆culas

34

A帽adir el da帽o del enemigo en batalla

35

Programando los contadores de vida del enemigo

36

Colocando m谩s info de UI en pantalla

37

Script de la vida

Personaje principal avanzado

38

A帽adir el da帽o del personaje (ejercicio)

39

Sistema de puntos de experiencia para nuestro personaje principal

40

Level Up!

41

Level Up! Defensa y Reto Final del M贸dulo: Stats de los enemigos

42

Creando un NPC

43

Limitar el movimiento de nuestro NPC

44

Creando una pantalla de di谩logos para nuestro RPG

45

El di谩logo del NPC

46

M煤ltiples l铆neas de di谩logo

47

Parar el NPC durante el di谩logo

48

Parar el personaje durante el di谩logo

Quests

49

La estructura de una quest

50

Quest 1: Ir a un lugar

51

Quest 2: Encontrar un objeto

52

Quest 3: Matar enemigos

53

Revisi贸n de bugs

54

Mantener la c谩mara dentro del escenario

55

El problema al cambiar de escena

Audio

56

Agregando SFX a nuestro videojuego

57

Agregando m煤sica a nuestro videojuego

58

Ajustar vol煤men del audio de cada uno de los efectos de sonido

59

Creando un VolumeManager

60

Agregando econom铆a a nuestro juego y cierre

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:

0 D铆as
19 Hrs
44 Min
36 Seg

La estructura de una quest

49/60
Resources

How to structure quests in an RPG?

Exploring the design and programming of quests in a role-playing game is a crucial element to provide the game with purpose and maintain the user's interest. Quests act as story engines, providing objectives for players beyond simply exploring the virtual world. Successful games such as The Witcher, Final Fantasy, and even the long-running World of Warcraft have maximized the potential of quests to enrich the user experience.

How do we initiate the creation of a QuestManager?

To manage our quests, the first step is to create a QuestManager. This will act as the manager or coordinator, grouping and managing all the Quests. Here you will name and structure each Quest:

  • Create an empty object called QuestManager. This will be in charge of managing the Quests.
  • Add as children of the QuestManager new empty GameObjects for each individual Quest, which can be named Quest 0, Quest 1, etc.

This way, every time you want to add a new quest, you simply create a new Quest object and configure it according to the needs of the game.

How do I program the "QuestManager" in C#?

The QuestManager requires a script that manages the essential parameters of each quest, and monitors its progress during the game. Here is an example of how to program the basis for this quest manager:

public class QuestManager : MonoBehaviour{ public Quest[] quests; public bool[] questCompleted;
 void Start() { questCompleted = new bool[quests.Length]; } }}

In this script, an array of Quest and a boolean array is set to know which quests have been completed. This provides a simple basis for modifying the number, tracking, and characteristics of quests.

What information does the script need from each Quest?

Each quest must have a unique identifier and a reference to the QuestManager, as well as methods to manage its start and completion. This is how this script can be structured:

public class Quest : MonoBehaviour{ public int questId; private QuestManager manager;
 void Start() { manager = FindObjectOfType<QuestManager>(); }
 public void CompleteQuest() { manager.questCompleted[questId] = true; gameObject.SetActive(false); }
 public void StartQuest() { // Display mission start textón }} }

In this code, CompleteQuest() notifies the QuestManager that the quest has been completed, while StartQuest() will start the quest, notifying the dialog system to display the corresponding text.

How are the quests integrated with the dialog system?

The next step is to integrate each Quest with the existing dialog system so that it can communicate both the introduction and completion of each mission to the player.

  1. Add references to the DialogManager within the QuestManager to manage quest texts.
  2. Use methods such as ShowQuestText to render messages to the player.

With this structure, you can coordinate your quest interactions efficiently, while also allowing for seamless collaboration between different elements of the game system. These design principles and strategies not only allow you to approach RPG programming with best practices, but also offer a kaleidoscope of possibilities to keep players immersed and engaged.

Contributions 4

Questions 1

Sort by:

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

Excelente forma de estructurar el c贸digo en Unity.

Sobre la funci贸n

  • FindObjectOfType<T>();

https://docs.unity3d.com/ScriptReference/Object.FindObjectOfType.html

La documentaci贸n de Unity dice lo siguiente:

Tenga en cuenta que esta funci贸n es muy lenta. No se recomienda utilizar esta funci贸n en cada fotograma. En la mayor铆a de los casos, puede utilizar el patr贸n singleton en su lugar.

Por lo que, yo recomendar铆a en cada manager hacer un singleton, ejemplo:

public static GameManager sharedInstance;

void Awake(){
	if(sharedInstance == null){
		sharedInstance = this;
	}
}

Luego podemos acceder a los m茅todos p煤blicos de cada Manager mediante su intancia sharedInstance:

GameManager.sharedInstance.ExampleMethod();

Hay que considerar que en la practica lo primero que debes hacer como game desingner es justamente definir la estructura de tu juego y todo el lore que planeas contar y una vez este todo bien definido bienes y escupes c贸digo xD. Pero la verdad que el curso ha estado muy bueno, aprend铆 demasiado, pero si me gustar铆a dar mi opini贸n como alumno a que en el futuro haya un curso en Platzi en el que se lo comience haciendo el documento de dise帽o y luego ya con todo eso en mente nos muestren de comienzo a fin como hacerlo 馃槃

Genial