Posts Tagged ‘Bitmap’
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…)
Unity: How to create a GUI Sprite Sheet – Part 3
Posted by Dimitri | Filed under Featured, Programming
The final part of a series that explains how to create a GUI Sprite Sheet in Unity. This post will focus on explaining how the code works. For those who haven’t read the first and second parts, please do before going any further. As most post series in this website, there is a download with everything that had been explained at the end of the post.
With all images and the GUI Skin already set at the Unity Editor, now we just need some code to render the GUI on the screen. The following script correctly renders separately each element from the sprite sheet, and it’s attached to the Main Camera:
Unity: How to create a GUI Sprite Sheet – Part 2
Posted by Dimitri | Filed under Programming
This is the second part of a series that will explain how to create a GUI sprite sheet for Unity. For this part, we will take the images created in the first post and import them to Unity. Also, this post features how to correctly set the images to be part of a GUI Skin object so they can be used as part of a game’s interface.
After having all images correctly placed at the sprite sheet, create a new GUI Skin by right-clicking anywhere inside the Project tab and select the following: Create->GUI Skin. Then, import the images in Unity, by dragging and dropping them inside this tab. It’s a good idea to put everything GUI related at the same folder, like this: (more…)
Unity: How to create a GUI Sprite Sheet – Part 1
Posted by Dimitri | Filed under Featured, Programming
This post is the first of a series that explains how to create a GUI sprite sheet (a.k.a. atlas map) in the Unity game engine. This map consists of buttons, text areas, backgrounds and other interface elements joined together to create various joined image files with all interface elements inside it.
Here, the focus will be on how to prepare and create this images at an image editing software, which is the most important step. The next post of this series will explain how to import these images in Unity and place them inside a GUI Skin object.
The first thing to do is to have all the GUI elements needed for the game or specific part of the game. They have to be already created before building the sprite sheet, at least their size have to be already defined. Throughout this post, the following GUI elements will be used to exemplify how to correctly join the images together: