Devlog

I’m too busy finishing Railyard, hopefully will push it to App Store and Google Play tonight. One more tutorial, shop system, couple of textures, credits (me, me, me again), screenshots and press-kit. Still not much to write about, but I’m planning a post about non-physics uses of physics engine in Unity3D. Meanwhile, here’s some random dev stuff you might find helpful.

I went on and bought Galaxy S3 for tests and deployment. Had to launch the game on it a single time to start optimizing everything.

First, dynamic lighting and shadows – had to drop those, apparently a huge performance hit. There goes my dynamic day/night system (still plan on returning it for PC/Mac/Linux versions). As for right now – I made sure the general picture is not flat with lightmaps and some fake shadows. Android – 12FPS.

Second, had to cut on geometry with LODs. If you’re on Unity’s free licence with no LODs, just cut your models, don’t let a scene have more than 50K tris on Android. iOS can handle much more, btw, especially my precious iPhone 5S. After LODs, performance on iOS skyrocketed, 30FPS on iPad 2 and Mini. Android – not so much, 15-17FPS.

Third, don’t use Unity’s built-in mobile shaders. Better grab a copy of Kenny Lammers’ shader cookbook and write your own. I completely replaced standard shaders with my own, which wasn’t really a big perf boost, but gained me 3-4 FPS on Android, which is an OK result. It’s now 20-21FPS on Galaxy S3, which is probably good, because the device is pretty old.

Fourth has nothing to do with performance, but. If you want to draw an object in front of others and achieve that with shaders, don’t use Offset instruction. On Android, it will fuck you up. Better solve that with render queue order, like, “Transparent-10” or “Geometry-20”.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: