miércoles, 2 de marzo de 2016

Nerdy Run Día 4 - Deteniendo el tiempo | Nerdy Run Day 4 - Freezing Time

Español | English


Día 4. Hoy se lo dedico a todo lo que tiene que ver con el tiempo, ya que el juego se basa por tiempo y también tiene enfriamientos, etc. Por lo que hoy estuve también aprendiendo como hacer para que una función dure un intervalo de tiempo.

Muchas veces la gente se pregunta esto cuando quiere hacer cosas como aumentar la velocidad del jugador, quieren que el jugador agarre un objeto y este le permita aumentar la velocidad, pero no indefinidamente, sino que por un tiempo. Unity para estos casos permite dos alternativas, o ejecutar el código que permite aumentar la velocidad por un tiempo, o agregar un "acelerador" que va a funcionar con el motor de física de Unity.

Uno también puede pensar en no utilizar el tiempo sino una secuencia, es decir, puede decir "que la función dure lo qeu la PC tarda en contar hasta 100" este método es no solo no-práctico sino que se debe evadir a toda costa, ya que como podemos imaginar, una PC de 10 años atrás no va a "contar hasta 100" a la misma velocidad que lo cuenta una PC de hoy en día. Por lo que este efecto varía dependiendo de la PC del jugador. Aunque por otro lado, este método utilizado de forma correcta, puede servirnos para adaptar la jugabilidad de cada jugador dependiendo su Hardware.

Por otro lado, como reporte de Tappx, si bien no se actualizaron del todo los datos de Google Play, pude ver que no tuve más descargas de Infinite Squared Run, aunque 19 personas hayan dado click en la publicidad. Si bien no se afecto mi número de descargas, tuve 2.500 impresiones, lo cual hace que siga manteniendo en promoción al juego. 

-L

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

Day 4. Today was dedicated to everything that has to do with time, as the game is time based and also has cooldowns, etc. So today I was also learning how to make a function run for a period of time.

Many times people make this question when they want to do things like a speed booster for the player, they want the player to grab an object and this will allow the player to increase its speed, but instead of making it indefenitely, they want it to last for a period of time. Unity for this kind of things has two ways of doing it, one is to run the code that speeds you up for a period of time, the other one is to create an accelerator which will work with the fisics engine of Unity.

One can also think of not using time but rather a sequence, in other word, to say "make the function last the same time it takes to the PC to count to 100", this method is not only non practical but it should be avoided, because, as you can imagine, a PC of 10 years ago won't take the same time to count to 100 than a PC from theese days. So this effect will work differently depending on the PC of every player, Although, this method, if used in the right way, can make us change the gameplay of the player according its hardware.

On the other hand, as a Tappx's report, although the Google Play data wasn't 100% updated, I could see that I didn't have more downloads of Infinite Squared Run, although 19 people clicked on the ad. Also, I had more than 2.500 impressions, which makes the game promote itself.

-L

martes, 1 de marzo de 2016

Nerdy Run Día 3 - El Planeamiento | Nerdy Run Day 3 - The Planning

Español | English

Día 3. Hoy tomé las cosas con calma y decidí planear los pasos que voy a hacer. He leído que hay una gran cantidad de personas (tanto en empresas grandes como en grupos indies) que sobrestiman este paso, pero es vital. Dedicarse un o unos días a planificar los siguientes pasos nos dan un orden y una guía para saber a donde ir y de siempre saber que hacer.

Por lo que hoy fue uno de esos días (y no creo que se el último). Decidí cuales van a ser los obstáculos y como van a afectar al jugador. Además de aclarar cuales iban a ser los mini-juegos. Por otra parte, también reflexioné que el hecho de hacer el juego por niveles en vez de simplemente un Infinite Runner me puede generar dos conflictos:


  1. El tiempo de desarrollo que había estimado (3 meses) se puede elevar .
  2. Podría no lograr una diferencia en los niveles, lo que causaría que el juego sea muy repetitivo. 
Por otro lado, sigo trabajando con cubos y luego haré los Sprites. Ya pude crear un código que va a servir para el "Timer" del juego, funciona con la mecánica del "fill amount" de una imagen del GUI, en otras palabras, podemos hacer que una imagen aparezca o desaparezca progresivamente, el efecto lo quería probar era que con una imagen cualquiera (que más adelante va a ser la imagen de un reloj), haciendo que se vaya desapareciendo progresivamente de forma radial en sentido horario. Esto va a dar el efecto de que el reloj se "borra" siguiendo el sentido de las agujas del reloj a medida que se nos acaba el tiempo.

Para esto tenemos que tener nuestra imagen en la interfaz gráfica (GUI) que va a servir como nuestro reloj. Necesitamos que la imagen en ImageType este en "Fill", poner Fill Method "Radial360" y Fill Origin "Top", después poner Después, podemos poner en un script cualquiera el siguiente código:

using UnityEngine.UI;
Public Image reloj;
Public float tiempo = 10.0f; 
void Update(){
reloj.fillAmount = 1 - ((1/tiempo) * Time.time) ; 
}


 La variable "tiempo" hace referencia al tiempo en el que queremos que transcurra este efecto. A medida que el tiempo en le juego crece (con Time.time), el fillAmount del reloj va disminuyendo, borrando así de a poco al reloj. Lo que queda hacer más adelante son los mini-juegos en sí y programar que efectos van a causar los obstáculos para el jugador.

-L

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



Day 3. Today I took it easy and decided to plan the steps that I'll follow. I've read that many people ( (whether they belong to a big company or a small indie group) don't take this step seriously, but this is vital. Dedicating one or two days to plan the next steps gives us not only order but a guide to know where to go and what to do.

So this was one of those days (and won't be the last). I decided which are going to be the obstacles and how they will affect the player. Also, I decided which are going to be the mini-games. On the other hand, I was also thinking that making a game by levels instad of a simple Infinite Runner can generate some conflicts:
  1. The development time estimated (3 months) may increase.
  2. I could fail on making every level unique, which will make the game to be repetitive.
Also, I'm still working with cubes, I'll later add the Sprites. I was able to create a code that will work for the Timer of the game, it works with the "fill amount" property of an Image of the GUI, in other words, we can make an image appear or disappear progresivelly, the effect was tested on a random image (which will later be a Sprite of a clock) making it to fade away in a radial progression, clockwise. This will give the effect that the clock will be fading away clockwise as we run out of time.

For this we need to create an image on our GUI, which will be later on our clock. We need that the ImageType is se to "Fill", put Fill Method "Radial360" and Fill Origin "Top" Later, we can add to any script this code:

using UnityEngine.UI;
Public Image clock;
Public float time_left = 10.0f; 
void Update(){
clock.fillAmount = 1 - ((1/time_left) * Time.time) ; 
}


The variable "time_left" will reference to the time on which we want this effect to happen. As the time grows by Time.time, the FillAmount of the clock starts decreasing, which will cause that fading effect of the clock. What is next is the mini-games itself and to program what effect will cause the obstacles to the player.

-L

lunes, 29 de febrero de 2016

¿Por qué corres? Nerdy Run día 2 | Why you run? Nerdy Run day 2

Español | English

¿Por qué corre nuestro protagonista? Esa es una pregunta que quedo sin responder y que le da poco sentido a un Infinite Runner, ¿por qué hay que correr y saltar y evadir obstáculos? En este juego como pueden ver en entradas anteriores, nuestro personaje va a ser un "Nerd", por lo que podemos optar por dos alternativas:
  1. Corre de un Bully
  2. Llega tarde a clases
El primero puede ser más cómico para los chicos ya que conlleva a la acción y un poco a la adrenalina de estar en peligro. Pero rápidamente nos tenemos que dar cuenta que esto conlleva a violencia, lo que hace preguntar: ¿Por qué debemos correr de este Bully? ¿ No nos podemos defender? ¿ Y si nos atrapa? ¿Es correcto perseguir a estos "Nerds"? Todas estas preguntas llevan connotaciones negativas, que si bien uno puede no preguntárselo directamente, llegan al inconsciente del jugador.

Por lo que decidí por la segunda opción, este "Nerd" tiene que llegar temprano a clases, por lo que se puede pensar en dos modos: modo lineal, en el que debe pasar un nivel en el menor tiempo posible y modo Infinite Runner en el que debe juntar la mayor cantidad de puntos posibles. Esta opción además de no ser ofensiva o contener violencia, me da también dos modos de juegos, por lo que podemos ver claramente los beneficios.

El hecho de que se puede hacer por niveles me da más ventajas todavía, puedo hacer niveles especiales en donde se refieran a mini-juegos de un tipo, otro nivel con otros mini-juegos. Además puedo utilizar la técnica que Candy Crush utiliza, hacer actualizaciones que contengan más niveles, por lo que si el juego tiene mucho éxito, se le puede cada vez añadir más niveles (además de tener siempre posible la opción de Infinite Runner).


Por ahora ya he terminado los Spawner de los que hablé en la entrada anterior y ahora debo enfocarme en cómo hacer estos mini juegos. Por otra parte, tuve más resultados con Tappx, el día 28 no generó ninguna impresión lo que me preocupó, yo estimo que esto ocurrió ya que no tenía suficientes Tappx (un mínimo de 500 estimo yo), pero hoy me dio más de 900 impresiones y tuve 10 clicks, de nuevo, por cuestiones de demora en los datos de Google Play, no puedo ver si aumentó el número de descargas. Si pude ver que ocurrió una instalación en el día que Tappx empezó a funcionar, por lo que puede que este plan funcione.

-L


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


Why does our main character run? That is a question that was left unanswered and give little sence to an Infinite Runner. Like, why do we have to run, jump and avoid obstacles? This game as I said on my previous entries, our character will be a "Nerd", so we can have two alternatives:

  1. Running from a Bully.
  2. Being late for class.

The first option may be funnier for little kids as it has action and a little bit of adrenaline because of the danger. But quickly we have to realize that this brings violence, which makes us wonder: Why do we have to run from this Bully? Can't we defend ourselves? What if he/she catch us? Is it right to persue "Nerds"? All this questions brings negative feelings or line of though, which, although one may not make this questions directly, they will reach the unconscious of the Player.

That is why I've chosen the second option, this "Nerd" can't be late for his class and this brings two game modes: lineal mode, in which he needs to pass through a level in the shortest time possible, or Infinite Runner mode, in which he needs to score the highest amount of possible points. This option besides of the advantage of being non violent , gives me twe game modes, so we can clearly see the benefits.

The fact that it can be made by levels also gives another extra advantage, I can do special levels in which some might have one type of mini-game and other levels other mini-games. Besides, I can use the technique that Candy Crush uses, do Updates that will include more levels, so if the game has a lot of success, I can always add more levels (besides of always having the Infinite Runner mode).

For now I've finish with the Spawners I'v talked about on my last entry and now I must focus on the mini-games. On the other hand, I have more results of Tappx, on the day 28, it didn't generate any impression which made me worry for a while, what I think that happened was that I run out of Tappx and I didn't have the "minimum" required (which I think is 500 Tappx), but today it generated more than 900 impressions and I had 10 clicks, again, because of Google Play, I can't see if the number of downloads increased. I did could see that on the day I started using Tappx I had a new download, so this plan might work.

-L

domingo, 28 de febrero de 2016

Nerdy Run Día 1 | Nerdy Run Day 1

Español | English

Nerdy Run, ese es el nombre que había decidido para el momento y hasta ahora es con el que voy a seguir usando, siempre es importante que halla Tags en los nombre, así es más fácil de ser enontrado por Google.

Después de estar un rato tratando de descifrar las mecánicas que quiero utilizar me pude decidir, como siempre hago, primero voy a hacer el juego con comando para PC (por lo que voy a usar las flechitas del teclado) y para cuando vaya terminando el juego traspaso esos controles a los controles de Android.

El juego tiene una lógica parecida al anterior salvo que para nuestro personaje, la gravedad no afecta (esto se logró modificando el valor de gravity Scale a cero en el Rigidbody2D de nuestro Player). Lo único que iremos haciendo es subir o bajar para esquivar obstáculos, el código que utilicé para esto fue:

        player.position += new Vector3(velocidad, 0, 0);
        if (Input.GetKey(KeyCode.UpArrow)) {            
            player.Translate(Vector3.up * desplazamiento);
        }
La primera parte es la que hace que siempre vayamos para adelante, mientras que la segunda hace que si presionamos la flecha para arriba, el Transform del jugador se traslade hacia arriba. Por lo que multiplicamos a Vector3.up (vector unitario en Y) por la velocidad a la que queremos que se desplace.

Por supuesto había que crear una especie de "área" en donde el jugador se puede mover, por lo que para eso creé un cubo alargado (modificando su escala en X) que sea de la medida del área de la cámara y que este, uno justo encima de esta y otro, por debajo. Esto lo que hace es limitar hasta donde nos podemos mover, creando unos "bordes" o "paredes".





Lo que queda por hacer es terminar los Spawn (unos objetos que van a hacer que aparezcan otros objetos) de obstáculos y con eso tenemos un nuevo Infinite Runner. Pero recordemos que por ahora estoy utilizando solamente cubos, luego hay que añadir el arte. Pero el segundo paso sería crear los "mini-juegos" que el juego va a tener.

-L




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


Nerdy Run, thats the name I've decided at that moment and its the name I'll keep using, its always important that you use Tags on the name, so it is easier to be found by Google.

After being a while trying to figure out the mechanics I want to use I finally decided. As I always do, I'll first make the game with controlls for the PC  (so it can use the keyboard arrows) and when I've finish the most parts of the game I switch the controlls to let the game be played on Android.

The game is going to have a similar logic to my last game but this time the character is not effected by gravity (this was achieved by setting the gravity Scale value to 0 on the Rigidbody2D of the Player). The only thing the player is going to do is to move up and down, for this I used this code:

 player.position += new Vector3(velocidad, 0, 0);
        if (Input.GetKey(KeyCode.UpArrow)) {            
            player.Translate(Vector3.up * desplazamiento);
        }

The first part makes us always move forward, while the second one checks if we have pressed the "up arrow", if we did, the Transform of the Player will be translated up. For that we multiply the unitary vector "Vector3.up" with the velocity for which we want the player to move.

Of course it need to be created an "area" where the player can moves, for this I created a cube and modified its X value so it is the same size as the camera screen area, then I placed one above and one below this camera's area, creating this "borders" or "walls" where we can move.



What it's left is to finish the Obstacles' Spawners (objets that will spawn other objects) and we have a new Infinite Runner. But remember that I'm currently using cubes, the art will need to be added later. The second step would be to create the "mini-games" the game will have.

-L

sábado, 27 de febrero de 2016

De borrador a proyecto | From a draft to a project

Español | English


Ya que me decidí volver a mi antiguo proyecto es hora de ver donde lo dejé. Me di cuenta que solo había hecho un par de Sprites (que compartí en la entrada anterior) y unas animaciones, además de esto:



Que iba a ser uno de los obstáculos, claramente se puede notar como no soy un experto del Pixel Art y que debo mejorar, por lo que tengo que crear los Sprites de cero. Para esto voy a utilizar un programa que esta hecho exclusivamente para crear Pixel Art: Aseprite, pueden descargar una versión gratis desde la página oficial: http://www.aseprite.org/older-versions/ son las versiones antiguas del programa pero son gratis.

De todas formas puedo programar las mecánicas usando cubos de nuevo y luego añadir los Sprites y animaciones, por lo que debo empezar a programar con Unity. Si bien estas mecánicas pueden hacerse relativamente rápido, el problema más grande para mí por ahora va a ser el arte, ya que al no tratarse de vectores, al escalar, ya sea agrandar o achicar la imagen, esta pierde calidad. Por lo que voy a tratar de crear estos Sprites de las medidas casi exactas para que no se pierda calidad, generalmente al ser un juego para Mobile, unos Sprites 100x100 pueden ser de la medida exacta.

Por otra parte, con Tappx hasta el día de hoy (hasta este momento) tuve de nuevo unas 500 impresiones de mi publicidad, lo que me parece un muy buen número. Recordemos que esto es gratis, por lo que el costo de promocionar mi juego no fue económico sino de otras formas (tiempo en implementar, el peso que le agrego al APK, etc). Por ahora estoy muy feliz con los resultados que me dio, falta que se actualice la Consola de Desarrollador de Google Play para poder ver si el número de descargas subió.

-L


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


Now that I've decided to resume my old project its time to see where I left it. I realized  that I've made some Sprites (Which I shared on the last entry), some animations and this:


Which was going to be an obstable, it can be seen clearly that I'm not a Pixel Art expert and I need to improve, so I need to create the Sprites from cero. For this I'm going to use a program made exclusively for Pixel Art: Aseprite, you can download it for free from its official page: http://www.aseprite.org/older-versions/ they are older versions but they are free.

Anyways I can program the game mechanics using cubes and then add the Sprites and animations, so I can start programming with Unity. Although this mechanics can be made relatively quick, the biggest problem for me now is the art, as we are not dealing with vectors, when scaling, either making them bigger or smaller, they lose quality. So I'm gonna try to make the Sprites of the exact perfect size so I don't lose quality, generally im mobile games, 100x100 Sprites can be just the exact size.

On the other hand, with Tappx to this day ( until this moment) I had more than 500 impressions of my ad, which I think is a good number. Remember that this is free, so the cost of promoting the game wasn't economic but it was on other ways (time of implemmentation, the size it added to the APK, etc). For now I'm very happy with the results it gave me, I only need for the data of the Google Play Developer Console to update so I can see if the number of downloads changed.

-L