Archive for the ‘iPhone’ Category

Friday, June 19th, 2009

haXe is an interesting programming language that allows abstracting the source from platform target.  It outputs for targets such as Actionscript and Javascript from haxe language source. But, haXe can also output to native code to run on Windows, Mac OSX, and Linux.

Well because of this it is possible to run haXe on the iPhone. The gamehaXe site has found a way to get haXe to compile to iPhone via hxcpp which creates a C++ output from haXe code very similar to Actionscript 3.

I am a bit late to the party but this is great news. It uses the NME library which will allows code to mostly be written to the Flash 9 API and create the C++ for XCode to compile and run on the iPhone and Touch. This creates a path to port Flash games to iPhone/Touch.

This project is one to watch and participate in.  Native compilation to the iPhone from haXe is a more simplified code to write in while providing lower level performance which is needed on mobile devices, as processors, cache and ram are much lower than desktop and below what is capable of running the Flash AVM2 currently.

If you have more interest in haXe there are some other great demos on as3/haXe at the game haXe site. Also, Tony at touchmypixel.com has posted some very useful information to help you get started with hxcpp.

The hxcpp project is a newer output target along with a java one but this could be interesting if actionscript like code and many libraries like Physaxe or AS3 libraries could be ported to haXe to output to the iPhone.

Thursday, April 30th, 2009

Unity 3D iPhone was updated recently to 1.0.2 and it has been greatly improved in performance and a much more solid 1.0 toolkit.  According to Unity 3D information by up to 50% which means much more room for assets to munch memory for us yay!

I updated to iPhone SDK 3 beta 4 and iPhone OS 3 beta 4 and the latest Unity iPhone and things were much better in perception of speed at least in early testing.  Not sure if it was more from one or the other but the games I am testing/building so far are quicker and the OS feels faster overall.

Get the latest Unity 3d iPhone dev kit (only for Mac OSX obviously since it uses XCode to compile per Apple licensing requirements)

This build fixes many issues and makes some great optimizations for speed as listed here:

New Features and Improvements

  • Reduced memory footprint for uncompressed audio by 50%
  • “Memory usage for textures reduced by 50%. Texture memory is now freed once it has been submitted to OpenGLES on the device. The “Enable Get/SetPixels” flag in the Texture Import Settings lets you disable this feature on a per texture basis in order to access the texture data from a script using GetPixel etc.
  • Improved iPhone script call optimization
  • Removed unused parts of Mono runtime
  • Reduced memory overhead while reading data from disk and slightly improved load times.
  • Support for several predefined splash-screens (portrait/landscape) for Indie version. Just rename one of the splash-screens in the output directory to Default.png
  • Exported audio session activation/deactivation functions to AppController.mm
  • Added Scripting Reference code examples for iPhone specific APIs

Bug Fixes

  • Fixed audio to play correctly after phone call / text message / alarm interruption occurs
  • Fixed compressed audio occasionally refusing to play
  • Fixed AudioSource.PlayOneShot to work correctly with compressed audio
  • Fixed audio to respect Mute switch and background iPod music
  • Fixed Pause function and time property for compressed audio clips
  • Fixed OpenAL memory leak
  • Fixed PhysX memory leaks
  • Fixed Audio and Animation assets leaking while loading new scene
  • Fixed a crash related to playing compressed audio in a sequence
  • Fixed memory leak while updating Mesh geometry data
  • Fixed several small memory leaks in rendering module
  • Fixed asynchronous .NET sockets
  • Fixed .NET threads
  • Fixed cross thread boundary calling to the delegates
  • Fixed UnityEngine.TextEditor stripping
  • Fixed GUI slider stripping
  • Fixed GUI scroll view stripping
  • Fixed IndexOutOfRange exception checking
  • Fixed Boo.Lang.dll stripping
  • Fixed occasional crashes of AOT cross compiler
Tuesday, April 7th, 2009

A quick roadmap was posted by Unity3d.com blog on the immediate future of Unity iPhone.  Currently I am developing two games for the iPhone OS 3.0 and these are welcome updates.  We are really looking forward to items not in the hard version just yet but we are looking forward to terrain support and downloadable content support in iphone sdk 3.0.

 

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.1. 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.1 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.1 yet. Some of the following features will end up in the next big release and some might find a way to sneak into 1.1:

  • Compressed audio streaming directly from disk
  • Support for 3.0 SDK
  • 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