06 March 2011

Penguinoid on Market

It was hard but I finally managed to upload a fully working version of Penguinoid to the Android Market.



If you read my previous posts, you understood my main problem was key handling....
It's now fixed (I hope) so let's the game spreads all over the mobile world...

See you in some months for the full analysis of the results

BUG : changing stage.displayState break key listener

If you ever call
stage.displayState = StageDisplayState.FULL_SCREEN
on your game, this will break any listener you added throught

NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN,
onKeyPress);

I tried to re-add it listening to FullScreen event, without success...

It's not needed on AIR app, but I share the same code for Web and AIR version.
It's handy when you're online and the player get back to game.

So... only call it if (Capabilities.playerType=="PlugIn") !!

Really Intercept Back key

Following previous post, it seems this way is not fully working on Flex app
It works on AS mobile project but not fully on Flex mobile project.
To make it works, you need to follow the steps defined in SWFHead's post

To resume, you have to override backKeyHandler and provide your own back handling (throught popView)

Grrr.....

08 February 2011

NEVER use Count with SQLite

Let be honest, Flex on Android isn't synonym with "Speed"
Even with a paged array (I won 10sec with it), I was fighting for 2hours with a 15 sec(!) delay before filling a list.

FYI, I'm using a 3000 rows table and id is a key...

If i use
(sql) SELECT COUNT(id) as count FROM mytable
and
(as3) return stmt.getResult().data[0]["count"];
this tooks 15 sec...

If I use
(sql) SELECT id FROM mytable
and
(as3) return stmt.getResult().data.lenght
this tooks 0.4 sec

so NEVER use COUNT!
Google it, you'll find COUNT isn't optimized at all on SQLite

05 February 2011

My games were stolen !

I today discovered a new kind of piracy...

1 month ago I published my (android) games on GetJar.
I planned to publish them on Android Market later (because of the fees).
It's just now impossible :
someone (Jasminstory or his clone integrixx) published my games (which he downloaded from GetJar) on the market, using the same name, the same screenshots, the same icons and even the same UIDs !

Yes, Jasminstory was able to publish air.com.willna.poulpytris from his own...
So, in the future, publish your game ANYWHERE you want to publish them at the SAME time...else someone could do it for you...

You could say "what's the matter? he paid the fees and publish it for you"...but
1/ he was SELLING my free games
2/ he was discovered and so I can't publish my games now, even if they were removed from the market
3/ the air.com.willna.xxx are now with a low profile on the market, few chances to be on the "Top" or "Try them" list now ....

I hope Google will help to solve this issue but it's now clear I won't earn a cent with these games...
so bad...
Nokia bullshit (more on this soon) and now that...
It's not my year, it seems...

20 December 2010

Intercept key event on Android

To exit your AIR android application, you need to call
NativeApplication.nativeApplication.exit();
when user press the BACK button

I see a lot of post on blog/forum which give this line of code
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);

I must say it doesn't work on every use case.
For example, when I change screen, I remove my main sprite then add a new sprite.
If I do that, I 'lost' the input focus. I had to touch the screen to give the focus back.
Unless someone could tell me how to give the focus back (post a comment!), the solution is to use this line of code:
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);

EDIT : this works for AS Mobile project only.
You need to make it like this on Flex mobile project.

28 November 2010

Test touch game w/o a real device is a pain

Some weeks ago, I finished my Poulpytris port for Android (using AIR for Android).
It's pure AS3 so I would like to port it to Nokia's FL4 devices

I think it works, but how could I seriously release a game for a device without real touch tests ?
I tried with Remote Device Access but I don't know if my game is slow or if the web is slow ;) Emulate touch throught Web is almost impossible....

So I think I'll keep this version for me until I got, perhaps, a FL4 enabled device (which I doubt since I'll soon receive an Android based one)
Plus I can't release it since I need to package it in a .sisx file and, so, need a valid IMEI....
why don't they support .nfl on S60 devices ?!!!
It's been so long we're asking for... :(