New Aerial Combat Demo & Tutorial

[tweetmeme source=”neoRiley” only_single=false]Well, people often wonder why I tweet so little and why there are such long stretches in between.  The answer is simple enough:  I work.  Well, it’s more complicated than that, I work, I’m headcoach for my son’s football team, my daughter is in both soccer AND volley ball and I’m involved in all of them in some way or another.  That, and I just came off of a really nice game project that took 7 months of my life, and I can’t seem to do social network stuff while working and still be productive.  I don’t know how you all do it!  Anyway, I’d been wanting to do SOMETHING of a blog post just to get back into contributing to the Unity community, and so when I came off this current project, it was my turn to post something on the IR5 blog – YAY!

So, since Unite 11 is starting today and I’d promised to do a demo on this back in 09′ while speaking at Unite 09, I figured it was time to make good on my promise.  I’ve finally put it all together in a very simple, yet flushed out, demo of how I did dog fighting in The Trench Run.

Check out the post, files and demo over at


iMovie eating memory on iPad

I’m posting this because I found zero information about it and I stumbled upon a solution.

Basically, if you try and export your iMovie after you’ve finished creating it in iMovie on the iPad, it might tell you at the very end (after wasting an hour of your time btw) that there isn’t enough memory to do the export.  Dood, how about telling me BEFORE I SPEND ANOTHER HOUR OF MY LIFE WAITING – SOUND LIKE A GOOD IDEA?!?!?  JUST MAYBE.

At any rate, you might find yourself deleting movies, pictures, apps, music – anything to get enough memory to export your project.  Then, you try again.  then AGAIN it tells you STILL don’t have enough memory.  You go back and look and – WTH?  all the memory you’d just cleared is now magically gone – but you have nothing to show for it.

Apparently iMovie has created your masterpiece but needs to copy it to the location you specified (the camera roll) – I’m not totally sure if it’s done or not, and it’s making yet another copy for the move?  or if it truly ran out of space and can’t continue, but has left a pile of mung behind.  Who knows.  But the fact remains that it is still taking up precious disk space without any visible way of deleting it, and you have no idea it even exists!

All you have to do is open the project in iMovie, make a simple change – then change it back, and exit back to the projects menu.  Now check your memory – it magically has re-appeared.  Apparently, making a change causes iMovie to cleanup after itself.

Hope that helps!

Couple of GarageBand/iPad2 experiments

Use a bath towel

[tweetmeme source=”neoRiley” only_single=false] So, yeah I got a little side tracked this weekend while doing laundry and kept playing with GarageBand on the iPad. The nice thing about doing laundry is, you’re stuck doing it for the duration, so in between the folding and switching from washer to dryer, you really have a nice chunk of time to mess with the iPad.

I did 2 different songs this time. “Dream Puppet Show” is really a tip of the hat to Dream Theater. The by no means is a master piece, but many of the sections are right out of the DT text book 😉 I wanted to see how GarageBand handled odd time signatures, and the quantization with a triplet feel where a quick straight 4 riff was inserted into the rhythm. I also went completely off the tempo in one very short section, then went into a normal straight 4 feel. The results were mixed. The quantization feature is limited in that it’s applied to the recorded section. So if you apply it to a drum part, and that part happens to be what i described above, you’re screwed if you can’t play it straight enough on your own. What you hear in this piece is not quantized in the first half of the song. It’s not bad, and I was able to consistently play the guitar and bass rhythms the same. The drums however, are still not quite where they *could* be to make this thing great. Their much closer than any other drum app on the iPad, but still inconsistent.  The guitar however, was a ton of fun and I was able to use the note bending feature in a realistic way – that ended up being a ton of fun!

Listen: Dream Puppet Show

Listen: Groove

The next piece is called “Groove”, and this one I wanted to open it up and see what it could do. The First half of the song just loops a main drum part that i recorded over 4 bars. It was very very very very very frustrating to get right. With the other songs (Genesis and Dream Puppet Show) the tempo was much slower, and the parts were pretty straight forward. With Groove, the parts were much more intense and notes were much closer together and required accuracy. When I tried playing the 2nd half of the song with the ride (32 bars straight), I had to record the snare, crash and kick separately, then do a pass with the ride. When I tried to do the ride along side the snare, I nearly punched a hole in my iPad or nearly threw it across the room in fury. Not kidding. Finally, I turned on airport mode, killed all applications, restarted the thing and that helped. But the thing that made the most difference was putting it on a bath towel and laying it flat. I know they use the accelerometer to measure sensitivity, so when I was using the cover to prop it up and play or flat on a glass table, I wondered if that was causing the inconsistency with the snare hits. After putting it on the towel I had MUCH better results. Still, there’s plenty room for improvement, but I’m really encouraged at how good it is now. Not great, but very good.

In the end, I think I’ll actually be able to put ideas down with the iPad for the first time ever. I’ve always just fired up the mixer, played my kit, recorded some guitar, you know – the old fashion way 😉 But considering I’ve put out 3 solid ideas in the past few days, I’d say this actually has a future in music and not just some toy to lower the learning curve for kids who lack the self control to learn how to play a musical instrument.

Wish list so far:

1.  Quantize “selection” – allow me to select a region of recording and select the quantization type

2.  Add a china and a splash cymbal – please.

3.  Allow merging of channels

4.  Let me name my sections – “section A” is a little hard to keep straight

5.  Put Pan over in the mixer controls

6.  Group channel faders – so I can lock the bass/guitar/keys together and move one slider – they would remain relatively the same volume to each other.

7.  Volume and pan throughout the mix – for final mix, I’ve been playing it from the headphone jack into the computer and mixing live for things like fades, solos etc

8.  Assign 1 sound to the entire snare – the areas are a bit small for people who have bigger fingers than Alvin.

9.  Give the option to *not* use the sensitivity per drum/cymbol/keyboard etc.  Sometimes, when i hit the note, I really just want it full blast 😉

10.  Give the ability to move higher up on the guitar neck in Notes mode with no scale selected.

11.  Show the notes on the fret board when a scale is selected.

12.  Allow for setting stomp boxes per recorded piece.  It’s a bit annoying to have to decide whether or not you want it for the entire song on the one guitar.

GarageBand, iPad and Me

[tweetmeme source=”neoRiley” only_single=false]Well, as soon as I saw the GarageBand video for the iPad and them bending strings on a virtual guitar and bragging about sensitivity on the drums/piano, I knew I was going to loose an evening playing with this thing!

GarageBand Mix view of "Genesis"

It didn’t take me long to figure out the layout and controls and the fact that you had to add “sections” to create a tune.  Yes, you can wax poetic and just open it up and play for as long as you like, but it really does make sense to take your composition section by section, especially if you plan to re-use any of your performances later in the tune.  The sliders work fairly well for adjusting volume, and pan is located in a sub panel you access from the top right.  You can also add basic effects that are good enough for doing a scratch track version of your master piece.  You can mute and solo a given track as well as play along with a click.

Listen: Genesis by John Grden

The quantize feature is rather nice and works per-track as well.  Keep the stuff you want sloppy, sloppy, and the neat stuff… neat.  In saying that, the drums worked decently well.  Certainly better than most of the drum machines i’ve downloaded from the app store.  Most of their shortcomings have to do with response time – the more notes you attempt, the slower the response.  And most are just behind the beat you’re playing most of the time anyway – seriously, all of them are like that.  The drums in GarageBand do not lag behind and even go the extra mile in giving you “sensitivity”.  If you listen closely to the song I’ve posted (Genesis), you can hear the soft ghost 8th notes on the floor tom followed by louder accents on the 2 higher toms.  I was actually pleased at how I moved from “oh nice, it doesn’t lag” to “I can actually emulate ‘everybody wants some!’ by Van Halen”.  Why did I pick that song?  I don’t know, but the toms sounded like it and I could play accents, so it was an easy fit.  On top of that, one nice – and very obvious feature – was how the kick drum fires when you hit the crash cymbal.  I have to laugh – it’s one of those “duh” moments and you wonder why nobody else tried doing that.

Stand Up Bass

Another thing I was really happy with was the Stand up Bass play and the Acoustic Guitar picking.  I was able to come up with a nice pattern for the chorus that fits in the background really nicely and if you didn’t know better, you’d figure it was a real guitar – really very nicely done.  The stand up bass was great – I’ve always loved fret-less bass sound and I was able to slide notes and practice good intonation with this thing!  You might hear some of the notes not quite square on the money, but hey – that’s what I would argue as something that makes this feel real rather than digitally baked.

Finally I added some strings and then decided to add some ethnic drums behind the main drums.  So, I played the drums with my fingers on the desk right next to the iPad and put a “Bullhorn” effect on the recording – sounds like a really dead animal skin stretch across a birch Indian drum shell – no?

Anyway, I was pleasantly surprised at the final result and I definitely had a alot of fun putting it together.  I’ve got a ton of music apps on my iPad and have used them as instruments on real recordings, but anytime I tried to record on the iPad or sequence anything, it sucked.  I went in thinking this wouldn’t be much different, but I’m happy to report that someone over at Apple does know a thing or two about UI, User experience and music.  And holy crap, $5?  Seriously, it’s the best $5 you’ll spend as a musician on the iPad.  By far.

Beast Lightmapper : Unity3D

[tweetmeme source=”neoRiley” only_single=false]I wrote a little tutorial on the Beast Lightmapping Engine now in Unity3D over on the blog. It discusses more of what you can do to get quick and dirty bakes and how to essentially use the tool – nothing terribly indepth, but plenty of nice pictures :).

Rotors on top

Ambient Occlusion on shaded side

Molehill might become a fun, usable mountain

[tweetmeme source=”neoRiley” only_single=false]So, essentially, Unity has entered the Flash 3D world.  While 3D api’s (Away3D is doing an excellent job, btw) might provide a way to bring 3D to life via Molehill, Unity brings a kick-ass IDE with it.

And considering that they’re going to support AS3 right out of the bag (which they practically already do with UnityScript) as well as the other languages you can already use (I’ve become a c# fan myself), I’m hoping the resulting project from Unity will allow for maximum integration with flash projects.  I have no idea what output they intend to target (swf or project to yet be compiled by flash), but I do hope they output a project we can work with on the FlashBuilder or Flash IDE side of things.

There have been quite a few discussions about this move, and as usual, there’s 2 camps – the yay’s and nay’s.  I see it as a positive for Unity overall – they’re in the business of making tools, and they do that extremely well, and without a doubt, their developer base will broaden drastically if the resulting Flash is what people expect and need to get their work done (reference Adobe’s output for iPhone compared to Unity’s – case closed).  Case in point, I’d created a Papervision3D component for the Flash IDE a while back – it was downloaded over 450,000 times).  That tells me that people want visual solutions to 3D problems and that there’s a huge potential user base for a good Flash3D IDE.  Bringing Flash3D to the lower common denominators in the development food chain is a “good” thing.

But without a doubt, Adobe is the massive winner here.  IMO, they are walking away with much more of a win.  The one thing I’d complained about early on was that Molehill left 3D to the egg-heads who loved being the only ones who could use it.  As I’ve said before – until you bring it to a state of usability by the masses, it’s pointless and will largely be fruitless.  In other words, I felt that if the new 3D capabilities weren’t put in the hands of us lesser-folk through a common interface and language, it wasn’t going to go anywhere except for demoscene reels on YouTube.

Enter in Unity, and you just fixed all of that.  All of what I was saying and telling them they needed to achieve, they received from Unity3D (Merry Christmas Adobe).   I do wonder how Unity’s physics, Beast Light mapping and shaders will translate, but I’m guessing those are the fruits they intend to dangle in front of even the most hardened Flash 3D developer 😉

Check out the official release statement:

Extracting True Type Fonts from Font Suitcase files

[tweetmeme source=”neoRiley” only_single=false]If you’re using Unity on a Mac, you’ve undoubtedly had to import Fonts for use within your application.  Normally, you would design in Fireworks/Photoshop first, then translated that design to Unity.  After I’ve settled on what fonts I want to use, I open up Font Book and locate the fonts location on my HDD.  Of course, there are plenty of fonts that are stored in a “Font Suitcase” type of container, and as you’ve seen – Unity can’t use them.

The nice thing is, there is a tool to extract (probably several tools) the TTF files stored in Font Suitcases.  This particular one is called Fondu.

  1. Once you’ve downloaded it, extract it.
  2. Open terminal
  3. Change directory to the dir that you extracted fondu in
  4. type: ./configure
  5. type: make
  6. type: make install

This will install fondu and configure it to run.

To get your TTF, use terminal and type:

fondu [pathToYourFontSuitcaseFile]

fondu /Users/NeoRiley\ 1/Documents/RockonFlash/iPhone/Bombs\ Away/production/fonts/Eurostile

Ding. Done.  Now you have whatever TTF files you need for Unity (or whatever use you might have for them)

Have a Bandit day!

Shell Shock – now a +Plus app!

Well, as you can guess from the previous post, I’d been waiting for an app to clear review with the app store – that time has FINALLY come!

Shell Shock is now a +Plus application – you can install and play it on iTouch, iPhone, iPad (iPad, iPhone 3Gs/4, iTouch 3rd Gen only)!  Same price, multiple devices!

Shell Shock now supports retina display as well and the controls have been reconfigured to match across all devices.  The Angle and Power handles have been made larger for easier control as well.


iPhone Main Menu

Level 21!

Level 28!

iTunes Review Process – Pissing me off again

I know I know, Keith’s probably shaking his head right now (because I continue to make apps for the Apple products) and right now I’m beyond pissed off.

I submitted the update to Shell Shock (paid, then free version – in that order) to the review queue on Nov 17th. The FREE version, which was submitted AFTER the paid version, was reviewed in 30 minutes and approved. The Paid version FINALLY went into review last Wednesday ( 2weeks later ) and has been there ever since… IN REVIEW.

Then I received a notice that apple needed more time to review my app. I asked “why?” – and got the customary form letter back. I asked “Why?” again, and again, I got a form letter back.

So I’ve written another email today (another rant) and am now asking for a phone number or someone I can actually “talk” to at Apple. I doubt they’ll pony up that information btw.

Seems crazy that I’m giving them 30% and bending over backwards to cater to “their” ideals when it comes to creating the software, but when it comes to *my* ideals (you know, crazy stuff like approvals in a reasonable amount of time and IN ORDER that they were submitted), they’re ignoring me (duh, what else is new)

So, is there anyone out there with a phone number or email contact that I don’t already know about that I can call and complain? I would LOVE to get someone on the phone 😉


PS> the new version of Shell Shock is now a plus app and has retina display support!

Singletons in Unity3D

[tweetmeme source=”neoRiley” only_single=false]Here are many different ways of doing singletons in Unity3D – 1) the usual way, 2) the “self contained” way and 3) the quick and dirty way 4) for you c# folks, the accessor way.

1. The Usual Way

The usual way is to have a static “GetInstance()” method on the class  that’s attached to a GameObject in the IDE, and check for an instance.  If it exists, pass it back.  If it doesn’t, return a Debug.LogWarning error about how they need to have a GameObject with the class attached to it.

public class MyClass
	private static MyClass instance;
	public static MyClass GetInstance()
		if (!instance)
			instance = GameObject.FindObjectOfType(typeof(MyClass));
			if (!instance)
				Debug.LogError("There needs to be one active MyClass script on a GameObject in your scene.");

		return instance;

2. The “self contained” way

At one point in the Trench Run game, I realized my scene was filled with quite a few GameObjects JUST for my classes. So, I developed the “self contained” singleton.  If it doesn’t find an instance, it creates its own GameObject, attaches the class instance to it via AddComponent() bingo, no need to create a GameObject in the IDE and clutter up your scene at design time.

public class Logger : MonoBehaviour
	private static Logger instance;
	private static GameObject container;
	public static Logger GetInstance()
		if( !instance )
			container = new GameObject(); = "Logger";
			instance = container.AddComponent(typeof(Logger)) as Logger;
		return instance;

3) The quick and dirty way

The quick and dirty way is simply that – setup a public static property for the instance, initialize in the Awake() method, attach to a GameObject at design time, done. In code, it’s a little more direct now with:


The setup:

public class MyClass
	public static MyClass instance;
	public void Awake()
		MyClass.instance = this;

It’s been noted in ActionScript that accessing another method outside of the class you’re in is slower than accessing a property.  I have no idea if this is the case with Unity ( I seriously doubt it ), but with my optimization nightmares in Flash over the years, I’m usually doing #3.  Some habits just never go away (or paranoia for that matter)


[**** UPDATED ****]

4. Accessor

The #1 and #2 examples above could benefit from using an accessor rather than a method – Thanks to Cliff Owen for the tip on this

public class MyClass
	private static MyClass _instance;
	public static MyClass Instance
			if (!_instance)
				_instance = GameObject.FindObjectOfType(typeof(MyClass));
				if (!_instance)
					GameObject container = new GameObject(); = "MyClassContainer";
					_instance = container.AddComponent(typeof(MyClass)) as MyClass;

			return _instance;

Then, you’d just as simply as the quick and dirty way access it with: