Wednesday, November 16, 2011

Programming: Collision detection


English

In this post I'm going to explain how we are going to manage the collision detection in Unity. Even being a 2D game, I decided to use the 3D tools that Unity offers. The map is composed by tiles, and in the map editor I choose which ones will be an obstacle and which not. For those which are obstacles I instantiate a Box with a Box Collider attached to it. Then, I attach a Character Controller to the player, which manages the collisions with all the Colliders in the scene. Via scripting I choose how to move that Character Controler so, internally, it checks for collisions and allow or not the movements. Video below.

Spanish

En este post voy a explicar como vamos a controlar la detección de colisiones en Unity. Aun siendo un juego en 2D, he decidido usar las herramientas 3D que ofrece Unity. Cada mapa está compuesto por una serie de tiles o cuadraditos, y en el editor de mapas elijo cuales de ellos van a ser un obstáculo y cuales no. Para aquellos que son obstáculos instancio un Box con un Box Collider. Luego, le asigno un Character Controller al jugador, que gestiona las colisiones con todos los Colliders de la escena. A través de scripting decido como mover este Character Controller e, internamente, mira si hay colisiones y permite o no el movimiento.






Obviously, In the end these white blocks won't be shown :)
Obviamente, los cuadrados blancos no se verán en el juego :)

Sunday, November 13, 2011

Be God: Our map editor

English

We’ve made a video to show you our progress. Here is our map editor. Enjoy it!

Spanish

Hemos hecho un video para que podáis ver nuestros avances. Aquí tenéis nuestro editor de mapas.


Friday, November 11, 2011

Be God: An aleatory game (Part 1)

English


As we said in our last post, we want an aleatory game, where every play is different from each other.
The first step to achieve this, is generate an aleatory way to the end of each floor. The purpose of the game is to reach the top of the Olympus, so the game is divided in several floors. The player needs to finish some stuff in each floor in order to go to the next one. The paths in this floors are generate automatically. Let me explain. Each floor is composed by several interconnected rooms. These are always the same rooms but, in each play, the game will generate a random path between them, with aleatory ramifications. That means that it’s very difficult to play the same floor twice. In addition to this, there are several starting rooms, so the path will be generated from different locations in the map each time.

Every floor will have a boss room, which is the connection with the upper floor. If the player finds this room early, is his own decision to kill the boss and go to the next step, or explore the other rooms looking for some interesting rewards.

Stay tuned!

----------------------


Spanish


Como dijimos en nuestro último post, queremos un juego aleatorio, donde cada partida es diferente a la anterior.
El primer paso para lograr este objetivo, es generando un camino aleatorio hasta el final de cada piso. El objetivo del juego es llegar a la cima del Olimpo, por lo que el juego está dividido en varios pisos o plantas. El jugador tiene que terminar algunas cosas en cada planta para poder pasar a la siguiente. Como hemos dicho, los caminos se generan automáticamente. Me explico. Cada planta está compuesta por varias habitaciones intercomunicadas. Estas son siempre las mismas habitaciones, pero en cada partida, el juego generará al azar un camino entre ellas, con varias ramificaciones aleatorias. Eso significa que es muy difícil jugar el mismo piso dos veces. Además, hay varias salas de inicio de partida, por lo que la ruta de acceso será generada a partir de diferentes lugares en el mapa cada vez.

Cada planta tendrá una habitación con un jefe final. Esta habitación será la conexión con el nivel superior. Si el jugador encuentra la habitación del jefe demasiado pronto, será decisión suya si matar al jefe y pasar al siguiente piso, o esperar y explorar las otras habitaciones disponibles en busca de recompensas interesantes.
Estad atentos!