Posts by Renaldas Zioma

5 NEW Unity powered iPhone games in TOP100

It’s been less than 2 months and we have 5 new Unity powered games which hit the App Store TOP100 charts*:

*) order of the titles is rather arbitrary and does not represent position in the top neither necessarily means that title is still in the chart

  1. Ravensword: The Fallen King -- arguably the best RPG game on iPhone so far!

  2. (more…)

5 Unity powered iPhone games in TOP100 right now!

Thanks to you guys, having an iPhone game made with Unity topping iPhone chart sales is no surprise to anyone. But do you know that there were simultaneously 3 games in TOP100 ALL apps at the beginning of the last week? Now even better -- at least* 5 games made with Unity can be found in TOP100 GAME charts today!

*) we do not know all iPhone games made with Unity, so if your game is not listed here, please, let us know!

These games are in TOP100 GAME charts at the moment:

  1. BATTLE BEARS

  2. (more…)

iPhone 1.0.3 to the Rescue

iphone-os3

If you’re using compressed audio in your iPhone game, then you should grab Unity iPhone 1.0.3. It is a hot fix release with a single purpose – to improve performance of a compressed audio playback under the iPhone OS 3.0.

Now some technical bits. Previously we have been using the AmbientSound as an audio session category. The AmbientSound category respects silent switch and allows single compressed audio to be played via dedicated hardware decompressor. However since introduction of the iPhone OS 3.0 meaning of the AmbientSound slightly changed. Now this category allows multiple compressed audio sounds to be played, but all of them are decompressed on CPU!

That is not a big deal if you have game without CPU intensive tasks or completely GPU bound game. Otherwise performance may suffer. Instead iPhone OS 3.0 introduced a new audio session category called AmbientSoundSolo which behavior is more like an AmbientSound under the OS 2.x. That is what we need!

Unity iPhone 1.0.3 will detect OS version at the run-time and will pick audio session category for you. It is important to know that this process does NOT require you to explicitly compile for newer OS version. You should use the OS 2.x as a compile target still – it will guarantee wider audience for your game.

iPhone 3G S is Hot!

iphone3gs1

First, lets see what is inside new iPhone 3G S. Number of technical sites wrote reviews already (mostly based on well educated guess since real hardware is out of reach for most), so I will be brief:

  • New and shiny ARM Cortex-A8 as main CPU running at 600MHz. New chip maintains 100% backwards compatibility with older ARM1176 chips powering original iPhone family – so no worries here.
  • New PowerVR SGX chip serving as GPU. SGX family is a huge leap over MBX Lite which we saw in original iPhone. It is faster, has pixel and vertex shaders and supports a bunch of features you would normally get only on your desktop GPUs. It comes with OpenGL ES 1.1 and OpenGL ES 2.0 support too.
  • New NEON™ SIMD unit which is a fantastic addition to help in number crunching operations such as mesh skinning.
  • Double the L1 cache size and introduced L2 cache – this means speed.

All this is great great of course, but how could we help to reduce the complexity while supporting full spectrum of old and new devices? Thanks to the desktop origins of Unity engine, we have solved part of this problem even before iPhone was introduced. In order to harness wild variety of Macs and PCs with different GPUs Unity implemented mechanisms to determine capabilities of the graphics device and fallback to less demanding shaders at run-time.

You can learn more about SubShaders and Fallbacks here:

http://unity3d.com/support/documentation/Components/SL-Shader.html

Different graphic cards have different capabilities. This raises an eternal issue for game developers; you want your game to look great on the latest hardware, but don’t want it to be available only to those 3% of the population. This is where subshaders come in. Create one subshader that has all the fancy graphics effects you can dream of, then add more subshaders for older cards. These subshaders may implement the effect you want in a slower way, or they may choose not to implement some details

I’m really looking forward for Unity iPhone 1.1 being released so we can concentrate on adding OpenGL ES 2.0 support to Unity. Meanwhile you will be able to enjoy 8 texture combiners in a single pass available on the new iPhone 3G S devices.

We wrote a number of hand optimized assembly routines to speed up calculations on VFP coprocessor for Unity iPhone 1.1. For example skinning is now several times faster and significantly outperforms GPU! We’re going to continue this trend by harnessing NEON™ capabilities for iPhone 3G S.

One more thing I want to share with you – we have not seen the actual iPhone 3G S device yet. For better or worse, Apple have been really secretive. Right now we’re looking forward to get the devices from the first batch of publicly available ones. That should allow us to implement and test new features ASAP. Meanwhile we’re working close with Apple to verify existent content works fine on iPhone 3G S.

Unity iPhone 1.0.2 is out there!

iPhone 1.0.2Unity iPhone 1.0.2 is out now, so grab it!

As I’ve mentioned before the key aspects of this release were to reduce memory consumption and make your games more stable. Let’s go over the most important things you will find in 1.0.2:

  • We have halved memory usage for textures! Textures are not longer kept in the memory after being submitted to OpenGL ES. However you will not be able to read or modify texture data from scripts unless the “Enable Get/SetPixels” flag is enabled in the texture import settings. Note: In order to take advantage of this feature for projects created with older Unity iPhone versions make sure to reimport all assets.
  • Memory usage for uncompressed audio is half of what it used to be.
  • Audio respects “mute” button and iPod music playing in the background.
  • Audio continues to play after iPhone receives or rejects a call, text message or alarm.
  • Unity now has much more tidier memory management when it comes to loading new scenes and assets.
  • You can chose from 5 new landscape and portrait splash-screens.
  • We have fixed issues preventing correct usage of .NET sockets and occasional GUI components being stripped away.
  • And on top of that final binary size became smaller!

You can find more details and download here: What’s new in Unity iPhone 1.0.2

While 1.0.2 keeps you entertained, we’re back working on Unity iPhone 1.1.

Unity iPhone Roadmap

Whooosh! First release candidate of Unity iPhone 1.0.2 just went out to our beta testers. It’s a good time now to overview our planned releases and directions we will be taking in the near future.

Unity iPhone 1.0.2. Based on custom builds we’ve been sending to devs in need, this release will address engine memory leaks and fix other outstanding issues:

  • Physics and audio related memory leaks
  • Asset leaks while reloading scenes
  • .NET sockets and threads
  • Compressed audio related issues
  • Stripping away too much of GUI components
  • Occasional crashes in AOT compiler
  • Support for both portrait and landscape splash screens

Next will be Unity iPhone 1.5. Since the release of 1.0.1 we’ve been working on a number of performance and memory optimizations. Most of the work on 1.5 is finished already and we’re doing an internal bug fixing round before it goes to beta testers too. Along with optimizations this release will include number of important features such as:

  • Binding custom ObjectiveC/C++ functions to C#/Javascript
  • Native on-screen keyboard support and interoperability with Unity GUI
  • Movie playback support
  • Performance optimizations:
    • significant C#/Javascript performance improvements
    • general rendering loop optimizations resulting in less OpenGLES state changes and less CPU work per object
    • number of internal routines were rewritten using VFP coprocessor assembly
    • way much faster mesh skinning utilizing VFP
    • batching small objects, given that they share same material, into single draw call
  • General distribution size optimizations which allows applications below 10Mb
  • Number of significant memory footprint optimizations

We don’t have strict versioning past 1.5 yet. Some of the following features will end up in the next big release and some might find a way to sneak into 1.5:

  • Compressed audio streaming directly from disk
  • 3.0 downloadable content
  • 3.0 bluetooth networking
  • GPS/Location support
  • Vibration support
  • Post-processing and render-targets support
  • Terrain support
  • Per-pixel DOT3 lighting support for skinned meshes
  • Reduce load times
  • Reduce distribution size even further
  • Improve GarbageCollector collection patterns to reduce spikes
  • Prepare a pack with iPhone optimized shaders

Update: Unity iPhone 1.0.2 is released.

Update: Unity iPhone 1.5 is released

About Renaldas Zioma:

iPhone Tech Lead. Made games for PS3, XBox360, PC and PsOne. Made demos for PSP and Amiga1200. Published articles in ShaderX, GPU Gems and AI Game Programming Gems.