domingo, 27 de marzo de 2016

Mini-juegos terminados! | Mini-games finished!

Español | English

Luego de tanta tarea y tanto estudio pude volver a trabajar en mi juego para continuar donde había dejado antes, en los mini-juegos. El problema que tenía que resolver era sobre buscar una forma de que las opciones en los mini-juegos de preguntas y respuestas tomen lugares aleatorios cada vez que se cargaba una nueva pregunta.

Uno puede pensar que esto es sencillo ya que le debemos decir al juego que agarre cualquier elemento de la lista de opciones utilizando la herramienta Random.Range(), lo cual es casi acertado ya que hay una sutileza, si utilizamos esta herramienta en el Update() del juego, va a realizarse todo el tiempo. El efecto que crea es que, cuando se carga una pregunta, las opciones se estén cambiando constantemente.

Luego de mucho pensar sobre esto, encontré una sencilla solución que era restringir la función para que ocurra una sola vez, entonces al cargar una pregunta, la función agarra cualquier elemento de la lista de opciones y se lo asigna a un botón, una vez que ya le asignó a todos los botones, se detiene.

Pero esto trae nuevos problemas: ¿Qué pasa si justo se elige el mismo elemento para 2 botones distintos? Como la función es aleatoria, esta probabilidad era bastante grande, por lo que tuve que crear una función que analice si la opción que tiene el botón es única, si es repetida, que la opción se genere de nuevo.

Con esto ya todo solucionado pudimos terminar este inconveniente pero nos quedaba la última complicación, las preguntas se podían repetir. Al igual que con las opciones, las preguntas son elegidas aleatoriamente de una lista de preguntas. Para solucionar esto lo que hice fue crear un listado, en el cual iba a contener como elementos las preguntas que ya se hicieron, de este modo, al generar una nueva pregunta, primero debe analizar la lista para ver si la pregunta no se hizo antes, en el caso de que ya se haya hecho, se genera una nueva pregunta.

De este modo entonces se resolvieron todas las problemáticas que surgían con los mini-juegos, que eran principalmente dadas por utilizar métodos aleatorios para seleccionar los elementos. Lo único que quedaría por mejorar sería la transición de una pregunta a otra, aunque para esto se puede crear un cartel que diga "Correcto" cuando uno acierta, mientras, en el fondo, se genera la nueva pregunta. 

Ya que tengo los mini-juegos creados, una de mis próximas entradas será una guía técnica sobre como crear un tipo de mini-juego en Unity con todas las mejoras y "trucos" que conté en esta entrada.

-L

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

English


Finally, after a lot of homework and after studying, I could came back to work on my game to continue from where I left it, the mini-games. The problem that I had to solve was about finding a way in which the options of the quiz mini-games take random places whenever a new question was loaded.

One can think that this is simple as we can tell the game to grab any element from the options list using the Random.Range() tool, which is almost true but there is one little problem, when we use this tool on the Update() function of the game, it is going to be done all the time. This creates the effect that, when a question is loaded, the options are constantly changing.

After giving it a lot of though, I found a simple solution which is restricting the function so it is done only once, so, when the question is loaded, the function will grab a random element from the options list and assign it to each button, once every button has its own option, its stops.

But this brings new problems as: What if the same element is chosen for two different buttons? As the function is random, it is very probable that this could happen, so I had to create a function that analyzes each if  each button's option is unique, if it is not, make that option to be generated again.

With all this solved, there was one last problem, the questions can be asked twice. As with the options, the questions are picked randomly from a list of questions. To solve this, what I did was to create a new list, on which, each element are the questions that were already made, this way, when generating a new question, it first needs to analyze if the question wasn't ask before, if that is the case, a new question will be generated.

By these means, all the problems that came with the mini-games are solved, which were mainly caused by using random methods to select the questions and answers. The only thing that could be done better is the transition from one question to the new one, which for this I could use a message that says "Correct" one the player when one succeeds, meanwhile, in the background, a new question is generated.

As I have all the mini-games created, one of my next entries is going to be a technical guide teaching how to create quiz mini-game in Unity with all these fixes and "tricks" I've mentioned.

-L

domingo, 20 de marzo de 2016

Al fin de vuelta a trabajar! | Finally back to work!

Español | English

Finalmente pude crear un hueco en el que pude trabajar en mi proyecto, decidí enfocarme en solo 1 aspecto para resolver ya que tengo que seguir estudiando, por lo que elegí arreglar la aleatoriedad de las opciones que se muestran en los mini-juegos.

El problema: Ya hablado varias veces, el problema era que siempre se mostraban las mismas respuestas en los mismos lugares. Lo que quería hacer era modificar la función que asigna las posiciones para que cada opción sea única, pero esto no era posible (o no he encontrado la forma) ya que se trataba de un ciclo For, por lo que no podía tratar a las opciones por separado sino que todas juntas.

La mejor opción que se me ocurrió (que era la solución que esperaba evadir) fue de crear una función que evalúe a cada opción, en caso de que la opción A sea igual a la opción B, que la opción A se genere devuelta y así para todas las opciones.

No quería utilizar este método ya que tanto escribirlo y como procesarlo es largo, ya que son varias estructuras If, por lo que traté de evadirlo lo más que pude pero al final resultó ser el método más efectivo para solucionar este problema. Ahora el resultado es como planeaba, las opciones se muestran en posiciones aleatorias cada vez que se abre el mini-juego.

-L

---------------------------------------------------------------------------------------
English

Finally I could create a gap where I could work on my project, I decided to focus in only 1 aspect to solve as I have to keep on studying, so I decided to fix the randomness of the displayed options of the mini-games.

The problem: As I've mentioned several times , the problem was that the same options were displayed on the same positions. What I wanted to do was to modify the function that assigns the positions to each option so each option is unique, but I this wan't posible (or I hadn't find the way) as I was dealing with a For function, so I couldn't treat the options separately but all together.

The best option that ocurred to me (which I was trying to avoid) was to create a function that evaluates each position, in case that option A is the same as option B, option A will be generated again and so on for every option.

I didn't want to use this method because both writing it and process it is long, as they are several If structures, that's why I tried to avoid it the most I could but it in the end it turn out to be the most effective method to solve this problem. Now the result is what I've planned, the options are shown in random positions every time the mini-game is started.

-L

sábado, 19 de marzo de 2016

Ocupadísimo | Very busy

Español | English


Primero que todo pido perdón por no haber escrito nada desde hace ya varios días, el motivo es que estoy sobre-cargado con tarea de la facultad que debo priorizar antes que el juego.

Por suerte estoy cerca de terminarla y si todo sale acorde lo planeado, mañana podré dedicarle tiempo a mi juego para arreglar las cosas de las que mencioné en mis ultimas entradas.

Parte del tiempo de desarrollo que había planeado, lo había pensado que cosas como estas podían pasar, por eso había planeado un lapso de 3 meses, de los cuales, contando días de desarrollo, el juego tuvo un poco más de dos semanas, por lo que vamos bien encaminados.

Hay que recordar también que las cosas que nos faltan no son muchas! Como hablé en la entrada anterior, falta corregir y agregar un par de cosas para tener todos los elementos, una vez que estén todos, quedaría darle la forma final al juego y crear todo le arte.

Pero por ahora, de vuelta con el estudio para poder seguir con mis planes y mañana poder seguir trabajando en mi proyecto.

-L

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

English
 
 
First of all I apologize for not writing anything from several days ago, the reason is that I'm overloaded with homework of the University which I must to prioritize before the game.
 
Luckily I'm close to finish it and I everything goes as planned, tomorrow I'll be able to dedicate some time to the game and fix all those things I've mentioned on the previous entries.

Part of the development time I've chosen, I've chosen it knowing things like this might happen. That's why I've chosen a time lapse of 3 months, from which, counting development days, the game has a little more than two weeks, which means we are ok.

What we need to remember si that there are few things remaining! As I've mentioned on the previous entry, I need to fix and add some few things to have all the needed elements and when they are all set, all we need is to shape everything and start creating the art.

But for now, I go back to study so I can keep up with my plans and tomorrow be able to get back on my project.

-L

miércoles, 16 de marzo de 2016

Análisis de Sistema de puntuación para Nerdy Run | Nerdy Run score system analysis

Español | English



Como hoy tampoco pude dedicarme a trabajar en mi juego, me tomo el tiempo para planear las cosas que voy a hacer o analizar los hechos para aprovechar el tiempo. Un tema que puede ser un poco discutible sería sobre que sistema de puntuación usar.

Esto depende totalmente del juego, para mi anterior, lo que se me ocurrió fue utilizar la distancia en X que el jugador recorrió para medir la puntuación, que llevó a que el objetivo del juego no sea juntar mayor cantidad de puntos posibles sino recorrer la mayor distancia posible. En otros tipos de juegos podemos utilizar el tiempo o directamente crear objetos o acciones que nos den puntos y en base a cuantos objetos recolectamos, depende nuestra puntuación.

El juego va contener varios elementos de distintos tipos de juegos, tenemos el Infinite Runner, tenemos objetos que podemos agarra para acumular puntos y tenemos los mini-juegos. Aunque como hablé antes, los mini-juegos puede estar para limitar nuestro avance, haciendo que el jugador pierda si pierde un mini-juego. Pero dado todos estos distintos tipos de elementos tenemos que elegir por un sistema que nos permita puntuar al jugador de una manera lógica, tampoco queremos que el jugador por pisar una piedra gane +1000 puntos.

Lo que se podría hacer entonces es de nuevo tomar la distancia en X recorrida por el jugador pero a esta, modificarla. Podríamos hacer algo como distancia * Time.deltaTime , lo que va a reducir el valor total de la distancia a valores más pequeños de 100, que luego se pueden sumar con otros puntos que obtengamos al agarrar objetos.

También podemos tomar otra perspectiva y no hacer que el jugador gane puntos a medida que avanza sino a medida que agarra cierto objetos y/o cuando el jugador gana un mini-juegos. Lo que no me gusta mucho de este tipo de puntuación es que la puntuación es lineal, refiriéndome a que da "saltos", de la anterior manera, utilizando la distancia recorrida, la puntuación varía constantemente.

Teniendo estas dos posibilidades (hay mas posibilidades, pero estas dos son las que más me agradan para mi juego), queda por analizar haciendo pruebas, viendo si utilizando la distancia nos da valores no muy altos ya que no queremos una "inflación" de puntos, haciendo que en una partida promedio el jugador gane más de 10.000 puntos. Por lo que un par de pruebas con los dos sistemas resolverían este debate, aunque mi apuesta iría hacia utilizar la distancia recorrida ya que, como dije antes, el valor de la puntuación varía constantemente en vez de en forma lineal.

-L

-------------------------------------------------------------------------
English



As today I couldn't dedicate any time to the game, I take this time to plan the things I'm going to do in order to save time. A topic that can be a little bit arguable is which scoring system should the game use.

It always depends on the game, on my last game, what I decided to do was to use the reached distance of the player along the X axis to measure the score, which led the objective of the game from being to collect the highest amount of points available towards reach as far as you can. In other type of games we can use the time or just using objects or actions which will gave the player points and depending on how many objects we collect, we get our score.

The game will contain many elements which belong to different types of games, we have the Infinite Runner, we have objects to grab and add points and we have the mini-games. Although as I spoke before, the mini-games may be only to limit how much we are going to advance, making the player loses if he/she loses the mini-game. But for all those elements, we need to find a common system which let us give logical scores, we don't want the player to score +1000 for stepping on a rock.

What I can do is to use again the distance travelled along the X axis and modify it. We can make something like distance * Time.deltaTime, which will reduce the total value of the distance to values smaller than 100, which I can then use to add more points with the objects we grab.

We can also take another perspective and don't make the player earn points as long as he/she advances but if he/she grabs certain objects and/or when he/she wins the mini-games. What I don't like too much about this scoring system is that the score is lineal, meaning that it leaps, with the previous way, using the travelled distance, the score varies constantly.

Having these two alternatives (there are more possibilities but these were the those which I though were more suitable for the game), all that it's left is to make some tests, to see if using the travelled dinstance gives us values not too high as we don't want a score "inflation", meaning that we can't make the player earn 10.000 on an avarage game. For which some tests with each system will solve this debate, although if I would bet, I would bet on the travelled distance method because, as I said, the value of the score varies constantly rather than in a lineal way.

-L

martes, 15 de marzo de 2016

Explicando problemas de aleatoridad en Nerdy Run | Explaining problems with the random factor on Nerdy Run

Español | English

Hoy ya que no pude trabajar en el juego, dedico esta entrada para explicar con más detalle el problema que tengo y en el cual me había trabado. Se trata sobre la aleatoriedad de las preguntas en los mini-juegos de preguntas y respuestas. Estoy cerca de crear el tan prometido tutorial de como crear el mini-juego de preguntas y respuestas pero para eso primero quiero resolver esta problemática que se puede evitar fácilmente o no dependiendo el caso.

Lo que tenemos es obviamente una cantidad de preguntas, cada una con sus respuestas y la función que llama a las preguntas. Esta función debe ser aleatoria (a menos que se busque un patrón específico de preguntas) ya que en este tipo de juegos siempre vamos a querer preguntas nuevas para el jugador.

Lo peor que nos puede pasar (que es la situación en la que me encuentro yo) es que una pregunta se muestre dos veces seguidas, "regalandole" un punto extra al jugador. O también, que las respuestas estén siempre en el mismo orden, ya he hablado de como afecta esto, si las preguntas son siempre las mismas y sus respuestas están siempre en el mismo orden, el juego se convierte en un juego de memoria.

Pero como mencioné antes, esto puede no ser un inconveniente si contamos con una gran cantidad de preguntas, haciendo que la cantidad sea tan grande que la posibilidad de que se repita una pregunta sea muy poca. Hacer esto requiere tanto a pequeña como a gran escala una gran necesidad de almacenamiento en donde guardamos estas preguntas y sus respuestas. Si bien me pueden argumentar que a pequeña escala se pueden usar grandes variables de tipo Array, esto también nos genera un aumento en el peso del archivo total, además la cuestión de si la lógica del juego es muy "larga" en el sentido de que debe checkiar si la respuesta es correcta dentro de (ej) mil respuestas, se va a crear una gran dependencia de procesamiento. 

Lo que veo más conveniente a pequeña escala es el uso de algún tipo de lógica matemática que reduzca las chances de que se repita una pregunta. Aunque pueda ser difícil de pensar, para un mini-juego de aproximadamente cinco preguntas es una solución muy viable. Todo esta dificultad surge por el hecho de que no tenemos control sobre la aleatoriedad de la función cuando le decimos al juego "elegí una pregunta de entre estas 5". Tanto la rotación de las preguntas como de sus respuestas son una gran característica que disminuye la repetitividad de un juego.

-L

----------------------------------------------------------------------------------
English


As today I couldn't work on the game, I dedicate this entry to explain with more detail the problem that I'm having and where I got stuck. It's about the random factor in the quiz mini-games.n I'm close to write the much promised tutorial of how to make a quiz game, but first I need to solve this problem which can be easily avoided or not, depending the case.

What we have obviously is a set of questions, each one with it's possible answers and the function that calls the questions. This function needs to be random (unless what I'm looking for is to create a certain pattern) as for this type of game we will always want new questions for the player.

The worst thing that can happen to us (the situation where I'm currently at), is that the same question is shown twice, giving away an extra point for the player. Or also, having the answers always be shown in the same position, I've spoken about how this is bad before, if the questions are always the same and the answers are on the same position every time, the game beomes a memory game.

But as I mentioned before, this shouldn't be a problem if we rely on a big quantity of questions, making the database so big that the chance for a question to repeat itself. Doing this requires both for  big or small scale a high need of memory, where we will store the questions and their answers. Although one can argue with me and tell me that we can use huge Array type variables, which they will also make a remarkable incraese on the APK's file size. Also, if the logic that the game uses is too "long", as to make the game check the answer between a thousand possible solutions, it will create a big need of the processor.

What I think it's more suitable for small scale is to create some sort of mathematical logic which will reduce the chances of making a question repeat. Although it could be hard to think of, for a small quiz mini-game of about five questions, it's a very suitable option. All this difficulty comes from the fact that we don't have control over the game random decision as we are telling the game "choose one question between these five". Both the rotation of the questions as the rotation of the answers are a big characteristic that reduces the fact of repetitivity of a game.

-L

lunes, 14 de marzo de 2016

Mejorando la ficha de Play Store de Infinite Squared Run | Upgrading Play Store page of Infinite Squared Run

Español | English

La entrada de hoy no va a ser sobre Nerdy Run sino de mi anterior juego, Infinite Squared Run, el cual tiene una característica particular que me preocupa. Ya hablé en la entrada anterior sobre una actividad medio "extraña".

Lo que ocurre es que utilizando la plataforma de publicidad cruzada Tappx, veo que algunas personas clickean en mi publicidad, hacia mi juego, pero no veo modificado le número de descargas en mi juego, lo que me hace pensar dos cosas:

  • A la gente no le gustó el juego desde Play Store
  • Hay desarrolladores que clickean en publicidades para ganar más créditos de Tappx.
Siguiendo la teoría de que lo segundo si bien es posible es poco probable, voy a centrarme en la problemática de que a la gente no le gusta el juego "en vidriera", el factor que más presente esta en la ficha de Play Store son las imágenes, además de la descripción que casi nadie la lee, y de esos que la leen, muchos menos la leen hasta el final.

Por lo cual podemos concluir que las imágenes son las que están afectando de forma negativa a los posibles futuros usuarios, también podemos pensar en factores como el peso del juego. Si bien es cierto que el juego es relativamente pesado, no hay mucho más que pueda modificar para variar esto.

Entonces lo que tengo que hacer es crear nuevas imágenes del juego o modificarlas, una opción que se me ocurrió fue crear como unas "cintas" que pueden contener frases como "Adictivo!" o "Imperdible", para enfatizar esos aspectos hacia el subconsciente del jugador. 

-L 


-------------------------------------------------------------------------------------------
English

Today's entry won't be about Nerdy Run but of my previous game, Infinite Squared Run, the game has a particular characteristic that I don't like. I've spoke about it on the last entry, about a weird situation.

What is going on is that with the cross promotion platform that I'm using, I have some people who click on my ad, they go to my game but I don't see the download numbers increase, which makes me thing in two causes:

  • People don't like the game from the Play Store.
  • There are some devs who click on the ads to earn credist for Tappx.
Following the theory that the second casue, although it is possible its very unlikely, I'm going to focus on the problem that people don't like the game "on the store", the most present factors on the Play Store page are the images, besides the description which almost no one read and from those who read it, even fewer read it to the end.

For which we can conclude that the images are what are affecting on a negative way the possible future players, we can also think as a factor the apk size. Although it's true that the game is relatively heavy, there is very little I can do to change this.

So, what I need to do is to create new images for the game of modify the existing ones, one thing that came to my mind was to create "stripes" which could contain texts like "Addictive" or "You can't miss it", to emphasize this aspects to the player's subconscious.

-L

domingo, 13 de marzo de 2016

Día 13 de Nerdy Run - Arreglando errores de los mini-juegos | Day 13 of Nerdy Run! - Fixing bugs of the mini-games

Español | English

Día 13. Justo cuando quería comenzar a agregar cosas nuevas, decidí probar el juego y me di cuenta de que había un par de cosas que no funcionaban muy bien con los mini-juegos, específicamente con el de química y el de matemática que funcionan con la misma lógica.

El problema que tienen es sobre el contador de vidas que no funcionaba muy bien el hecho de que se puede repetir la misma pregunta seguida, cosa que no queremos. Lo primero es fácil de solucionar, lo segundo es más rebuscado ya que la función en sí es aleatoria, por lo que no puedo controlar directamente sino que tendré que buscar una manera de evitar que se pregunte la misma pregunta dos veces seguidas.

Después de eso tendré que seguir agregando los objetos que vamos a tener que agarrar o evadir. Programando como nos van a afectar al jugador o como nos pueden ayudar para los mini-juegos. Lo que si me entusiasma es que luego de esta parte y de darle forma final a todo, viene la parte de crear todos los sprites que voy a utilizar.

Por otra parte, sigo teniendo buenos resultados con Tappx aunque tengo días en los que tengo algunos clicks hacia mi publicidad (digamos por ejemplo 3) pero ninguna descarga, esto significa que la persona apretó la publicidad y no le gustó el juego suficiente en la ficha de Play Store o que algún desarrollador puede estar clickeando otras publicidades para ganar Tappx. Si lo que ocurre es la primera situación, tengo que mejorar las fotos de la ficha de Play Store.

-L


--------------------------------------------------------------------------
English

Day 13. Just when I wanted to add new things, I decided to test the game and realized that there were some parts which didn't work well on the mini-games, specifically the chemistry and the math game, which work with the same logic.

The problem was on the lives counter which didn't work well and the fact that one question could come up again twice, a feature we don't want. The first one was easy to solve, the second thing is more complicated as the function itself is random, so I can't directly control, so I want to find another way to avoid making the same question twice.

After that I'll have to keep adding objects which the player will have to grab or avoid. Programming how those objects will affect the player or how they can help us on the mini-games. What I'm most excited about after this part and shaping everything is the part of creating all the sprites of the game.

Aside from that, I keep having good results with Tappx although I do have some days on which I get clicks towards my ad (lets say fas an example 3) but 0 downloads, this means that the person who clicked the ad didn't like that game's Play Store page enough or that there may be some devs who are clicking the ads to earn Tappx. If what its happening is the first situtation, I'll need to update the Play Store images.

-L

sábado, 12 de marzo de 2016

Nerdy Run Día 12 - Fijando nuevos objetivos | Nerdy Run Day 12 - Setting new objectives

Español | English

Primero antes que nada me disculpo por no haber escrito en la fecha de ayer (11/3/16) ya que no me sentía bien y decidí por no escribir una nueva entrada.

Día 12 de Nerdy Run! Ya para ahora tenemos los mini-juegos creados (más adelante explicaré con detalles más técnicos como crearlos), ahora lo que queda es ver con una perspectiva general el juego, tomando en cuenta los mini-juegos y el juego en sí me decidí como va a tomar su forma final.

En unas entradas atrás había comentado de que el juego podía ser una clásico Infinite Runner o que podría tomar otra forma dividido en niveles, pero en esta última forma, los niveles tanto el juego se volverían repetitivos por lo que decidí tomar un camino un aparte, voy a utilizar la misma mecánica que utiliza el juego de Leonardo DiCaprio persiguiendo el Oscar "Leo's Red Carpet Rampage" (http://redcarpetrampage.com/) que se volvió viral antes de los premios Oscar en donde el personaje debía correr para obtener un Oscar, pero al juego lo "interrumpían" los mini-juegos.

Por lo que a nuestro juego base (Infinite Runner) va a ser interrumpido cada tanto por los mini-juegos, que sumarán puntos, además de los puntos que podemos obtener de otras formas. Lo que se debe tener entonces es un límite a cuantos mini-juegos podemos perder, para esto vamos a tener que crear las vidas del jugador, al perder las 3 vidas el jugador pierde. Las vidas se pierden al perder los mini-juegos, aunque pueden pensarse otras formas en las que el jugador pueda perder vidas, o ganarlas.

Ya que definí que forma va a tener el juego, queda agregar estos nuevos detalles y crear las instancias que van a iniciar los mini-juegos, luego de eso quedaría arreglar errores en caso de que surjan y optimizar el código y por último, crear todo el arte del juego.

-L

-----------------------------------------------------------------------------------------------------
English
First of all I want to apalogize for not writing a new entry yesterday (11/3/16) because I didn't feel well so I decided to skip the entry.

Day 12 of Nerdy Run! Now that we have the mini-games created (later on I'll create mor technical detailed guides of how to create them), what is left is to look at the game from a general perspective, taking into acount the mini-games and the game itselft I decided which is going to be its final form.

On my previous entrys I've commented on how I could make a classic Infinite Runner game or that the game could be divided into levels, but with this last form, both the levels and the game would become repetitive, so I've decided to take a step aside and use the same mechanic that the game of Leonardo DiCapio chasing the Oscar "Leo's Red Carpet Rampage" has. (http://redcarpetrampage.com/) Which became viral before the Oscars were held, in the game, the character has to run to get an Oscar but the game is "interrupted" by the mini-games.

For which the base of the game (Infinite Runner) is going to be interrupted every now and then by the mini-games, which will add points, also the points can be obtained by other ways. What it needs to be established is a limit to how many times we can lose the mini-games. The lives will be decreased if we lose a mini-game, although there could be other ways on which they can decrease, or increase.

Now that I've decided the final form of the game, all that there is left is to create the new details and create the instances which will make the mini-games to initiate, after that, I'll have to fix the bugs if they appear, optimize the code and finally, create all the art of the game.

-L

jueves, 10 de marzo de 2016

Resultados de un Marketing con $0 de presupuesto - Marketing Report of a $0 budget

Español | English

Hoy me decidí por dar un informe de como resultó mi campaña de Marketing para el juego Infinite Squared Run para los cuales para su promoción utilice:

  • Promoción cruzada (Tappx).
  • Una reseña en un Blog de juegos para Android.
  • Difución hacia amigos y familiares.
  • Twitter

Los más efectivos luego de todos nuestros allegados logró ser Tappx y un Blog sobre Android (http://www.eljugondemovil.com/) que muy amablemente nos permite escribir una corta reseña de nuestro juego y ellos lo publican, creo que este fue el mejor método ya que las descargas aumentaron después de que el artículo fue publicado.

Eso sería si contamos el número de impacto, si analizamos el numero de "expansión" sin duda Tappx esta en la cima ya que se logró de mostrar un total de 6.650 impresiones con publicidad hacia nuestro juego, sin embargo no fue de gran impacto por (creo yo) el juego en sí. Si el juego fuera otro, sin duda este número de impresiones hubiera afectado en gran parte nuestras descargas. Pero yo quería ser sincero con el/la jugador/a, mostrar de que se trataba el juego, en el sentido de que soy consciente de que el diseño del logo puede no ser muy atractivo para varios de los usuarios.

Hace 13 días que se podría decir que empecé la campaña publicitaria, con Tappx, lo que tardó en dar efecto fue la reseña del blog, si bien la publican gratis, tardo casi un mes en publicarse, lo cual es bastante tiempo pero si recibí un aumento en las descargas. Después de tener la misma cantidad de descargas, durante una semana recibí un incremento de 5 personas aproximadamente que descargaron el juego.

Recordemos que le poco impacto que tiene el juego se relaciona directamente con la calidad de este, de la cual soy consciente, ya que fue mi primero juego, si tanto el diseño como la temática del juego fueran distintas, el impacto hubiera sido sería mayor.

Entonces, para los indies que buscan consejos para su Marketing sin tener que pagar nada les recomiendo:


  • Tappx, que es un servicio de promoción cruzada de la cual ya hablé en este blog anteriormente y hasta con unas entradas explicando como instalar.
  • Escribir en blogs y pedir reseñas. Esto es siempre un impacto positivo, ya que un título como "Nuevo juego adictivo" puede generarte 1 descarga más, hay que escribir a todos los blogs o páginas que hagan reseñas y pedirle que hagan una nuestra o hacer un artículo nosotros y pedir si nos la pueden publicar.
  • Twitter. Aprovechar al máximo esta herramienta social para llegar a la mayor cantidad de gente posible.
El mejor impacto directo se da por las reseñas ya que, como la otra forma de promoción es por publicidad, la gente tiende a evadirlas y tal vez hasta sin leerlas, por eso es importante crear imágenes que llamen la atención. Así también como seguir gente en Twitter, otros desarrolladores e indies y promocionar el juego con etiquetas como #gamedev para que otras personas vean y tengamos mayor alcance.

-L

---------------------------------------------------------------------
English


Today I've decided to give a report of how my Marketing campaign of the game Infinite Squared Run turned out, for which to promote the game I used:


  • Cross-promotion (Tappx)
  • A review on an Android-games blog
  • Outreach to friends and family
  • Twitter
The most effective after all our friends and family it turned out to be Tappx and the Blog about Android games (http://www.eljugondemovil.com/) which very kindly allowed us to write a short review of our game and they then publish it on their site, I think this was the best method as the downloads increased after the article was published.


That would be if we only take into account the impact, if we analize the number of "expansion", without any doub Tappx is at the top, as it has shown a total of 6.650 impressions of our ad, although it didn't have too much impact (in my opinion) because of the game itself. If we were talking about another game, the impact would have been clearly different, increasing the number of downloads. But I wanted to be honest with the player, show the game as it is, in the way that I'm aware that the game design could not be too attractive for the users.

It can be said that the publicitary campaign started 13 days ago, when I started using Tapps, what it did took a long time to make effect was the game review, which although they publish it for free, it took over a month to be published, which is a long time but I did get an increase in the number of downloads. After having for a while the same amount of downloads, there was a week on which the downloads increased by 5.

Lets remember that the little impact that we have is related to the quality of the game, which I'm aware, as it was my first game, if the design and the theme were different, the impact would have been better.

So, for the indies who want good advice for her/his Marketing campaign without having to pay anything I recommend:

  • Tappx, which is a cross-promotion service which I've mentioned a lot on this blog previously and also left some entries telling how to install it.
  • Writing on blogs. This always has a bigger positive impact, as a title like "New Addicting Game"can generate 1 new install, you need to write on every blog or sites where they review games to ask them if they can review your game or if they can publish an article you have written.
  • Twitter. Take the most advantage of this social tool to reach the higher amount of people you can.
The most impact will be from the reviews, as the other way of promotion is advertising, which people try to avoid and may be not even read them, that's why it's important to create images that can call the atention. As also follow a lot of people on Twitter, other devs and indies and promote the game with tags like #gamedev so other people can see them and have bigger impact.

-L

miércoles, 9 de marzo de 2016

Nerdy Run Día 11 - Terminando los mini-juegos | Nerdy Run Day 11 - Finishing the mini-games

Español - English

Día 11. Esta va a ser una entrada corta ya que no tuve mucho tiempo para programar hoy debido a la facultad (estoy estudiando Ingeniería Informática), que me deja cansado y casi sin tiempo para dedicarle el tiempo que quiero del todo al juego.

Así que lo que voy a terminar de hacer es terminado los contadores del mini-juego. Ya había hablado de esto antes, la idea es que si el jugador responde bien tres preguntas, gana el mini-juego.  Por lo que para esto debemos crear 3 imágenes ( o utilizar la misma imagen 3 veces) que van a ser las "vidas", al principio van a estar todas activas.

Por lo que vamos a tener dos contadores, un contador se ocupa de cuantas preguntas se hicieron mientras que otro se encarga de cuantas preguntas erraste, para esto podemos hacer que al responder mal una pregunta, una de las 3 imágenes que representan una vida se desactiven, dejando a las otras 2 en su lugar e indicando la cantidad de vidas que le queda al jugador.

De esta manera podemos variar la forma en la que el jugador gana, si debe hacer 3 preguntas seguidas correctas o responder todas las que pueda antes de que se acaben la vida, etc. Lo que yo preferiría es utilizar lo habitual e ir con 3 preguntas y que el jugador acierte.

El contador también nos sirve para saber cuando desactivar el juego, luego de X preguntas u otro método por el cual el jugador gana o pierde, debemos desactivar el juego. Recordemos que esta es la mejor manera, desactivando y activando, no destruyendo el juego y creándolo cuando lo necesitemos porque si el mini-juego contiene varios elementos, al crearlo, puede generar una caída importante de fps.

-L


------------------------------------------------------------------------
English


Day 11. Today is going to be a short entry as I didn't have much time to program today because of homework (I'm studying Computer Engineer), which makes me tired and with a short time to dedicate to my game.

So I'm going to finish the counters of the mini-game. As I've said before, the idea if the player answers 3 times correctly, he/she wins the mini-game. So for this we need to create 3 images (or using the same image 3 times) which are going to be the "lives", which at the beggining, they are going to be all active.

So we are going to have two counters, a counter that manages the number of questions that were made and another one that will count how many you missed, for this what we can do is to make an image representing a life disappear if the player answers wrong, leaving the other 2 lives to indicate the player how many he/she has left.

This way we can also vary in the way the player wins the mini-game, if he/she needs to answer 3 times right or answer right until he run out of lives, etc. Whay I prefer is to make the classic way and go with the 3 questions and make the player answer correctly.

The counter also is useful to know when to deactive the game, after X questions or other method on which the player wins/loses, we need to deactivate the game. Remember that this is the best way, activating and deactivating, not destroying the elements and creating them again when we need them because if the mini-game has too many elements, at the moment of being created, it can generate an important drop of fps.

martes, 8 de marzo de 2016

Nerdy Run Día 10 - Mini-juego de química terminado | Nerdy Run Day 10 - Chemical mini-game finished

Español | English


Por fin pude resolver el inconveniente con el mini-juego de química ( que también era inconveniente para el mini-juego de matemática). Se trataba sobre no poder checkiar bien si el texto que tiene el botón con la opción es correcto o no.

El error fue porque quería mantener todo junto y en lo posible, en un solo script. Por lo que hacer esto complicaba la comunicación con los botones y con los textos de estos botones, que son elementos hijos. No podía encontrar una solución para generalizar los cuatro botones en un solo script, ya que para verificar los textos utilizaba un ciclo For, lo que hacía que la verificación de verdadero siempre.

Si utilizamos un ciclo For y decimos que para cada botón buscamos aquel que cuyo texto sea el que queremos, siempre lo vamos a encontrar, por lo que no importa que botón se presione, siempre esta aquel botón con la opción correcta. Debía hallar un método para independizar cada botón por separado para que cada botón haga su propia evaluación.

Para esto tuve que crear un script aparte que iba a contener el evento de click de cada botón, era necesario hacerlo en un script distinto ya que la idea era añadir el script a cada botón y referirme a el texto de ese botón, como cada botón tenía el script, cada uno hace referencia al botón que el tiene y no al de los otros.

De esta forma pude hacer que cada botón referencia a su texto y que este pueda checkiar si contiene la solución. Lo que falta es hacer un contador de "vidas" y un contador de "correctos" para que el jugador al acertar 3 preguntas bien, pueda ganar el mini-juego. Por último, lo único que queda sería desactivar el mini-juego y dejarlo listo para que pueda ser activado.

-L

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

English

Finally I could solve the problem with the chemistry mini-game (which was also the problem with the math mini-game). It as about not being able to check if the text of each button is the correct option or not.

The mistake was because I wanted to do everything together and if possible, in only one script. But doing this in this way created complications between the buttons and the buttons' texts, which they are child elements of the button. I couldn't find the solution to generalize the four buttons in only one script, because I used a For cycle, which made the verification always true.

If we use a For cycle and look on every button the one that has the text that we want, we will always find it, because it doesn't matter which button I click, the button with the correct option will be there. I needed to find a method to separate each button and make it run its own evaluation.

For this I had to create a separate script which was going to have the click event of every button, it was necessary to create a new script as the idea was to add the script to each button and refer to the text of that button, as every button had the script, each one makes reference to its own text.

This way I could make each button reference its own text and to make it able to check if it has the right answer. What it needs to be done is to create a "life" counter and a "right" counter so if the player answers 3 times well, he/she wins the mini-game. Finally, the last thing would be to desactive the mini-game and prepare it so it could be later on activated on the game.

-L

lunes, 7 de marzo de 2016

Nerdy Run Día 9 - Creando el último mini-juego | Nerdy Run Day 9 - Creating the last mini-game

Español | English


Si bien no terminé de crear el anterior mini-juego para hoy, les traigo a cambio el último mini-juego que es un juego de matemáticas en donde aparece una operación y tenemos que poner el resultado. También lo puedo variar para ser parecido al de química, en donde tengo 4 botones con una resultado cada uno y debo clickear el botón correcto.

Los elementos del juego entonces son: 4 textos, uno indicando el título, otro con el símbolo de la operación (que por ahora solo serán sumas) y los últimos dos textos corresponden a los números en cuestión que van a ser aleatorios. Después tengo una entrada de texto en donde el usuario pone el resultado o en caso de variar, botones en donde el jugador debe clickear en la opción correcta.

El problema de utilizar la entrada de texto es que la entrada se guarda como una línea de texto, no como un número, por lo que no puedo realizar operaciones con esta y es una gran desventaja. En caso de querer utilizar la opción de los botones, debería resolver el mismo problema con el que me trabé haciendo el mini-juego de química, como indicarle al botón que su texto es el correcto.

En caso de que pueda resolver este caso optaría por esta opción ya que también sería más cómoda para el jugador ya que tiene que clickear, no tiene que abrir el teclado de afuera del juego, introducir los números bien y recién ahí poder checkear y todo esto obviamente durante un lapso de tiempo relativamente corto ya que no queremos darle tiempo al jugador de salir de la aplicación, abrir la calculadora y volver con el resultado.

Por lo que esto es lo que tengo hasta ahora:


Debido a que tengo varias complicaciones utilizando el tema de entrada de texto, tal vez convendría mejor utilizar la idea de química y poner botones, por lo que, debo resolver el conflicto que tenía para poder terminar estos dos últimos juegos y poder avanzar con el juego en general.

-L

----------------------------------------------------------------------------------
English


Although I didn't finish my last mini-game for today, I bring in exchange, the last mini-game which is a math game on which there numbers and a operation is shown and we have to input the result. I can also vary and make it like the chemistry game, where I put 4 buttons with a result on each one and one must choose the right button to click.

The elements of the game are: 4 text, 1 indicating the title, another one which the symbol of the operation (which for now it will only be adding numbers) and the last 2 text correspond to the random numbers on which we are going to operate. Also there is a text input where the user has to input the result or if I do it the other way, buttons where the player has to click the right choice.

The problem with using a text input is that the entry is stored as a string, not as a number, so I can't make any operations with it and this is a huge disadvantage. In case of using the buttons option, I should need to solve the same problem I had with the game of chemistry, how to make a button know it has the correct answer.

In case that I could solve that problem, I would choose the  button option as it is more confortable for the player as he/she just needs to click, he/she doesn't has to bring the keyboard from outside the game, introduce the numbers and then click to check the result and all this in a relative short period of time, as we don't want to give time for the player to open the calculator, do the math and come back with the result.

This is what I have now:



As I have more problems dealing with the input, it may be better if I choose the buttons option, so what I need to do next is to solve the conflict I had to finish this two games and be able to move forward with the game in general

-L

domingo, 6 de marzo de 2016

Nerdy Run Día 8 - Creando un mini-juego de Preguntas | Nerdy Run Day 8 - Creating a Quiz mini-game

Español | English

Día 8. Para hoy tenía planeado crear el 3° mini-juego que iba a ser una juego de preguntas y respuestas, con orientación a la química. El problema de este tipo de mini-juego no es crearlo en sí sino no hacerlo repetitivo. No queremos que se muestren siempre las mismas preguntas en el mismo orden sino el jugador no tiene que pensar sino recordar la secuencia de las respuestas.

Los elementos básicos del juego son: 4 botones y un texto. La idea del juego es que el texto muestre la palabra de un elemento químico y uno debe clickear en su símbolo correspondiente, luego se puede hacer algo como poner "vidas" en las que si el jugador erra, se restan. Pero de nuevo, lo importante es la aleatoriedad, queremos que se muestren preguntas distintas cada vez.

Para elegir los elementos elegí aquellos cuyos símbolos químicos se parecían a otros o podrían confundir al jugador. Como por ejemplo, para el Hierro (Iron en Inglés) el símbolo es Fe, pero para los que no lo conoce, se pueden confundir con Ir, el símbolo de Iridio. La idea también era de crear una lista de 5 elementos que serían las preguntas "fáciles", a medida que vamos avanzando podemos cambiar a las preguntas más "difíciles".

Para crear el juego primero creé 2 Array, una que contenía el nombre de los elementos y otra que contenía todos los símbolos que van a aparecer en pantalla (1 opción correcta y 3 falsas para cada elemento). El hecho de crear Arrays es para manejar más adecuadamente la cantidad de variables y también para poder mostrar la pregunta y sus opciones.

Para crear esta situación, primero debemos pensar como va a ser la lógica del juego: carga el juego, y depende la pregunta que nos dan, varían los distintas respuestas. Por lo que las respuestas dependen de que pregunta se haga. Esto nos permite entonces poder crear una declaración Switch en la que analizaremos que valor vuelve para si nosotros devolver las opciones adecuadas.




Lo último que me queda por terminar es el checkeo de la solución, es decir, si al clickear en una solución esta es correcta o errónea. Luego de terminar esto haré un tutorial sobre como crear este mini-juego de forma más técnica.

-L


------------------------------------------------------------------------------
English

Day 8. For today I've planned to create the 3° mini-game which is going to be a Quiz game, chemistry oriented. The problem with this kind of game isn't create it but to not make it repetitive. We don't want the same questions to be showned always in the same order because the player rather thank thinking, needs to memorize the sequence of the answers.

The basic elements of the game are: 4 buttons and one text. The idea of the game is that a text shows the name of a chemical element and one has to click on the element's symbol, then, one can add "lives" on which if the player fails, they began to disappear. But again, the important thing is the randomness, we want different questions every time.

To select which elements I would use I selected those elements whose chemical symbol is similar to others. For example, the symbol of element Iron is Fe, but for those who don't know this, they may be tricked with the symbol Ir, which is the symbol of Iridium. The idea is also to create a list of 5 elements which would be the "easy" questions, as the player goes on, we can use another list of more "difficult" elements.

For the game I created 2 Arrays, one contains the name of the elements and the other has all the symbols that would be displayed (1 correct answer and 3 fake answers for each element). The fact of creating the Arrays is to handle in the right way all the variables and also to later be able to display the question and it's options.

To create this situation, we first need to think in the logic of the game: load the game, according the element given, the options vary. So the options depend on which question is asked. This let us make a Switch Statement in which we will analyze which value we are given in order to show the right options.

 


Finally, what I need to finish the mini-game is to finish the check-answer function, in other words, to see if the option clicked is the right one. After finishing this mini-game I'll create a more technical tutorial to create this type of game.

-L

sábado, 5 de marzo de 2016

Nerdy Run Día 7 - 2° Mini-juego terminado! | Nerdy Run Day 7 - 2° Mini-game finished

Español | English

Segundo de cuatro mini-juegos creados. Este va a ser un mini-juego clásico muy popular que se trata de apretar los botones para llenar la barra. Cuando veía esto en un juego tenía una idea de como funcionaba, sabía que cada vez que pulsábamos en un botón, este incrementaba un valor y de lo que en realidad se trataba el juego era de que ese número "llegue" a 100 (o cualquier otro valor).

Lo que sí no sabía como funcionaba era el hecho de que si nosotros dejamos de pulsar en los botones, la barra caía, o en otras palabras, le número disminuía. Entonces estuve pensando: ¿Qué puede recrear este efecto de ir decreciendo el valor de la barra constantemente? y también, ¿Qué valor puedo utilizar que sean decimales? Por que en realidad no queremos que el jugador tenga que llegar hasta 100 subiendo de a 1 o de a 2, tampoco de a 10 porque sería tan fácil como clickear 10 veces.

También, el hecho de manejarse entre valores de 0 y 1 tiene que ver con la barra en sí, para crear la barra, utilicé una imagen (para los propósitos de prueba utilicé un cubo alargado) y lo que varía y donde se centra todo el juego es en su propiedad de "Fill Amount", para esto la imagen debe primero ser de tipo "Filled" con un estilo de Fill "Horizontal" que empiece desde la izquierda. Luego, debemos crear una variable que va a ser el valor que vamos a aumentar y disminuir.

Entonces, creamos la variable float energy_count con valor inicial 0 y acá algo importante, como vamos a estar disminuyendo este valor constantemente, no queremos que el valor sea negativo. Porque si el valor llegará digamos a -10 y el valor incrementa a 0.1, el jugador tendría que clickear demasiadas veces para que el contador vuelva a ser positivo, además de que el juego va a estar decreciendo el valor también. Por lo que vamos a poner en la función Start()
If(enery_count < 0){
 energy_count = 0;
De esta forma, marcamos el Dominio del contador para que sea desde 0 hasta infinito. Ahora, cada botón hace un sencillo "energy_count = energy count + 0.2f" que de acuerdo a lo que probé, en 0.2 el juego funciona bastante bien, lo cual puede variar a 0.15 o 0.17 o como más les guste. Para ir decreciendo el valor, la mejor forma que se me ocurrió es en la función Update() poner:

energy_count -= Time.deltaTime;
energy_bar.FillAmount = energy_count 

El Time.deltaTime vino perfecto para esta situación, con lo que eso se encarga de disminuir la barra todo el tiempo, en caso de que no apretemos, la barra caerá hasta 0. Por último, la ultima parte asocia la imagen que usamos como barra con el contador. Si queremos variar la dificultad, solo tenemos que variar el valor por el cual incrementamos (0.13 me pareció bastante complicado aunque no lo probé en Android).

-L

--------------------------------------------------------------------------------
English

The second of four mini-games finished. This is going to be a very popular and classic game of pressing a button to fill a bar. Whenever I saw this kind of game I always had a clue about how they work, every time we press the button, it increase a value, so what the game was really about making a number "reach" 100 (or any other value).

What I didn't know how it worked was the fact that if we stop pressing the button, the bar would return, or in other words, the numer would decrease. So I was thinking: What can recreate this effect of decreasing the value of the bar constantly? and also, what I can use for this that uses decimal numbers? Because we don't want our player to reach to 100 by increasing by 1 or by 2, neither to increase by 10 because that would make the player to only press the button 10 times.

Also, the fact of using numbers between 0 and 1 has to do with the bar itself, to create the bar, I used an image (which for testing purposes I used an elongate cube ) on which the part that varies  and where the whole game is focused is on the "Fill Amount" property, for this the image type has first to be set to "Filled", with a Fill type of "Horizontal" and it should start on the left. Then, we need to create the variable which is going to be the value we will increase and decrease.

So, we create the variable float energy_count which initial value 0, and here is something important, as we are going to be decreasing the value constantly, we don't want this value to be negative. Because if this value reaches let's say -10 and the player increments by 0.1, the player would need to click to make the value be positive again and the game will be at the same time decreasing it. So we put this on the Start() function:

If(enery_count < 0){
 energy_count = 0;
This way, we set the Domain of the counter, which will be from 0 to infinite. Now, every button does a simple "energy_count = energy_count + 0.2f" which as I tested, works fine if they increment value of the counter is 0.2, which can also vary to 0.15 or 0.17 or as you like. To decrease this value, the best way that occurred to me is to put this on the Update()  function:

energy_count -= Time.deltaTime;
energy_bar.FillAmount = energy_count 
The Time.deltaTime came perfect for this situation, which it manages to decrease the bar the whole time, in case we don't press the buttons, the bar will reach to 0. Finally, the last part associates the image that we use as the bar with its counter. If we want to make the game harder, we need to decrease the value that increments the counter (0.13 was too hard for me but I didn't test it on Android).

-L

viernes, 4 de marzo de 2016

Nerdy Run Día 6 - Primer mini-juego creado | Nerdy Run Day 6 - First Mini-game created

Español | English


Ya creé el primer mini-juego! Es el primero de 4 y estimo que el más difícil de crear de todos. Ya pude resolver los problemas de los cuales hablé en la entrada anterior que básicamente era sobre la lectura de los ángulos Euler.

Estos ángulos no son exactos, si uno hace un Debug.log de los valores se va a dar cuenta que dan valores como 90.00001 o 270.001 en vez de ser exactos, por lo que esto conlleva a que no se pueden utilizar para leer datos. Esto hacía que si yo esperaba que una acción ocurra si el ángulo era 90° no lo iba  reconocer, ni siquiera cuando utilizaba los ángulos como el 90.0001 que era lo que aparecía.

Por eso, los ángulos Euler son para escritura solamente, nos pueden ayudar mucho para un objeto según un determinado vector pero no para leer los ángulos que nos da ni tampoco para utilizarlos en estructuras IF.

Por lo que tuve que inventar un método para indicar en que posición se encontraba cada botón, si miraba para arriba o para abajo, etc. Para esto recordé el sistema de cuadrantes en matemática, desde 0° a 90° los ángulos están en el primer cuadrante, dentro de 90° a 180° en el segundo, etc. Por lo que lo que hice entonces es asignar, dependiendo a que ángulo este rotado el botón, a que cuadrante corresponde, y desde ahí si pude utilizar el número de cuadrante como parámetro para el juego.

Luego de eso tuve que crear la rotación inicial, una rotación aleatoria. Para esto, en la función Start() utilicé un truco que utilizaba en matemática para otro tema pero que también servía:

GetComponent<RectTransform>().Rotate(new Vector3(0, 0, (90 * Random.Range(1, 5))));
Lo que hace eso es agarrar el RectTransform (que es el Transform de cada botón) y rotarlo 90° X veces, ese valor X es un valor cualquiera entre 1 y 4. Por último, solo queda des-habilitar todo el mini-juego para que se active cuando el jugador se encuentre con uno de los profesores...

-L

--------------------------------------------------------------------------
English


I created the first mini-game! This is the first of 4 and I think it is the hardest to create. I could solve the problems which I've mentioned on the last entry which where basically about the readings of the Euler angles.

This angles aren't exact, if one does a Debug.log of the values he/she will realize that they are values like 90.0001 ir 270.001 instead of being exact, which leads to not being able to read this data. This caused that if I wanted to run an action depending on the value of 90° it wouldn't recognize it, not even if I used the same value that it gave me, like 90.0001.

That is why, Euler angles  are write-only, they can be really useful to rotate an object depending a given vector but not to read the angles and neither to use them on IF structures.

So I had to figure a way that would indicate the position of the rotation of each button, if it was looking up or down, etc. For this I remembered the Quadrant system in Mathematics, angles between 0° and 90° belongs to the first Quadrant, angles between 90° and 180° belong to the second Quadrant and so on. So what I did was to assign, depending at which angle the button was rotated, the corresponding Quadrant and from there I can use the Quadrant number as a parameter of the game.

Then, I had to create the initial rotation, a random rotation. For this, on the Start() function I used a trick that I used to use on math for another topic but it also works:

GetComponent<RectTransform>().Rotate(new Vector3(0, 0, (90 * Random.Range(1, 5))));
What this does is to grab the RectTransform (each button's Transform) and rotate it 90° X times, where X is a random value between 1 and 4. Finally, all that remained was to un-able the mini-game so it actives itselft when the player meets one of the proffesors...

-L

jueves, 3 de marzo de 2016

Nerdy Run Día 5 - Problema de ángulos | Nerdy Run Day 5 - Problem with angles

Español | English

Hoy me dediqué a inventar un poco como va a ser uno de los mini-juegos, específicamente, el rompecabezas. Este mini-juego se va a tratar de clickear en unos sectores para que estos roten y al tener las piezas en la rotación correcta, ganamos el mini-juego.

Para esto había creado 4 botones grandes que van a ser parte del GUI, el objetivo ahora era desarrollar la mecánica, luego me voy a encargar de como incorporar el mini-juego al juego original y como hacerlo desaparecer. La acción que va a realizar cada botón si se lo presiona va a ser de rotar 90° en el eje Z.



Para empezar rote inicialmente cada botón, haciendo que el objetivo se convierta desde otro punto de vista, en rotar el botón hasta que el ángulo de rotación de este sea 0°. Pero ocurrió un pequeño inconveniente matemático. Resulta que si el botón inicialmente estaba rotado 270°, al rotarlo debería dar 360° que sería equivalente a 0°, pero resulta que hacer esto da valores como "2.897804e-05" lo cual debo resolver. Debo revisar si estoy usando los métodos correctos para rotar los botones y debo hacer las cosas de otra forma o si es un simple error que pueda solucionar fácilmente.

Por lo que después de solver este inconveniente, debo realizar los otros mini-juegos y continuar creando los obstáculos para tener la base del juego y después dedicarme a el arte de este.

-L

---------------------------------------------------------------------------
English

Today I've dedicated my time on creating what will be one of the mini-games, specifically, the puzzle. This mini-game will be about clicking on the sectors to make them rotate and if you have the pieces on the correct rotation, you win the mini-game.

For this I've created 4 big buttons which will be part of the GUI, the objective now is to develop the mechanics, I'll later take care of how the mini-game will be incorporated on the main game or how will it disappear. The action that every button will run is to rotate 90° itself on the Z axis if it was clicked.


To make this, I initially rotated each button, making the objective, seen on another perspective, to rotate the buttons until the angle of rotation is 0°. But there were some mathematical problems. It turns out that if a button was initially rotated to 270°, after rotating it, it should give an angle of 360° which is equal to 0°, but istead, it  gives values like "2.897804e-05" which I need to solve. I need to check if I'm using the wrong methods to rotate the butons and I must do it in another way or its just an error I can simply solve.

After solving this issue, I need to create the other mini-games and continue to make the other obstacles to have the core of the game, I'll later add the art.

-L