A roguelike mockup for pixel dailies.
This is a quick tutorial I’ve made for myself and others before Ludum Dare:
1. Create a sprite
Grab your lovely pixel sprite texture and put it into a ‘Sprites’ folder in Unity. Click on the texture and set it up as follows:
- Texture Type: Sprite (2D and
UI)
- Pixels Per Unit: The pixel size
of your sprite, try to keep this to a power of 2 e.g.: 16, 32, 64
- Generate Mip Maps: Off
- Filter Mode: Point
Apply these settings. In 2D mode on the Unity Scene Editor, draw the sprite from the Project window to the scene. Follow the dialog for making an animation.

2. Create a material
EDIT: This set was originally wrong. Fixed now, sorry guys!
Create a new material in a ‘Materials’ folder. Set it up as follows:
- Shader: Sprite/Default
- Pixel Snap: On
Apply the material to your sprite by dragging it from the Project window to the sprite object in your scene.

3. Setup the camera
Select the ‘Main Camera’ in the Hierarchy and set the values of the ‘Camera Component’ to:
- Projection: Orthographic
- Size: Now this is the key part.
Choose a screen size, for example 480x320 and stick to it. In a minute we’ll
change the Game window to reflect this size. Set the size value of the camera
to be Screen Height / 2 / Pixels Per
Unit of your sprites.

4. Set up the game window
Select the Game window and click the drop down to choose the screen aspect ratio, usually ‘Free Aspect’. Click the plus button to add a new screen setup and then enter in the screen size you chose. Give it a name and click okay. Then select that screen size.

5. Setup build output
To setup the resolution for the built version of the game, go to Edit > Settings > Player Settings and then modify the following values for the platform you want to build to:
- Default Is Native: No
- Default Screen Width: Your
Screen Width
- Default Screen Height: Your
Screen Height
- Display Resolution Dialog:
Disabled
There may be other things you want to change such as ‘Default Full Screen’.

Try it out!
Let me know if there are any issues!


