How to create collidable curves (trail, lines, whatever) in Unity3D

Halloweee screenshot
Halloweee! Pumpkins and candies for a Halloween game (Android, free)

A few weeks before Halloween we decided to create a minigame to polish and learn new tricks聽(and treats, ha!). With not much time left for the game, we came up with simple mechanics: pumpkins fall from the top of the screen and must land safely.聽If pumpkins fall too fast they break and don’t score.聽By drawing a line (which would look like a spiderweb), players guide healthy pumpkins gently to the ground while throwing rotten pumpkins away. 聽Both actions score points. The goal consists just on getting as many points as posible in 64 seconds. We called it Halloweee! and it finally looked like you see on the image (you may try it on Android, it’s free)

The trickiest part was how to create a collidable and properly textured curve from a gesture drawn by the player. Thanks to Unity’s Mesh class it was not that hard.

Continue reading

Aut贸mata finito en C# para Unity3D

Este art铆culo es una traducci贸n del que escribimos originalmente en Ingl茅s.

Los Aut贸matas Finitos o聽 M谩quinas de Estado Finito (FSMs en sus siglas en Ingl茅s) son bastante 煤tiles en contextos muy diversos, como probablemente ya sabr谩s si est谩s leyendo 茅sto. Desde el men煤 al comportamiento complejo de las entidades de un juego, una buena FSM puede mejorar la legibilidad de tu c贸digo y simplificar el dise帽o. O convertirlo en un infierno de c贸digo espaguetti, dependiendo de c贸mo se implemente…

Continue reading

First steps away from Google App Engine

I’ve just walked one day in the shoes of a server admin and I’m already looking over my shoulder, missing Google App Engine. Things simply worked there. I just uploaded an app and it was running in no time (HTTP 500 error apart). We couldn’t, of course, install our own software. And we were forced to use their datastore, which was not that bad after all. Developing for GAE is a breeze and deploying even easier. Indeed, we still have an application for a client in development for Google App Engine. But we wanted to explore new seas, just in case.

Running your own virtual server on whatever service you choose is a daunting task. No matter if it’s Amazon Web Services or one among the myriad of hosting services out there, you will be forced to face the truth: there are lots of things that must be installed and configured. And administered, because things will break down.

So we created an Ubuntu droplet – what DigigalOcean calls a virtual server, installed nginx, pip and finally Tornado – the Python web framework we’ve chosen, and we were able to access our server and a web app in a few hours. That, of course, after investing days and weeks looking for a proper hosting service.

Now we’ll see how Tornado can be daemonized, or just how to keep it serving pages no matter what happens. Then we’ll install MySQL, completing the LAMP… uh, sorry, the LN(ginx)MP(ython) stack. And finally some tools for monitoring the server. And probably a ton of other things we are not even considering right now.

This is gonna be fun, indeed.

UPDATE 1: I’m finally using Supervisor to keep my Python Tornado server up and running. I installed MySQL, which I maintain with SQLBuddy (seems lighter than PHPMyAdmin), for which I also had to install PHP to handle CGIs. Somehow this is all working, although I’m sure there are security holes everywhere.