HIVE KILLER RESIDENCE - UNITY DEVLOG #3

Portada.gif

Spanish Version

Buenas gente! como están? Ya tercer devlog de este juego por el cual estoy muy emocionado ya que me esta encantando como va quedando, estoy aprendiendo muchas cosas y comparto todo este proceso con ustedes!
Como en los anteriores post voy a hacer un resumen de la idea del juego y lo que vinimos trabajando en estas primeras semanas de desarrollo.
Este va a ser un juego de terror muy tenso cuya historia se basa en que un millonario que resultó ser un psicópata los secuestro y encerró en su mansión pero ustedes se lograron escapar y antes de irse de su casa quieren robarle la mayor cantidad de tesoros que puedan. Pero el psicópata sabe que escaparon y va a estar atrás suyo.
En el primer devlog trabajamos las mecánicas básicas del personaje y también elegimos que algoritmo íbamos a usar para hacer que la mansión en donde va a ser el gameplay del juego se genere de forma random para así poder evitar que sea repetitivo y que cada vez que jueguen se sienta diferente.
En el segundo devlog ya pudieron ver avances de la implementación del algoritmo en donde ya creábamos habitaciones, paredes y pisos de la casa.

En esta semana que paso tocaba trabajar en las puertas y pasillos de la casa que es lo que les voy a mostrar a continuación!

Para empezar debo decir que me costo mucho mas de lo que pensé hacer esto ya que mi primera idea me resulto mas difícil de lo que esperaba.
La idea era generar los pasillos de la casa con un algoritmo muy utilizado en Unity y sobre todo para inteligencias artificiales llamado A*(A Estrella) el cual a través de nodos colocados en el juego elige el camino mas optimo para llegar de un punto A a un punto B.

image.png

Por ejemplo en esta imagen cada punto verde seria un nodo y el algoritmo A* los utilizaría para generar ese camino rojo entre el punto A al punto B.

Al usar este algoritmo me di cuenta que iba a tener dos problema:

  1. El pasillo iba a ser de A a B y no iba a tener mas ramificaciones. Esto podría llegar a tener solución ya que podríamos utilizar el algoritmo varias veces para que haga varios pasillos.
  2. Pero el problema mas complejo era que una vez elegido el camino seme resultaba muy complicado el usar ese camino ya que, como en la imagen que muestro debajo, iba a tener que sacarle "porciones" de espacio a las habitaciones lo cual complicaba mucho las cosas.

image.png

Por lo que preferí utilizar otra idea que resulto mas sencilla, correr el algoritmo de generación de habitación para generar espacios grandes, esos espacios achicarlos para dejar el lugar del pasillo y luego en esos espacios de "habitaciones" que me genero volver a utilizar el algoritmo para que me haga habitaciones mas pequeñas.
Entonces para que se entienda correctamente:

image.png

Primer paso correr el algoritmo.

image.png

Segundo paso achicar las habitaciones y como pueden ver ya se crea el pasillo.

image.png

Tercer paso volver a correr el algoritmo y que genere habitaciones mas pequeñas en las habitaciones creadas previamente.

image.png

En Unity

Ya teniendo esto hecho me faltaba generar las puertas por lo que seleccionaba un lugar al azar en cada pared para reemplazar ese pared por una puerta generando el siguiente resultado

image.png

Ya se que se ven feas pero cabe aclarar que no es el modelo definitivo Jeje

Esto fue lo que estuve trabajando hasta ahora!

Esta semana empezamos con los muebles y decoraciones que va a tener la casa en cada habitación! Para ello voy a hace una investigación a ver como podemos hacerlo! Además voy a estar refactorizando el código.
Hasta el lunes que viene!

untitled.gif

English Version

Hey guys! how are you? third devlog of this game for which I'm very excited because I'm loving how it's coming out, I'm learning a lot of things and I'm sharing all this process with you!
As in the previous posts I'm going to make a summary of the idea of the game and what we've been working on during these first weeks of development.
This is going to be a very tense horror game whose story is based on the fact that a millionaire who turned out to be a psychopath kidnapped you and locked you in his mansion but you managed to escape and before leaving his house you want to steal as much treasure as you can. But the psychopath knows that you escaped and he will be after you.
In the first devlog we worked on the basic mechanics of the character and we also chose which algorithm we were going to use to make the mansion where the gameplay of the game is going to be randomly generated in order to avoid it being repetitive and to make it feel different every time you play.
In the second devlog you could already see the progress of the implementation of the algorithm where we created rooms, walls and floors of the house.

This week we had to work on the doors and corridors of the house which is what I am going to show you next!

To begin with I must say that it cost me much more than I thought to do this since my first idea was more difficult than I expected.
The idea was to generate the corridors of the house with an algorithm widely used in Unity and especially for artificial intelligences called A*(A Star) which through nodes placed in the game chooses the most optimal way to get from point A to point B.

image.png

For example in this image each green point would be a node and the algorithm A* would use them to generate that red path between point A to point B.

When using this algorithm I realized that I was going to have two problems:

  1. The corridor was going to be from A to B and it was not going to have any more branches. This could be solved because we could use the algorithm several times to make several corridors.
  2. But the most complex problem was that once the path was chosen, it was very complicated to use that path because, as in the image below, I would have to take out "portions" of space to the rooms which complicated things a lot.

image.png

So I preferred to use another idea that was simpler, run the room generation algorithm to generate large spaces, shrink those spaces to leave the place of the corridor and then in those spaces of "rooms" that I generated to use the algorithm again to make me smaller rooms.
So to be understood correctly:

image.png

First step run the algorithm.

image.png

Second step shrink the rooms and as you can see the corridor is already created.

image.png

Third step run the algorithm again and have it generate smaller rooms in the previously created rooms.

image.png

In Unity

Now that this was done I needed to generate the doors so I selected a random place on each wall to replace that wall with a door generating the following result

image.png

I know they look ugly but it should be clarified that it is not the final model Hehe

This is what I've been working on so far!

This week we start with the furniture and decorations that the house will have in each room! For that I'm going to do some research to see how we can do it! I will also be refactoring the code.
See you next Monday!

untitled.gif



0
0
0.000
1 comments
avatar

Congratulations @rama142694! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 10 HP as payout for your posts, comments and curation.
Your next payout target is 50 HP.
The unit is Hive Power equivalent because post and comment rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out the last post from @hivebuzz:

New badge - LEO Power Up Day - September 15, 2022
HiveFest⁷ badges available at the HiveBuzz store
HiveFest⁷ meetup in Amsterdam is next week. Be part of it and get your badge.
Support the HiveBuzz project. Vote for our proposal!
0
0
0.000