Thursday, 22 November 2012

Choosing an iOS Engine Update: Sparrow

Hi,


A while back I wrote about choosing a game engine for iOS. And now I want to add one to that list. The one I want to add is Sparrow:

Sparrow iOS

This is a great 2D game engine. It rivals Cocos2D, though might be even better. It's not as big as Cocos, both in features and community, but it's more concentrated. One of the problems I had with Cocos2D is that there simply is too much, which can make it annoying to use. Sparrow doesn't have that problem, it's much cleaner.
It does however miss some features, the biggest being a build-in physics engine. Though you can just use Box2D (which is what Cocos2D uses too) and make them play together yourself, which isn't too hard.


As a bonus I also want to note that Unity just got an update, now it's at version 4! The best thing is that it now has social API's, so you can easily promote your game by posting stuff to facebook or twitter. There are also a bunch of other cool new features, but that's not what this post is about.

So yea, have fun making games!

Tuesday, 6 November 2012

iOS Gyro Controller for Unity

Hi,


While playing around with Unity Remote, to control my game with my iPad, I noticed that the gyroscope doesn't work. This sucks, so I tried to find a solution. I found one from the guys of Quick Fingers, though it needed some tweaks, so I'm writing an updated version here. You can read the original tutorial here, mine will be shorter and more to the point.

Needed Soft/Hardware

  • Unity3D and a mac
  • An iOS device with Gyroscope (any new iPhone, iTouch or iPad)
  • Control for iOS
  • Osculator (trail, 20second wait every 10minutes)

Steps

  • Install and start  Osculator and open the QuickFingers file
  • On your iOS device open Control, in 'Interfaces' add a new one and enter this URL:  http://www.quickfingers.net/unitygyro/layout.js
  • In Unity setup your Input Settings like this: 

  • Now you can use this in Unity, here's how to convert it to a quaternion:
float gyroX = Input.GetAxisRaw("GyroX") * 360.0f;
float gyroY = Input.GetAxisRaw("GyroY") * 360.0f;
float gyroZ = Input.GetAxisRaw("GyroZ") * 360.0f;
Quaternion rotation = Quaternion.Euler(gyroX, gyroY, gyroZ);

Now you can use rotation as the rotation of your camera yo create a window into your game. Kind of, since no image is send to the iPad... Still, it's great for testing and a lot of fun!