Reality is a Game

Game thinking from Adam Clare

Tag: unity(Page 2 of 5)

Get to Know Unity Shaders

Unity is the indie game engine of choice due to its relative ease of use and ability to output to multiple platforms. Some people complain that Unity games “look the same” but that isn’t true, and very avoidable, if you play with shaders.

First, what’s a shader? A shader is an algorithm that tells computers what something looks like. For example, you can have a dull red apple that looks red in a default shader but in a modified shader that red apple becomes a highly reflective purple apple.

Thankfully, the great people at Unity Gems have a Noobs Guide to Shaders! It covers the basics and goes into how you can use it in your Unity-made games. If you’re new to code you may get a bit of a shock, but you’ll do fine – I think.

You should read this article if:

  • You are new to shader programming in general
  • You want to build shaders to do cool things in your game but you can’t find one that fits your needs
  • Strumpy Shader Editor isn’t helping because you don’t get the basic principles
  • You want to manipulate textures inside your shader

Unity Gems mentions the excellent Strumpy Shader, which is really good. It’s an open source shader editor that is quite powerful, part of me wonders why it’s not just included into Unity. If you know the very basics of shaders than you may want to check out this introduction to Strumpy Shader:

Familiar with shaders?

If you are familiar with shaders but not how they function in Unity, check out Unity’s page of surface shaders.

Of course you can always create and play around with your own.

Lastly, if you have Unity Pro check out to create a dream-like world. This last tutorial makes use of camera effects – and camera effects will have to be a whole other post.

Mobile Optimization Tips for Unity

Earlier this year Unity’s basic mobile licenses went free which is a great thing for indie developers. If you’re new to putting games on mobile with Unity you’re going to want to check out these tips.

Garden Knight Games has a good introductory blog post to getting your Unity game ready for mobile devices.

This article is going to focus on how to get your Unity game running as fast as possible on mobile devices, specifically iPhone but you can carry over techniques to Android as well. This is something I find a lot of people have issues with, their game running at terrible frame rates and not understanding why or what they can do about it! iPhone’s hardware isn’t that beefy which makes optimization much more important! Squeezing visual fidelity without suffering game play is the challenge.

It mentions the 3Gs iPhone quite a bit and I think it’s far to say that you can ignore that device flat out – particularly with the rumoured new iPhone coming in September. Key lesson from this is that directional lights on mobile slow everything way down.

Similarly, Paladin Studios has a post on getting your Unity game ready for iOS and Android using four tips.

1. Use The Performance Profiler

The first thing to look at when you want to improve the performance game is the Unity Profiler. It is a Unity Pro feature that lets you analyze performance bottlenecks. The Profiler is an invaluable tool. With it, you can determine where any framerate issues are coming from. You run the game on your target device, and run the profiler on your PC. When you launch the game, the Profiler starts pumping out performance data.

Here’s a quick video on texture optimisation and size tips in Unity 3D:

Finally, a general tip across all mobile games is scaling for the proper screen size. In this post, three options are outlined: scaling, letter boxing, or cropping.

(hat tip to r/gamedev)

Powered by WordPress & Theme by Anders Norén

%d bloggers like this: