Posts Tagged ‘2D’
Unity: How to create a speech balloon
Posted by Dimitri | Filed under Programming
This Unity tutorial explains how to create a speech balloon, like the ones featured on comic books, in Unity3D. For any game, objects move around the screen, and in order to make the speech bubbles work, they have to follow the movement of these objects. However, the balloon can’t be translated in the 3D space, or else it will look like a regular billboard sign over the character’s head. So, it has to follow the character on the two dimensional screen space. The elongated edge of the balloon must also follow the character’s movement, stretching and shrinking accordingly.
To solve these two issues, a script is necessary, which will treat the round part and the triangular tip of the balloon separately.
Unity3D: Using textures larger than 4096×4096
Posted by Dimitri | Filed under Featured, Programming
This post explains how to assign images larger than 4096×4096 px as textures in Unity. This image size is the maximum supported dimension for a texture in that game engine, however Unity allows us to write our own custom shaders that can use four images as textures, instead of just one.
Therefore, this post shows how to create a simple diffuse shader that takes four images to compose a single texture. That way, a 8192×8192 image can be used as a texture by breaking it into four 4096×4096 pieces, thus respecting the engine’s image size limit.
Unity: Scaling Pixel Art
Posted by Dimitri | Filed under Programming
This Unity post explains how to prepare images and set the Texture Importer settings to correctly render pixel art in Unity3D. So, this post covers how the different Texture Importer settings affects the pixel art textures in 3D models and in the game’s graphical user interface (GUI).
Android: Disabling anti-aliasing for pixel art
Posted by Dimitri | Filed under Programming
Android is great when it comes to displaying scaled pictures in applications and games since it tries to interpolate the pixels, making the resulting image look as good as possible. That works for almost every case, however, what about pixel art? This behavior isn’t good for that because, after scaling it, the resulting image will be “smoothed out”, invalidating the handcrafted pixel placement.
There are two options in this case: use an image with the correct size and never scale it, or try to disable anything that could be aliasing the image. This post is going to describe how to do the latter. As usual, an example project is available for download at the end of the post. (more…)
Unity: How to make an overview map
Posted by Dimitri | Filed under Programming
This Unity tutorial explains the required steps to create a map that displays the level in a top-down view. For a real-time, precise map, an orthographic camera can be placed on the top of the map and set to exclusively render a specific layer. However, this post isn’t about creating a precise map, instead it shows how to create a stylized one. A Unity project with everything explained here is available for download at the end of this tutorial.
The first step is to create a plane by clicking on GameObject->Create Other->Plane. Resize it underneath your level, making it have the same size of your scene, not bigger or smaller, just enough to fit all of the elements inside it. (more…)