Tag Archives: Unity3D

Walking on the surface of a planetoid with Quaternions 0

In Rain, Sand, Stars, all objects inhabit little planetoids a la Mario Galaxy (or much before that, a la The Little Prince). Therefore, at each time step, all dynamic objects must be rotated so they stand upright on the planet surface. In a game like Mario Galaxy, their transform.up should coincide with the normal of [...]

Simple FSM-like structure
using Coroutines in C# (Unity3D)
10

The previous post got a funny comment in Reddit: “Yawn. Hang on, inheritance, singletons? Bletch”. So I thought… “I may be getting rusty… let’s give those coroutines a try”. At first, coroutines seemed like a sure way of leaving behind all my (humble) OOP practices.  I though they were some kind of goto statement, probably [...]

A Finite State Machine in C# for Unity3D 32

Finite State Machines (FSMs) are pretty useful in many different contexts, as you may know if you are reading this. From a game menu to the complex behaviour of game entities, a nice FSM may improve your code’s readability and simplify its design. Or turn it into a hell of spaguetti code, depending on its [...]

Cool Oddy Smog trailer animated gif… 0

… to celebrate that we did not win anything at all in the 2010 Unity Awards. There pretty good works among the nominees! But this year winners where… Grand Prix: Air Attack HD by Art In Games Best Gameplay: Colorbind by Nonverbal Best Non-game LoveMyHome by ILP Best Visual Design: The Uncanny Fish Hunt by [...]

Roulette wheel selection for procedural content generation 7

There are times when you need to give your code the ability to choose among many options that have different frequencies or probabilities of being selected. Whether you need to create a random power-up or decide the next enemy encounter, here’s a tool that you will find useful: the Roulette Wheel selection algorithm, or Fitness [...]