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:

https://everyplay.com/users/19215547

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!

[Update 04/10/2015]

Please see my latest post about various sound problem with Everyplay in game with SpriteKit after they dropped "EveryplaySoundEngine"...


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 apple.com doesn't work this morning?

Was trying to view the iPhone 6 event keynote from apple.com 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 cnet.com 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)
                  game:self
             whipWidth:wWidth*0.5f

            whipHeight:wHeight];


-(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 {
    
    idNumber++;
    
    SKSpriteNode * anchor = [SKSpriteNode spriteNodeWithColor:[UIColor clearColor] size:CGSizeMake(1, 1)];
    anchor.position = pos;
    anchor.name = [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(boundingPath);
    CGPathRelease(boundingPath2);
    
    polygon.name = @"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);
    gear.name = [NSString stringWithFormat:@"gear-%d",idNumber];
    [anchor addChild:gear];
    
    SKPhysicsJointPin* jointPin = [SKPhysicsJointPin jointWithBodyA:anchor.physicsBody
                                                              bodyB:polygon.physicsBody
                                                             anchor:anchor.position];
    [game.physicsWorld addJoint:jointPin];
    
    
    idNumber++;

}

[2014-08-29 Update]
Posted the question on stackoverflow.com

[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 {
    
    idNumber++;
    
    SKSpriteNode * anchor = [SKSpriteNode spriteNodeWithColor:[UIColor clearColor] size:CGSizeMake(1, 1)];
    anchor.position = pos;
    anchor.name = [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"];
    whip.name = [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);
    gear.name = [NSString stringWithFormat:@"gear-%d",idNumber];
    [anchor addChild:gear];
    
    
    ///////////////
    // extra whip
    SKSpriteNode * whip2 = [SKSpriteNode spriteNodeWithImageNamed:@"box"];
    whip2.name = [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
                                                                    bodyB:whip2.physicsBody
                                                                   anchor:whip.position];
    
    [game.physicsWorld addJoint:jointPin2];
    
    //////////////
    
    
    SKPhysicsJointPin* jointPin = [SKPhysicsJointPin jointWithBodyA:anchor.physicsBody
                                                              bodyB:whip.physicsBody
                                                             anchor:anchor.position];
    
    [game.physicsWorld addJoint:jointPin];


   
    idNumber++;

}


[Update 25/Apr/2015]
The guys at free-pobo.com/waveworks.de are really nice and they provided a new working sample using rotating mills as I request, see further info here. Even have a YouTube video for it!

Really appreciated!


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.



FAQ:
(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


Thursday, 14 August 2014

Open Source game rejected by Apple because of the word "Demo" mentioned in the description

OMG! My Open Source game was rejected by Apple!

Checked the "Resolution Center" and as shown below, it's because of this rule '2.9 Apps that are "beta", "demo", "trial", or "test" versions will be rejected' ... Never heard of that??!!

I guess lots of people are like me who never carefully study and remember each and every rule and policy and whatever clauses and conditions for App submission...

Ok, I reviewed what I entered and have to admit that I did mention the word "Demo" in the description:

"Demo game with full source code in objective-c available on blog URL specified within the game."

But, but, but it's a fully functioning game!.... Well, don't think the chance of arguing and winning would be that high. So I changed the word "Demo" to "Simple" and resubmitted the game, another long week of waiting, damn!

Hope you find this information helpful and none of you ever made the same mistake like me!


[Updated 02-Sep-2014]

See this "Common App Rejections" page published by Apple.

Friday, 1 August 2014

New Open Source Game

We will be releasing a new open source game in the coming weeks, more details coming soon...

Saturday, 24 May 2014

Problem with Game Centre Leaderboard on iPhone 5 and iPad 2 resolved

After my games released, everything seems fine for a while. Then about 2 weeks ago I noticed although the game still works perfectly, the Leaderboard for 2 of the games always say "No Items" as shown below on my iPhone 5, which is a bit strange. But on iPhone 5s and iPad 2, the Leaderboard shows up perfectly.


But if I go to Game Centre, I can still browse through the game list and see the Leaderboard data, and the other 2 games were working ok, so I wasn't too worry about that.


However sometime last week, it changed. As shown below, although it says 67 games at the beginning, after tapped on the "Games" icon at the bottom, it shows "No Leaderboard or Achievements". What the...



A few days ago, it gets worse. As below, it's showing "Not Available" and wouldn't show anything. Note that the phone doesn't have SIM card (hence the "SOS only" message) but it's always connected to WiFi, so definitely no network connectivity issue.

And even other games installed on the same iPhone 5 also showing "No Items" for Leaderboard.

Start searching on the net and found a few others also experiencing similar issue, and got their problem resolved by reset the phone settings.

At the same time, my iPad 2 also have a funny issue with the Game Centre - no matter how I try, it also shows as "sandbox" in Game Centre.

As the iPad 2 is not as important as the iPhone 5, I use it as guinea pig and tried the "Reset All Settings" fix - it works! Other than losing the WiFi password and backend images, no other data were lost - which is one of my concern. Forgot to capture screen shot on the iPad 2 but I did capture the iPhone 5 one, as below, just select the first "Reset All Settings" and wait for it to restart.

After that, all the game Leaderboard/Achievements returned in the Game Centre!

And the Leaderboards for all 4 games all worked now!


Thursday, 15 May 2014

Comparing Nuance with OpenEars

I mentioned I was testing OpenEars in this post, and I also tried Nuance in past few days.

While using both in a quiet room, the response of Nuance seems to be more accurate and the text to speech sound quality is better and more natural. Although it has slight delay as it has to travel back to the server while OpenEars works offline.

Then tried at a noisy train station on 2 separate occassions and the difference is huge! With OpenEars it's almost impossible for it to pick up anything correctly even though I tried to speak as loud as possible - without shouting too loudly as don't want to get too much attention. However, with Nuance, I just need to raise my voice a little and it correctly picked up whatever I said, which is really impressive.

Yes, there are other add-ons available for OpenEars which I haven't tried yet, but even the lowest level of "silver" service level provides lots of things that OpenEars is far, far behind.

There's a small catch with Nuance though, as it's not completely free. For the lowest silver level pricing, it says:

In the production stage, silver service members receive up to 1 million free speech transactions per month per application, after which the cost per transaction is $0.008.


Need to do some calculation - 1 million free speech transactions per month, which is about 33,333 per day. How popular your app has to be to get that kind of volume everyday? After that for $0.008 each, even if your app can get double the amount of transactions and get 2 million transactions per month - about 66,666 per day, with first 33,333 free you will be paying about $267 per day...... Well, I guess if you have an app that's so popular and can generate that much traffic per day, this might not sound a lot, or is it?

Tuesday, 13 May 2014

Ideas learned from line drawing game "Blek"

I remember back in 2011, I created this post talking about not that easy to make a line drawing game. Now, if you look at this tutorial from Ray Wenderlich, you basically got everything covered! How I wish there was something like this a few years back!

One of the main thing for this post, was this beautiful game Blek, in case you haven't heard about it, have a look at this video:


I quite like it, and was wondering if there's tones of flappy bird clones on the market, how come there's no one copying this much better, nicer game? Well, I did found one short video on YouTube talking about Blek Clone on Android, looks like it's in German but the quality was really awful and I was really disappointed (Note: strangely, can't find the video from blogger when tried to embed it to the post??!! please use the link above)

Using the skills learned from the Line Drawing tutorial, I created a small proof of concept demo project. Not finished yet as there's nothing to collide with, and when it hits the border it just stuck there... still got some more work to do, but this kind of "interface" is definitely something worth exploring. The question then, is what sort of game would it be suitable for? No, I am not going to make a Blek Clone, just looking for ideas with this kind of interesting line drawing method.... You draw something, and it will keep repeating again, again and again... Any suggestions any one?


Tuesday, 6 May 2014

Semantic Issue - Use of undeclared identifier 'AcousticModel' error in OpenEars "Using LanguageModelGenerator" tutorial

Was playing with OpenEars for the first time, downloaded the framework, and followed the tutorial to setup the framework but as shown below it failed in the first "Using LanguageModelGenerator" tutorial straight away....what the..... The error is "Semantic issue - Use of undeclared identifier 'AcousticModel' "


Searched the net but couldn't find much info. Later worked out the fix by looking at other tutorials, simply add this line at the beginning and that fixed the problem.


#import <OpenEars/AcousticModel.h>

Monday, 5 May 2014

App Store "Invalid binary" error due to "Improper Advertising Identifier [IDFA] Usage"

Finally, very excitingly submitted my 4 new games to App Store. Surprisingly the status all changed to "Invalid binary" and received an email saying "Improper Advertising Identifier [IDFA] Usage".

Ok, I have to admit I got no idea what the hell is that, so I just answered "NO". Obviously Apple doesn't like that answer....

Did some research on the net and temporarily removed "AdSupport" framework as instructed. Found that it's Google AdMob that's the culprit.

Checked Flurry and AdMob but both doesn't have any updated SDK recently. So I just changed the status in iTunes Connect to ready for binary upload again, this time it automatically selected "YES" for the IDFA question. Ticked the 2 boxes which I think should be relevant and then it works!



Then as shown below, the status is now "Waiting for Review" for all 4 of them. Let's wait and see how long it's going to take this time.




Tuesday, 29 April 2014

iPhone 5 Sleep/Wake Button Replacement Program

Any one heard of Apple's iPhone 5 Sleep/Wake Button Replacement Program ?

Unfortunately, after entered my serial number, as shown below, found that I am one of the unlucky ones.


But after read through the info on the web site, don't think I can survive without my phone for 4-6 days just to get the rarely-used button replaced, NO-WAY!

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

Saturday, 26 April 2014

New games coming soon!

I haven't release any new game for a long time since my previous 2. Have been working very hard in past few months on my 3rd game, well actually, it's 4 games in the same series.

The idea was to make things simple, so I cut the game into 2 part - Classic and Arcade, then as I have 2 designers working with me on this, I let them both have a go with their characters, so that doubles again...:-)

The code and design have both been finalised, just working on the final stage for the iTunes Connect details - working out which image to include, what should be included in the description, which keyword should be used, ...etc. Hopefully can finalise everything in next week or 2.

Wish me good luck and keep coming back for updates!

Cheers!

Sunday, 6 April 2014

Interesting Flappy Bird Tutorial using SpriteKit

Found this Flappy Bird Tutorial using SpriteKit and it works quite well.

Just need to add a few things: score display, music, sound effect, game over handling (currently the bird just disappeared when it died, which wasn't that user friendly), an icon...etc, and it's a fully functioning game!

Found a bug though, although collision detection was added for the ground, it wasn't added for the top of the screen. Which means I can actually fly above all pipes and keep traveling, scoring as many points as I like, until I felt tired, stopped flapping, and the bird fell to it's death...

Any way, it's great fun learning all the different techniques presented by the author. Wonder where did the author get all the images from?

Found another one here Flappy Bird tutorial, which has game score display, plus much better game over handling. Also, although I can also fly over all the pipes, I couldn't get any score as the bird didn't fly though the gap between the pipes. Looks like the second one is a better design!

Monday, 17 March 2014

iOS 7.1 devices not supported by XCode 5.02

Was thinking of upgrading my iPhone 5 to iOS 7.1, after last time's bad experience with iOS 7.0.6 killed my iPhone 5s, I certainly make sure my iPhone 5 been backed up first before the upgrade.

The upgrade went on smoothly, however, I got another issue after that. my XCode won't recognise the phone after the upgrade! As shown below, it shows the version of iOS is not supported! Checked my XCode and found it's on version 5.0.2, looks like need to upgrade XCode as well.


Checked App Store and found XCode version 5.1 available for download. Luckily, the upgrade was quite smooth too. Another issue resolved, back to my development work...

Wednesday, 26 February 2014

Damn! iOS Patch 7.0.6 killed my iPhone 5s !!

After successfully applied the 7.0.6 patch to my iPhone 5 over WiFi, logically I just apply the same patch to my iPhone 5s also through WiFi….. and then it died!!! WTF!

The screen shows this image to indicate I should connect to iTune (photo taken from iPhone 5 after connected the iPhone 5s to cable).


But in iTune it shows the device is in "Recovery Mode" and I was forced to restore the iPhone from backup. Wait, my last backup is more than 2 months ago, does this mean I am going to lose all my data/photo/apps in past 2 moths??!! NO!!!!!!!!!!!!!


Tried to stop it, but it wouldn't let me. Tried switch it off and on again, tried all buttons, holly crap! That's not very user friendly??!! Shouldn't you give me a chance to cancel the update and back up my data first??!!

Sucks! Really sucks! After various attempts I have no choice but to restore from that 2 months old backup and lost lots of stuff….. Stupid patch! And looks like I am not alone : see this link where lots of people having similar issue….

At least I learned a lesson, no longer trust any update from Apple any more, will definitely perform more regular backup - specifically before any update! Plus, may be update from iTune is safer than using Wifi!?




Thursday, 13 February 2014

Everyplay sounds very interesting, but my game doesn't use OpenGL?!

While studying descriptions of other games in App Store, noticed quite a few of them mentioned "Powered by Everyplay", for example, this one from Chasing Yello Friends:

"New video sharing powered by Everyplay, which allows you to show off your high scoring games!"

Did some study on it and quite surprised to find lots of popular games (bad piggies, hill climb racing, …etc) already using Everyplay to provide video play back and sharing function, this is amazing! Imagine your players can easily play back a video of the whole game (recorded while playing the game!) and then share it on the net!

They also have quite a few videos in YouTube, for example this one:


I am really excited about this and quickly signed up and downloaded their iOS SDK. Then I was stuck while trying to follow their tutorial  - the only iOS tutorial is using OpenGL but none of my game uses OpenGL and I don't have an "EAGLView" or "createFrameBuffer" method… Urh…. what now? Tried to search on the net and stackoverflow, but no one mentioned such silly newbie question like mine and I couldn't find any info about this in their Developer's FAQ section either.

Sent an email about this to their support area, let's wait and see what they say…

[Update 14/Feb/2014]

Happy valentines day everyone.

Bad news for me though, as I received email confirming what I don't like to hear - Everyplay requires OpenGL!! It would make every beginner's life easier if they can simply add this info to their FAQ...

Well, may be next time, as Everyplay still works with Cocos2D and Unity, may be can try later if there's any other future game using Cocos2D or Unity. Looks like they don't support Sprite Kit either…. Hmmmmm, that's another factor to consider while choosing between Sprite Kit or Cocos2d for future projects, as the function provided by Everyplay is really cool….


[Update 06/Nov/2014]
Everyplay now supports SpriteKit! See my latest post about this.

Tuesday, 11 February 2014

Getting closer to "seeing other players" in multiplayer game through Nextpeer

Have been working on improving my game with Nextpeer, and the most important feature I like to have, is to be able to "see other players". As shown in the sample screen below, the player can see the status of all other players, making the game more interesting and challenging.


One of the trouble I have is, although I was broadcasting data to the other players, I wasn't able to receive anything at all. Thanks to help from the Nextpeer support guys Alexander Mussafi and others, finally got it working by replacing the calls in AppDelegate to as below, and that solves the problem.
[Nextpeer initializeWithProductKey:NextPeerKey
                                 andSettings:settings
                              andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self
                                                                                                      tournamentDelegate:self]];


What? You game still doesn't have multiplayer capability?! Give Nextpeer a try, you will be surprised how easy it is, and it's free! Plus, with the excellent service from their support guys, any problem of yours will be easily solved in no time! Honestly, I spent a lot more time getting the painful AV Foundation Framework to function properly than adding multiplayer capability to my game. 


One major problem solved, now back to the next one in the long list...

Sunday, 9 February 2014

First encounter with "UI Automation"

Was reading this book called "Test iOS Apps with UI Automation" by Jonathan Penn and I have my first trial of "UI Automation" inside Instrument today and it was quite interesting.


For those who never heard of "UI Automation", it's the trace template called "Automation" inside Instrument. It records your inter-actions with the simulator or the device, and then it creates a JavaScript file which you can later execute and it will simulate all the recorded UI interactions with your iOS application. The idea is, you can then sort of perform quite a lot of "boring" test steps to see if your latest modification caused any problem. Apple has a user guide here, and there's also an example here although it's a bit old.

However I found there's some limitations when using UI Automation with my latest game.

Although it did pick up "most" of the actions I performed on the device: such as tap on a button, swipe up or left, ...etc, occasionally it will miss a few swipe actions - and this makes it quite annoying. As my game relies heavily on user interaction, the execution of the test script failed quite frequently - as if user didn't swipe properly, the following action to tap on an button will certainly fail! I then have to track down which line failed, and manually add the swipe action.


Probably for iOS applications that has fixed buttons/tables would have a much higher success rate with UI Automation. Still recommend everyone to have a play with it, as it might save you lots of time with testing!

Sunday, 2 February 2014

Another SpriteKit game example - also about fighter planes....

Found another nice SpriteKit game example here. However this time there wasn't much details/explanation provided like other tutorials, therefore I am having some difficulties understanding the code and the design/structure.

I like the way how everything been put in it's separate classes, and the way the 2 layers of background cloud been handled, and different emitters been used when the hero fighter was hit to show how serious the plane was damaged.





The only problem is, for some unknown reason, the hero fighter wouldn't move on my iPhone 5 (iOS7). As shown in images above, the hero fighter is always stuck in the middle of the screen.

According to the code, it's using "CMDeviceMotion" in CMMotionManager to detect the roll and pitch of the device to move the hero fighter - by using "physicsBody applyImpulse" method - which is another new thing to me.

Thinking it might be problem with the device, I tried the same game on my iPad 2 (iOS7), it crashed on the first run due to "Main_iPad" storyboard missing. After I copied over an empty "Main_iPad" storyboard from another project, it works. However, still can't get the hero fighter to move at all, very strange.

Compared with the "Airplane" tutorial mentioned before - which uses "CMAccelerometerData"instead, and works on both my iPhone 5 and iPad 2. Suspect there's some problem with the code somewhere. Already left a comment and will wait for the author to help. May be if I can find some spare time, will convert it over to use "CMAccelerometerData" as well…

[Update] 04/Feb/2014

Yes, I got it working!

All I did was:
(1) Remove the following line inside "FighterGameScene.m"

  CMMotionManager *_motionManager;

(2) In "FighterGameScene.h" add an import at the top

#import <CoreMotion/CoreMotion.h>

Then add the following line near the end (before @end). That is, basically move the declaration of "motionManager" from  "FighterGameScene.m" to "FighterGameScene.h"

@property (strong, nonatomic) CMMotionManager *motionManager;

(3) Finally, inside "FighterGameScene.m" change the following lines:

        CMMotionManager *motionManager = [[CMMotionManager alloc] init];
        if([motionManager isDeviceMotionAvailable]) {
            [motionManager setAccelerometerUpdateInterval:1.0/30.0];
            [motionManager startDeviceMotionUpdates];

            [motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue new] withHandler:^(CMDeviceMotion *motion, NSError *error)

to the followings, note that I also removed the 4th line "[motionManager startDeviceMotionUpdates];" as that seems to be duplicate and I don't see that extra line in other examples on the net and books.

        self.motionManager = [[CMMotionManager alloc] init];
        if([self.motionManager isDeviceMotionAvailable]) {
            [self.motionManager setAccelerometerUpdateInterval:1.0/30.0];

            [self.motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue new] withHandler:^(CMDeviceMotion *motion, NSError *error)

As below, now it works on both my iPhone 5 and iPad 2. Before the fix, can only reach top score of 800 as the hero fighter will die after a few crashes (since it can't move!). Now I can get much higher score than that, yeah!




To be honest, I don't really understand why this fixed the problem. And if you look at Chris Grant's comments on his post, it works on his iPhone 5/5s even without the change!?

Would be really appreciated if any of you can kindly explain why this simple change fixed the problem, why it was working on Chris' devices but not mine before the change? Is there some settings in Xcode or the phone that could cause this issue??