Wednesday, 11 February 2015

ARDroneSDK 3 from Parrot - finally compiled!

Thanks to suggestion from darryljackman, I tried a different strategy.

The result is all ok for iOS as shown below.

But when I run "./ -t iOS", I always get first 3 failed and the others not built:

I then tried uninstall all tools (git, wget, automake, autoconf, libtool), and reinstall again but using brew.

This time, at least got first 2 working! The "ARSAL" one still failed...

I then check the log, and noticed it's hard coded somewhere and tried to find "ARSDKBuildUtils/Utils/m4/ARSDK.m4" (see green highlighted part), but my directory name is "ARSDKBuildUtils-master" (see red highlighted part) when downloaded from github, and I can see the "ARSDK.m4" file in there (see yellow highlighted part!

After renamed the directory name, yes! Finally got the whole thing compiled ok. That is definitely a lot of work and the SDK is really badly documented.....

Wednesday, 28 January 2015

Not much luck with ARDroneSDK3 from Parrot

Was following information from this link to install the ARDroneSDK3 for the drones released by Parrot on my MacBook, was thinking to compile and deploy the drone controlling app on iOS devices. However not much luck, tried  searching the net but also couldn't find much info.

I ran the "" and as shown below it says "iOS: OK"

But when actually run "./ -t iOS" and after a long wait, the result is as below. iOS: curl, json, ARSAL failed, rest all "NOT_BUILT".

Went through the long list of logs and found lots of errors such as:

Running <xcrun --sdk iphoneos --find llvm-gcc>

Error while running <xcrun --sdk iphoneos --find llvm-gcc>

But I thought from XCode 5 onward no longer uses llvm-gcc??!! according to this link from Apple:

Deprecation and Removal Notice:
Important: Xcode 5 does not support use of the LLVM-GCC compiler and the GDB debugger. Existing projects configured to use LLVM-GCC and GDB will be reconfigured to use the LLVM compiler and LLDB debugger when opened by Xcode 5.

I also installed all the tools mentioned in the ARDroneSDK3 document: git, wget, automake, autoconf, libtool, rpl. Even installed brew, but still not working.... quite frustrating...

[Update 11/Feb/2015]
Finally got it compiled ok, please see this post for further details.

Friday, 9 January 2015

Using SceneKit in Swift playground for the first time

Happy 2015 everyone!

Was playing with "SceneKit in Swift playground" for the first time by following David's answer for this stackoverflow question the other day. However it was quite frustrating as nothing seem to work.

David added new comments about enabling "Run in full simulator" later, which I tried, but still can't see the 3D object....

Strange.... Was stuck for a while, then I noticed on the upper left hand side window of the image David posted (with the 3D red donut) has the same icon as "Show the Assistance editor" (the one with a suit and bow tie).

Clicked on it, and it magically appeared on the screen and starts spinning! Yeah! Why does Apple have to make it so difficult??!!

However, sometimes it just crashed for no reason when I played around with a few parameters, keep getting this error...

One more thing, in case it just stuck and wouldn't move, try "Editor" => "Execute Playground" as shown below.

Did some further investigation, as shown in video below, this is what happened:
1) first only runs XCode 6.1, finder, terminal and quicktime player
2) clicked on the playground file, and XCode automatically runs iOS simulator
3) clicked on "Show the Assistance editor"
4) waited for about 20 seconds, and you can see the 3D red donut starts spinning in both XCode and simulator.
5) The quality of the image in simulator is quite awful as it keeps flickering, tried turn to landscape, but doesn't make any difference.
6) when clicked on XCode to show the version number, the spinning donut on simulator stops, but the one in XCode still running.
To be honest, the way that it keeps flickering/flashing, is really awful, any idea what have I done wrong? This kind of quality is quite shocking...

In case you wonder, my MacBook Pro is running OS X 10.9.5. It was running everything quite smoothly when it was OS X 10.8.x, after upgraded to 10.9 the performance and stability declined quite badly.

Don't know about you but it seems I also have more XCode 6 crashes than XCode 5...  Apple, can you please slow down a bit and focus more on the quality rather than fixed annual release schedule? Quite agree that the quality of Apple software is getting worse in every release....

Let me know if you found other tricks, good luck and have fun!

Thursday, 13 November 2014

We need this feature in XCode simulator

Was watching this video from Microsoft  by Daniel Moth about the new "Visual Studio Emulator for Android". Quite impressed by the way you can drag the red dot and move your device in different direction/angle in the simulated 3D space and the application running on the device will receive relevant data accordingly. We need this feature in XCode!!

Thursday, 6 November 2014

Have you integrated Everyplay to your SpriteKit game yet?

Was wondering around on the net looking for ideas a few days ago, and accidentally saw this "Everyplay Github" page talking about "Add SpriteKit example for iOS SDK 1.7.5" - this is definitely something new to me. Remember back in mid February this year, in this post I wrote about Everyplay supports Cocos2D and Unity, but not SpriteKit yet, looks like this has changed!

I downloaded the iOS sample, which is basically the basic SpriteKit with spinning spaceship example from Apple plus the Everyplay SDK installed. Although a bit old (last updated mid May 2014), it works quite well. I was able to record the whole game play, even played around with the iOS only "Facecam" function - as shown below, users can record themselves using the front-facing camera, which is a very interesting and handy feature for game reviews.

First integration with EveryPlay
After some study of the iOS example, I quickly integrated Everyplay with my SpriteKit based Open Source Piano Tiles game, and it only took me around 20 min, which is amazingly quick and simple! I quickly uploaded a short video as below:

Sound Issue
Wait, Huston we have a problem. How come there's no sound? What's the point of a "Piano Tiles" game without any sound??!! 

I tried another game and this time the background music was correctly recorded. Sound effect was also recorded as well, but strangely only the first time it plays, after that no sound at all --- I am going to write another post on this, as it looks like a bug in the 1840 build.

Compared between the two, and found that the Piano Tiles game was using SKAction to play the sound/music, but the other game was using AVAudioPlayer. So may be Everyplay doesn't support sound/music played by SKAction?

[Update] - Sound Issue Fixed!!
Found that if I import the EveryplaySoundEngine

#import <Everyplay/EveryplaySoundEngine.h>

Then replace all SKAction with the "playEffect" method as shown below, then the music/sound get played and recorded correctly, issue fixed!

[[EveryplaySoundEngine sharedInstance] playEffect:@"SoundFileName.caf"];

How long it takes to process a video?
While analysing the sound issue, I posted my 2nd video using the iOS sample game and shared it. However it's over an hour now, when I view that page from my MacBook, it still says "The video is being processed".... Looks like have to wait a bit longer...

Where is the thumbnail screenshot?
As below, the FAQ section mentioned that Thumbnail "is automatically captured as part of the video recording", but I can't find info about how to get that Thumbnail from their web site. Also sent an email to their support mailbox but still haven't got an answer yet.

Documentation can be further improved
Other than these issues, also noticed it's very hard to find any info about SpriteKit on their web site. The "Documentation" section on their web site only contains a few pages, there's surely a lot things to improve for documentation.

Everyplay is an amazing, must-have framework for every iOS game!
Don't get me wrong, although I have been quite picky and listed out quite a few problems, compared with the tones of extra benefit it could bring to your game, it's definitely worth a try!

Most of the games can only post a few lines or simple picture on twitter, Facebook or email, with Everyplay, your players can post videos of the WHOLE game play, plus the Facecam function mentioned above, how cool is that?

And it's free! You don't have to pay a cent!

Everyplay is definitely an amazing, must-have framework for every iOS game! Highly recommended!

Thursday, 30 October 2014

Dashland confirmed lost password on iOS 7 devices not recoverable

Supposed to post this a few weeks ago but was too busy with other stuffs, sorry.

Received a confirmation email from Dashland support on 14th October confirming lost password on iOS 7 devices are not recoverable. Well, unless if you have previously synchronised to iCloud "before" the incident, then it could be recovered - but this is not applicable to me....

They did fixed my account and now I did have free premium access. But then there's the pain to reset and get all the passwords first...

What a disaster...

Monday, 13 October 2014

Lost Illustrator CS 6 after OS X 10.9.5 Maverick upgrade

Other than the annoying "running out of battery in much faster pace than before 10.9.5 Mavericks upgrade",  found first major problem after upgraded my MacBook Pro yesterday - my Illustrator wouldn't start!!!

Searched the net and found someone talking about possibly caused by this third party plug-in called "VectorScribe" - which I have absolutely no idea what the hell is that. Followed the discussion to this company called "Astute Graphics" to download a patch. But in the end, instead of fixing the problem, it caused more annoying issues which I will cover later.

Finally found this help page from Adobe about Illustrator crash at launch for OS X Mavericks (10.9). Followed the steps but it then complaints about Java 6 not installed even though I have Java 7 (1.7). After a few more search finally found the fix - just need to installed the Java for OS X 2014-001 and that fixed everything.

I then put back all those third party plug-ins which temporary moved out of Illustrator's plug-in directory. When I restart Illustrator, the annoying Astute Graphics stuff starts - huge popups occupying 50% of the screen as below, one after another - 12 of them in total.

And after clicked on "Continue" it tries to open a web site in Safari, and yes, one for each product as well, 12 of them...

I am definitely going to delete all these annoying plug-ins for sure...

Lesson learned, always check the official web site of the product for assistance first...

Tuesday, 23 September 2014

Dashlane sucks! All password wiped out after update!!

There was an update available for Dashlane in App Store and I just installed it about half an hour ago. Later I need to logon to Dropbox, but when I logged in to Dashlane on my iPhone 5, all the previous passwords I entered disappeared!!!

What the #@%$&^%#@^$%*#&!@^#&!!

No, I did not purchase the pro version which allows syncing to iCloud. But the point is, shouldn't there be a warning or something like that before an update been installed??!!

Dashlane sucks! How dare you call yourself "the world's best password manager"?

Will move to another password manager that doesn't wipe all your data without warning when there's an update.

Note: Mine is iPhone 5, still running iOS 7.1.2

[Update 1 - 24/Sep/2014]
Received this email from Dashlane today, so looks like they are working on a fix. My other concern is, not knowing that the data are still on the device, I actually added a few more records in there while testing, some contains overlapping data. Wonder if that's going to cause any problem?? Can't do much but to wait and see then...

[Update 2 - 24/Sep/2014]
Have a look at the comments section of this dashlane blog update to see how many frustrated customers facing exactly same issue like me...

I also submitted my concern there, but probably because I mentioned this blog plus this post, it's not showing up on their blog. Like my complaint, wonder how many more complaints were not shown on their blog just to make it looks like only "a few" customers were impacted....

[Update 3 - 30/Sep/2014]
Received another email as below, still not much progress.....

[Update 4 - 13/Oct/2014]
Received this email on 3rd October saying the problem will be fixed just by installing the latest update, and will upgrade my account status to free Premium for life.

Well, guess what? I installed the update on my iOS 7 iPhone 5, and my data still not recovered. I tapped on "Go Premium" button, and it still asked me to pay $37.99 for 1year, $64.00 for 2 years..... Where's my "free premium for life"??

[Update 30/Oct/2014]
Please see this latest post for update of the Dashlane issue.

Monday, 22 September 2014

Can't start development on iOS8 yet :-(

Got hold of a colleague's iPhone 6 at work today, just want to see how my games look like in the bigger screen size, plugged it in and XCode says..... iOS 8 not support!! What the....

Well, same story as last time when iOS 7 was released... Have to upgrade XCode to XCode 6 first, and before that have to upgrade to OS X 10.9 first..... Unfortunately I have been forced to upgrade everything again. Last time I have to pay for OS X 10.8 and at least this time OS X 10.9 is free..... Thanks Apple!

Any of you still waiting for the iPhone 6? Not me. After the bad battery + sleep/wake button issue with my iPhone 5 (plus other experience with latest, greatest, new released software/hardware products...), I prefer to wait for iPhone 6 version 1.1+, no rush, Christmas is still months away.

Also heard about the huge free space requirement for upgrading from iOS 7 to iOS 8, might start with the good old iPad 2 first... Wish me good luck...

[Update 24/Sep/2014]
Another reason I don't like Ver 1.0 of new products: see this video from Bloomberg Business Week.

Wednesday, 10 September 2014

iPhone 6 event keynote viewing on doesn't work this morning?

Was trying to view the iPhone 6 event keynote from this morning around 6:30am Sydney time using Safari on my iPhone 5 through Wifi. But it crashes every time I tried, after the 3rd crash I just gave up. In the end, have to visit to have a look at the "cut-down" versions of much shorter videos - at least theirs won't crash!

Have seen quite a few reports about problem with Apple's iPhone 6 event live stream. Not sure if what I experienced is also similar issue but it's certainly very, very, very disappointing.

Just tried again around 11pm Sydney time, and now it all works perfectly. Looks like Apple certainly still have some technical issues to be resolved for handling huge traffic volume during major events like this...

iPhone 5 replaced

Went to Apple store last Friday and got my iPhone 5 replaced with a refurbished one which looks brand new.

Although there were reports about some iPhone 5 not been fixed/replaced by Apple, mine was replaced without problem. I guess it might be because (1) mine was also eligible for the sleep/wake button replacement, (2) I experienced an instant battery drop from about 80% to 0 around 2 weeks ago.

The service was quite good and only took about 30min, much shorter than expected. I was really worried about the data, and did 2 backups before visiting Apple store.

Surprisingly everything back to normal quite smoothly after data restored from iTune. Only issue I had was as below. Because  iTune tried to restore all the games/apps I purchased before, there were 195 apps to be installed and iTunes shows it's "Over Capacity by 147.6 MB"!! I have to manually delete quite a few old games/apps during the restore.

[Update 26/Sep/2014]
A slight correction, I later found that all previous PDF and other documents I manually added to iBook through email or dropbox disappeared, plus all test apps I installed from XCode also disappeared.

Don't understand why iTune doesn't backup these 2 areas..... That is something you have to be aware of before restoring from iTune.

Wednesday, 27 August 2014

How to create a "cross" (or "plus") shape spinning object with Sprite Kit Physics?

Was following the example in this Free PoBo site, but want to create a "cross" (or "plus") shape instead of just a seesaw.

Uploaded a small test project here, basically it creates a scene as shown below, some seesaws with one of them replaced by the cross thing I tried to put it.

When you tapped on anywhere on the screen, you will either create a small ball or square box which will drop down from where you tapped. When the object hits the seesaw it spins as expected.

Problem is, the cross object doesn't always spin as expected - only when the object hits the middle green circle of the cross shape object, then it will start spinning. Otherwise the object just drop through the blue area as if it doesn't exist. Wonder what have I done wrong??!!

This is how the cross been added in the code:

        float wWidth = 100.0f;
        float wHeight = 10.0f;
        [self addCross:CGPointMake(self.frame.size.width*0.75f, self.frame.size.height*0.60f)


-(CGMutablePathRef)getCGMutablePathRef:(float)ww thickness:(float)tt {
    CGMutablePathRef boundingPath = CGPathCreateMutable();
    float halfTT = tt*0.5;
    CGPathMoveToPoint(boundingPath, NULL, halfTT, halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT+ww, halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT+ww, -halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT, -halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT, -halfTT-ww);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT, -halfTT-ww);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT, -halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT-ww, -halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT-ww, halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT, halfTT);
    CGPathAddLineToPoint(boundingPath, NULL, -halfTT, halfTT+ww);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT, halfTT+ww);
    CGPathAddLineToPoint(boundingPath, NULL, halfTT, halfTT);
    return boundingPath;

-(void)addCross:(CGPoint)pos game:(SKScene*)game  whipWidth:(float)whipWidth whipHeight:(float)whipHeight {
    SKSpriteNode * anchor = [SKSpriteNode spriteNodeWithColor:[UIColor clearColor] size:CGSizeMake(1, 1)];
    anchor.position = pos; = [NSString stringWithFormat:@"whip_anchor-%d",idNumber];
    anchor.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:1];
    anchor.physicsBody.affectedByGravity = false;
    anchor.physicsBody.dynamic = false;
    [game addChild:anchor];
    CGMutablePathRef boundingPath = [self getCGMutablePathRef:whipWidth thickness:whipHeight];
    CGMutablePathRef boundingPath2 = [self getCGMutablePathRef:whipWidth thickness:whipHeight];
    SKShapeNode* polygon = [[SKShapeNode alloc]init];
    polygon.path = CGPathCreateMutableCopy(boundingPath2);
    polygon.physicsBody = [SKPhysicsBody bodyWithPolygonFromPath:boundingPath];
    CGPathRelease(boundingPath2); = @"polygon";
    polygon.lineWidth = 0.01;
    polygon.fillColor = [SKColor blueColor];
    polygon.lineWidth = 0;

    polygon.physicsBody.affectedByGravity = NO;
    [anchor addChild:polygon];
    SKSpriteNode * gear = [SKSpriteNode spriteNodeWithImageNamed:@"ball"];
    gear.size = CGSizeMake(whipHeight+5, whipHeight+5); = [NSString stringWithFormat:@"gear-%d",idNumber];
    [anchor addChild:gear];
    SKPhysicsJointPin* jointPin = [SKPhysicsJointPin jointWithBodyA:anchor.physicsBody
    [game.physicsWorld addJoint:jointPin];


[2014-08-29 Update]
Posted the question on

[2014-09-03 Update]
Was trying different ways of creating the polygon - clock-wise, anti-clock-wise, …etc. Sometimes only the left hand side of the cross works and sometimes the right hand side, sometimes keep getting this "Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid, file /SourceCache/PhysicsKit/PhysicsKit-6.5.4/PhysicsKit/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 122." error similar to this link due to polygon not convex,  quite frustrating.

Finally got it working today by joining the second rectangle to the first one using fixed joint. The code as below:

-(void)addCross2:(CGPoint)pos game:(SKScene*)game whipWidth:(float)whipWidth whipHeight:(float)whipHeight {
    SKSpriteNode * anchor = [SKSpriteNode spriteNodeWithColor:[UIColor clearColor] size:CGSizeMake(1, 1)];
    anchor.position = pos; = [NSString stringWithFormat:@"whip_anchor-%d",idNumber];
    anchor.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:1];
    anchor.physicsBody.affectedByGravity = false;
    anchor.physicsBody.dynamic = false;
    [game addChild:anchor];
    SKSpriteNode * whip = [SKSpriteNode spriteNodeWithImageNamed:@"box"]; = [NSString stringWithFormat:@"whip-%d",idNumber];
    whip.size = CGSizeMake(whipWidth, whipHeight);
    whip.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:CGSizeMake(whipWidth, whipHeight)];
    whip.physicsBody.mass = objMass*0.5f;
    whip.physicsBody.friction = 0;
    whip.physicsBody.linearDamping = 0;
    [anchor addChild:whip];
    SKSpriteNode * gear = [SKSpriteNode spriteNodeWithImageNamed:@"ball"];
    gear.size = CGSizeMake(whipHeight+5, whipHeight+5); = [NSString stringWithFormat:@"gear-%d",idNumber];
    [anchor addChild:gear];
    // extra whip
    SKSpriteNode * whip2 = [SKSpriteNode spriteNodeWithImageNamed:@"box"]; = [NSString stringWithFormat:@"whip-%d-2",idNumber];
    whip2.size = CGSizeMake(whipHeight, whipWidth);
    whip2.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:CGSizeMake(whipHeight, whipWidth)];
    whip2.physicsBody.mass = objMass*0.5f;
    whip2.physicsBody.friction = 0;
    whip2.physicsBody.linearDamping = 0;
    [whip addChild:whip2];
    // join with whip 1 using fixed joint
    SKPhysicsJointFixed* jointPin2 = [SKPhysicsJointFixed  jointWithBodyA:whip.physicsBody
    [game.physicsWorld addJoint:jointPin2];
    SKPhysicsJointPin* jointPin = [SKPhysicsJointPin jointWithBodyA:anchor.physicsBody
    [game.physicsWorld addJoint:jointPin];



Monday, 25 August 2014

iPhone 5 Battery Replacement Program

Have you checked the serial number of your iPhone 5 on Apple's iPhone 5 Battery Replacement Program page?

As shown below, mine is one of the unlucky ones... No wonder some time last week it suddenly dropped from about 80% to 0 and I thought it was dead! Have to wait for a long time for it to be charged.

This is not the first time my phone has issue, remember the previous sleep/awake button replacement program? Mine was in there too....

[Update 10/Sep/2014]
My iPhone 5 was replaced, see this post for details.

Sunday, 24 August 2014

Background color change effect similar to "Spikes"(Don't touch the spikes) game

If you ever played the popular "Spikes"(Don't touch the spikes) game, you will notice that every 5 levels, the background color changed. You can have a look using this YouTube video:

Since background color is controlled by 3 RGB value, I use info from this stackover page to create a "number to binary string converter". Then based on the returned result, add together required value for each R, G, B colour depending on the "0" and "1" of every group of 3 digits.

I have created a test project to simulate the effect at this github repository.

Tuesday, 19 August 2014

Open Source Piano Tiles game published!

After last week's small incident, we finally have our "Open Source Piano Tiles" game published in the App Store!

The game was written in Sprite Kit, and the source is published both as a marketing tool to promote my other games, plus help anyone who might be interesting in learning Sprite Kit or writing his/her own Piano Tiles game.

High level structure is as below and shouldn't be too hard to understand.

(1) What's the difference between the published game and source available for download?
The only difference is the launch image been replaced by simple image as below.

(2) I can't find the link to download the code?
After you clicked on the link (shown far, far below...), as shown highlighted in red below, click on the icon with downward pointing arrow in the upper middle of the screen to download the file.

(3) Under what license was the code released with?
The only condition for downloading the source will be to download all my games as below and play everyone of them for a few times, simple as that! Optionally, please leave a positive comment for me!

(4) I found a bug, what next?
Well done, thanks for that! Please post it as comment below or email me, and I will try to fix it in the next release.

(5) I don't understand why you do xxx this way....
Please post any question or suggestion or further improvements ideas below and I will try to explain it here if possible.

(6) Cut the crap, where is the link?
Alright, assuming you did follow my conditions above and downloaded all my other games, here it is , enjoy!

[Update 24/08/2014]
For those who prefer github, it's also available here