Pages

Saturday, January 4, 2014

Pixel Art in Unity3D



Hi there! Toromak here, and this is a quick tutorial on how to import pixel art into Unity3D.

First, you have to save your pixel art into your project's assets folder (preferably within a subfolder called Sprites or something). I highly recommend using the PNG format. NEVER SAVE PIXEL ART IN JPG OR GIF FORMATS. These formats compress the art and ruin the crispness of pixel art. When you first import the sprite, it will be very blurry. It is simple to change this. Simply click on the image on the side panel of Unity, and the Import Settings will appear on the right side. Just change the Filter Mode to point, (which will preserve the sharpness) and the Format to truecolor, which will keep your beautiful pixel art colors. Remember to hit apply before leaving to work on your amazing pixel-y game!




SFML Tutorial 1: Opening a Window


SFML Tutorial One: Open a Window

In this tutorial, I will be showing you how to open a window using SFML. So let's get started! 
NOTE: I am assuming a basic/intermediate knowledge of C++.

The first thing you want to do is include SFML and set up your Main function:


#include <SFML/Window.hpp>

int main(){
   
   sf::Window window(sf::VideoMode(600,600), "SFML");
   //The above will create a Window object with a resolution of      //600x600 and a title of SFML. Feel free to change these.
   return 0;
}

This will simply set up a window.

So you want to do Graphics/Game programming with C++?



So you want to do graphics programming in C++? Well you've come to the right place.
This post will link to my other tutorials on how to use SFML in C++ for an easy start with graphics programming.

Intro: What is SFML?

SFML is an amazing and versatile graphics library for C++. In SFML you can:
  • Display images
  • Resize, move, and rotate them
  • Move the view around
  • Play sounds
  • Display text
It may not sound like much, but it is really all you need to create a 2D game in C++.
Please know that you are not going to be creating any 3D games with SFML (unless you use it as a wrapper for OpenGL, but that's more complex and may be covered in a later tutorial.)

The Tutorials

Displaying a window


Planned Tutorials

Basics

Setup with Codeblocks
Display an image
Move, Rotate, and Resize image
Get keyboard input
Get mouse input