June 2015 Posts

Fixing Unity’s Failed AOT cross compiler error

Fixing Unity’s Failed AOT cross compiler error

While working on Mr Nibbles Forever I have encountered many annoying errors with Unity. None has been more annoying than the dreaded AOT errors I was getting when building for iOS.

I foolishly had gone a while (a few weeks) without attempting to build for iOS. In that time I had added many third party libraries and made changes to much of the code. I decided one day to do a build for my iPad. I fired up Unity on OSX and tried to build and ran into the following:


at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in :0
at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in :0
at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in :0

Ah jeeze, I thought to myself, I have no idea what could be causing this compile error. Unity gives me no information where or why this error is occurring. I have no idea what these third party libraries are doing behind the scenes. Perhaps one of them is interfering with one of the others? They all work fine on my windows / android build. *sigh*

So I ripped out all the third party libraries and tried to build again and surprise surprise the error was still there. So now I was really confused. What was going on, was it something in one my scenes?

So I created a blank scene and set that as the only scene the in game, built again and the error was still there. Now I was really worried, I had made a bunch of changes since the last build, which of those was it? I had no idea and I really didnt want to go line by line and comment out everything I had done.

It was then that I tried to do something strange. Im not sure why but I noticed this but there is now a new compiler option in Unity:


The IL2CPP is the new Unity compiler. Im still not sure why but I decided to switch this to IL2CPP instead of mono and try to build again. Low and hold I got a different error, one with much more information about where the error was happening:

Fatal error in Mono CIL Linker
System.Exception: Error processing method: ‘System.Void Assets.Scripts.Effects.NicerOutline::OnValidate()’ in assembly: ‘Assembly-CSharp.dll’ —> Mono.Cecil.ResolutionException: Failed to resolve System.Void UnityEngine.UI.BaseVertexEffect::OnValidate()
at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in :0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in :0

Well look at that! Its dieing at Assets.Scripts.Effects.NicerOutline::OnValidate() thats great! I now could go back into my code and fix the issue.

The lesson is, if you are getting strange AOT errors, try just switching the compiler to IL2CPP and see what you get, hopefully you will get more info about what is causing the problem.

Mr Nibbles Forever – Getting it done

Mr Nibbles Forever – Getting it done

I talked about this in my last blog post but Mr Nibbles Forever is starting to take shape now. The features have been ready for some time now and the the last update saw 95% of the game’s artwork go in. Basically the game itself its pretty much there apart from bug fixes and polish.

Anyone who has worked with indie games will tell you that making the game is the easy bit, its all the rest that is hard. Its that phase that I am now entering into. There is much that I need to do before I can release the game so I thought I would try to get some goals for the next few weeks so I can plan out the next series of steps and hopefully it will help others who are in a similar situation.

22nd-28th June

1) Design landing page for the game. This is important as I will need a place to put the trailer and to send people who are interested in the game. I have read several good resources on how this page should look. Some examples of other landing pages are: http://www.pixelprospector.com/list-of-websites-and-blogs-from-game-developers/. Once landing page is designed, run it pass some designer friends for help improving it.
2) Pester people for feedback on Alpha 8. I need to get some real-world feedback for the game so I can fix bugs and improve the polish for release 9.
3) Contact some marketing people for help and advice.

29th June – 5th July

1) Do bug-fixing and polish pass of the game. Push release 9 of the game to people for testing and feedback.

6th – 12th July

1) Implement landing page design.
3) Gather feedback from release 9 of the game

13th – 19th July

1) Do bug-fixing and polish pass of the game. Push release 10 of the game to people for testing and feedback.
2) Research and plan the teaser trailer.
3) Construct Press Kit

20th – 26th July

1) Create game trailer and publish to landing page.
2) Contact media and other social networks, point to landing page.

27th July – 2nd August

1) Final bug fix and polish pass.
2) Contact more media and social networks.

3rd – 9th August

1) Release Android version of the game.
2) Contact media and social networks.

10th – 16th August

1) Release iOS version of the game.
2) Contact media and social networks

Well that’s the plan anyways. We will see if its fee sable over the coming weeks. Ill try to stick to it where I can. Given that I can stick to it then hopefully the game should be released in 6-weeks!

Mr Nibbles Alpha 8

Mr Nibbles Alpha 8

Well its been exactly 95 days since my last Alpha release of my mobile game Mr Nibbles Forever which is far too long. I apologise to people who have been asking me for a new version. I took on a few paid freelance projects a few months ago and they took up a whole bunch of time then I decided to take a full time position up in Perth a month ago which drastically cut down my Mr Nibbles development time sadly.

If you follow my public Trello development board however you can see that I have been working in the intervening time, just not as fast as the earlier development:


In total there is something like 70 hours worth of my time that has gone into this release:


Although 70 hours doesnt sound like all that much I think that this release contains more changes than any other. As hinted in the last release and other posts, I now have an artist on the project, Woody Stables who has helped totally transform the in-game backgrounds, the outfits, the effects and many other aspects of the game:


So now there are 13 different outfits in the game which you can win by spinning the wheel. They all look different and awesome but still stick to the same cutesy Mr Nibbles art style. Some of them come with cool and interesting effects as the below video shows:

You will also notice (if you have your sound turned on) that the game also now has a whole bunch more sound effects. That’s entirely thanks to Joe Watkins who I recruited to help out with the audio on the game. I think the audio really lifts the game up and adds so much more value to the different outfits and is often an overlooked but valuable part of games making.

The game really has started to take its final shape in my opinion but there is the problem. At the moment it has mostly only been my opinion of the game which has shaped its development. I have had a few testers play the game throughout its development and im very grateful for that but now its getting to the point where I need to test in earnest.

I am also very aware of the fact that I need to concentrate on marketing the game much more. At the moment the game is only really visible to a small number of people, people who read this blog, people who are members of the facebook page and people who I have met and talked to about the game. If I want the game to succeed and not get swallowed on the App Store then I need to step up my game in that department.

I have been doing a lot of reading about indie game marketing and have discovered some valuable resources. Its a massive daunting task but I have spoken to some other people who have done it and they have given me some great advice which has helped immensely.

So the next few weeks for me will be less about development and more about testing the game and building the things to help promote the game (websites, trailers, presskit etc).

If you would like to try the game out then as usual just send me an email if you are on iOS or send a request to join this google group if you are on Android and ill hook you up!