Sony-Ericsson Developer World has released Flash Lite 2.0 Developers’ Guidelines. (more info)
Flash Lite 2.0 for Sony-Ericsson
October 10th, 2007For want of a minus sign
July 19th, 2007It’s amazing what a difference a minus sign can make: it is, in fact, the difference between Winnipeg and Mumbai – at least from the perspective of UTC (or Greenwich Mean Time) offsets. Winnipeg is UTC – 5 hours, Mumbai is UTC + 5 hours. But a bug in Flash Lite has Winnipeg, and every other place in UTC – 5, way over on the other side of the world.
If you want to find out the time zone offset on a device running Flash Lite, you can use:
fscommand2("GetTimeZoneOffset", "timezoneoffset");
If the device supports this particular command, then timezoneoffset is set to the number of minutes between the time zone on the user’s device and UTC. This number would be plus or minus depending upon the side of Greenwich that particular time zone is on. In Winnipeg, since it’s at UTC – 5 hours, GetTimeZoneOffset should return a value of -300.
But, here’s what gets returned for Winnipeg on the various devices I have at my disposal:
| Device | FL 1.1 | FL 2.0 | FL 2.1 |
|---|---|---|---|
| Nokia E65 | 300 | n/a | -300 |
| Nokia 5300 | n/a | -300 | n/a |
| Nokia 6620 | n/a | 300 | n/a |
‘n/a’ means that version of Flash Lite was not tested on that device. In most cases, that version is simply not available on that device. While the 6620 can run FL 1.1, I don’t have it installed and didn’t bother installing it to test this.
(I also tested this on a Nokia 6131, a series 40 device with FL 1.1 pre-installed. It doesn’t seem to support GetTimeZoneOffset at all, so there’s no value in including it in this test. In fact, not supporting GetTimeZoneOffset at all would be preferable to buggy support. GetTimeZoneOffset fails in an interesting way on the 6131: the command appears to return nothing at all. Normally, fscommand2 arguments will return -1 if they’re not supported. Returning nothing means it’s necessary to test not just for -1 if you want to see if an fscommand2 is supported.)
Using the UTC time zone offset to calculate the time in another time zone is admittedly not foolproof: it assumes that the user has set the time zone on their device properly to correspond to their actual local time. Nevertheless, it seems that GetTimeZoneOffset is only reliable on newer devices that run at least FL 2.0.
(Note: you can use the Date object if you’re coding in FL 2.x. But the Date object is not supported in FL 1.1, so if you want to support both 1.1 and 2.x devices, that means using GetTimeZoneOffset.)
(Note2: this post has been edited to correct some time zone mistakes I made in the original post.)
Gaming Habits
February 28th, 2007This is slightly old news, but still interesting: a Nokia gaming habits survey. Perhaps the most interesting stat is that the average length of a mobile gaming session is 28 minutes. Although it’s not clear from the news release, it’s probably reasonable to assume that a ‘session’ could be either playing a single game or multiple different games. Either way, I think this has some interesting implications for developing Flash Lite games.
I think there’s a general conception ‘out there’ that games built with Flash Lite are or should be the gaming equivalent of snack food: quick and easy to produce, cheap, and just as quick and easy to consume. Flash Lite enables rapid development – it’s possible to put together a working prototype of a game in an incredibly short period of time (also, have you seen the code for the ‘hello world’ example program in the J2ME dev kit?) – so Flash would be the obvious choice for the snack food style of game. But also, there is a recognized and legitimate need to fill that snack food void. There is a definite market for the two- or three-minute quick hit game, such as those available through Shockwave Minis.
But there’s no reason why Flash Lite games have to be snack food; they can just as easily be a sit-down dinner. I think this study can help developers make the case that there is lots of room in the market for the longer, more compelling gaming experiences, and as Flash Lite 2.0 starts appearing on devices, it’s that much easier to imagine creating those experiences with Flash Lite.
The other element from the news release that leaped out at me was the finding that 62% of mobile gamers want to share game demos with their friends, and 79% would try out a game sent to them by their friends. So if you go the demo route, there’s an obvious benefit to including in it some way of letting people notify their friends about your demo, or letting them send the demo to their friends.
Update: Wired has a section on “instant entertainment” – entertainment as snack food. – including a short description of a few Wii “microgames“.
Installing Flash Lite 1.1 and Flash Lite 2.0 on the same device
February 23rd, 2007(I wrote this about a year ago, when Adobe was still offering Flash Lite 2.0 for download and most developers were working with S60 2nd Edition devices, which did not have any version of Flash Lite pre-installed. Now that devices are on the market that have 1.1 (or 2.0) pre-installed, this information isn’t really useful to very many people. Also, if you have a S60 3rd Edition device and are installing Flash Lite 2.1 on top of the pre-installed 1.1, you don’t need to go through all these steps. But a lot of people have ended up on the original page that contained this information, so I thought I’d keep it up, in case it’s helpful to somebody.)
In my experience , if you try to install Flash Lite 2.0 on a phone that has 1.1 already installed, 2.0 will overwrite 1.1. However, it’s possible, and relatively easy (once you’ve figured it all out) to run Flash Lite 1.1 and 2.0 on the same phone. Alessandro posted a suggestion on his blog for how to get 1.1 and 2.0 installed on the same phone, and I’m happy to report that it works. I’ll recreate his steps here and add in some extra detail for those who want to try this on their own. Thanks to Alessandro for posting the suggestion, and keep in mind that although this worked out fine for me, you do this at your own risk and Ludicrous Software isn’t responsible if something goes wrong and your phone starts staying out late at night and not calling to tell you when it’ll be coming home.
1. Unsis one of the players on your PC
There are a bunch of programs out there to do this. Unsis requires perl to be installed on your system, and UnMakeSIS has a pretty straightforward GUI. I used Unsis, which created a folder called “system”, and contains subfolders called “apps”, “data”, “help”, “libs”, and “recogs”. If your folder is not called “system”, rename it to that, to make things easier on yourself later.
2. Create a pkg file and 3. replace the UID with another one and make any necessary changes to file names)
Here’s what I slapped together based on the helloworld.pkg file that comes with the Symbian SDK. It probably ain’t pretty, but it works nicely. I called my file “flash2.pkg”. Notice that all of the file paths start with the “system” folder. If you didn’t feel the need to make sure that your folder is called “system” in step one, either change it now, or change the pkg file to whatever your folder is called.
I changed the UID to one of the numbers that had been assigned to me by Symbian. Feel free to use it, or change it to one that has been assigned to you.
; Flash2.pkg
;
;Language - standard language definitions
&EN
;standard SIS file header
;the UID has been changed from its original value.
;feel free to change it to something else if you wish.
#{"Flash2"},(0x10275722),2,0,0
;Supports Series 60 v2.0
;Commented this out because I didn't know if it was necessary.
;If you comment it out, you get a warning that the product may
;not be compatible with your system, and asking if you want to
;continue. Continue.
;(0x101F7960), 0, 0, 0, {"Series60ProductID"}
"systemappssaflash2saflash2.aif"-"!:systemappssaflash2saflash2.aif"
"systemappssaflash2saflash2.app"-"!:systemappssaflash2saflash2.app"
"systemappssaflash2saflash2.rsc"-"!:systemappssaflash2saflash2.rsc"
"systemappssaflash2saflash2_caption.rsc"-"!:systemappssaflash2saflash2_caption.rsc"
"systemdata101fb454.dat"-"C:systemdata101fb454.dat"
"systemdataflash2engine.rsc"-"!:systemdataflash2engine.rsc"
"systemdataflash2ui.mbm"-"!:systemdataflash2ui.mbm"
"systemdataflash2ui.rsc"-"!:systemdataflash2ui.rsc"
"systemhelpsaflash2.hlp"-"!:systemhelpsaflash2.hlp"
"systemlibsflash2.dll"-"!:systemlibsflash2.dll"
"systemlibsflash2engine.dll"-"!:systemlibsflash2engine.dll"
"systemlibsflash2snddec.dll"-"!:systemlibsflash2snddec.dll"
"systemlibsflash2ui.dll"-"!:systemlibsflash2ui.dll"
"systemrecogsrecswf2.mdl"-"!:systemrecogsrecswf2.mdl"
4. Create a SIS using makesisGiven the way the pkg file is written, the pkg file and the “system” folder need to be in the same location. So I had a “test” folder containing the pkg file and the “system” folder. You need to run makesis from within the “test” folder. The command is “makesis -v flash2.pkg”. The verbose option isn’t strictly necessary, but it’s always nice to see what’s going on.
5. Try to install
Should proceed as normal, except for the additional warning about compatibility. The only downside to this is that you’ll end up with two icons on your phone, both called “Flash”, so you’ll have to remember that the silvery one is 1.1, and the blue one is 2.0. I think that in order to make the icon name different, you’d need to recreate the aif file contained in the sis (I think). If anybody has any other suggestions, let me know!