Category: Programming

  • The Top 5 Hidden Features of Python

    The Top 5 Hidden Features of Python

    Python aims to be an elegant and expressive language; this post includes its top 5 hidden features: The term hidden is loosely used to indicate features which are generally unique to Python, or not very well known. I covered the most interesting Easter eggs which are really hidden in Python in this post.

  • Interactive Graphs in the Browser

    Interactive Graphs in the Browser

    Having worked both as a teacher and an artist, I know how important data visualisation is. This tutorial will teach you to create interactive network graphs with Python and JavaScript. You can have a go by dragging the nodes of the graph below… You can find a high resolution version of the melancoil tree (2000x2000px, first 1000 numbers)…

  • A practical tutorial to hack (and protect) Unity games

    A practical tutorial to hack (and protect) Unity games

    If there’s a term which is often misunderstood, that’s for sure hacking. When it refers to softwares, it usually gets a negative connotation which smells of piracy and copyright infringements. This post will not cover any of these topics; quite the opposite, I strongly discourage readers from taking any action which will damage (directly or indirectly) other developers. That said:…

  • How to hack any IR remote controller

    How to hack any IR remote controller

    If you haven’t heard of Air Swimmers before, you probably had a miserable life. Air Swimmers are inflatable foil balloons made in the shape of fish. But what makes them really awesome is the fact that they can be remotely controlled to fly around in a room. One of my friends, Claudio, developed an obsession interest for them;…

  • Extension methods in C#

    Extension methods in C#

    Following the heritage of C++, C# comes with a number of powerful features which can either be used to massively improve your code …or to make it completely unreadable. In this post we’ll discuss a technique to add new methods to already existing classes. Yes, even classes you don’t have access to such as Vector3, Rigidbody and even string. Let’s introduce extension methods with…

  • Enum, Flags  and bitwise operators

    Enum, Flags and bitwise operators

    If you’re a game developer chances are you’re familiar with the need to describe different variations of an attribute. Whether it’s the type of an attack (melee, ice,  fire, poison, …) or the state of an enemy AI (idle, alerted, chasing, attacking, resting, …) you can’t escape this. The most naive way of implementing this is…

  • How to Snap to Grid in Unity3D

    How to Snap to Grid in Unity3D

    Despite Unity3D being such an advanced framework, I am sometimes puzzled by its lack of basic features. Especially when working with 2D games, the lack of a proper snap to grid option is simply crazy. Luckily, Unity3D allows to extend its basic interface to add new behaviours. This post will explain how to add a customisable snap to grid option…

  • Screen shaders and image effects in Unity3D

    Screen shaders and image effects in Unity3D

    Part 1, Part 2, Part 3, Part 4, Part 5, [download the Unity3D package] If you are using Unity3D you may be familiar with image effects. They are scripts which, once attached to a camera, alter its rendering output. Despite being presented as standard C# scripts, the actual computation is done using shaders. So far, materials have been applied…

  • Vertex and fragment shaders in Unity3D

    Vertex and fragment shaders in Unity3D

    Part 1, Part 2, Part 3, Part 4, Part 5, [download the Unity3D package] The previous three posts of this tutorial have introduced surface shaders and how they can be used to specify physical properties (such as albedo, gloss and specular reflections) of the materials we want to model. The other type of shader available in Unity3D…

  • Physically Based Rendering and lighting models in Unity3D

    Physically Based Rendering and lighting models in Unity3D

    Part 1, Part 2, Part 3, Part 4, Part 5, [download the Unity3D package] Why is it colder at the poles and hotter on the equator? This question, which seems completely unrelated to shaders, is actually fundamental to understand how lighting models work. As explained in the previous part of this tutorial, surface shaders use a mathematical model…