Posts Tagged ‘flash’

The real reason your iPhone will NEVER get Flash

Sunday, February 21st, 2010

Oh, for crying out loud. If I read one more blog post about why Flash doesn’t work on an iPod / iPad / iPhone I’m going to scream. I bit my lip when the “because the swf format is not open source” comments started. I rolled my eyes when the “it’s because they hate each other” nonsense took hold. Same with the processor hogging / battery life debate. And now I’ve just read a post that argues the fact that roll-over states can’t be implemented on a touch screen as the main reason. The fact that every App on the App store seems to get on fine without a roll-over state and a simple change in approach to flash design would solve it, seems to be too much of a mountain to climb. [Update] Seems Mike Chambers is with me too. Flash designers (myself included at times) have the same attitude to Accessibility, I.e. I would have to change, so it’s not worth it. Each arguement has a valid point some extent but all in all, they are (in my opinion) just pointless finger waving compared to the main issue.

As is customary at this point, on this subject, I seem to have to declare my allegiances. Yes I develop Flash and have for years. But I also have experience publishing iPhone apps and the inner workings of the iPhone development (and deployment) world. I’ve also been coding since 1982. I was there before flash and the iPhone and I’ll be there after no doubt. I’ve seen many things come and go and have a job in a digital agency where I get involved in the inner workings of the business models of certain platforms and content strategies. I like my iPhone, I like Flash, I like Adobe, I like Apple.

Right, that’s that out of the way. What’s my point? The App store model is the ONLY point. So 3 billion Apps have been download, of which an estimated $75million goes to Apple EACH MONTH. That’s profit btw. They didn’t develop the Apps, they don’t have to support the Apps, Apple simply take their 30% of the App revenue to cover ‘making it happen’.

If you want to play a game on the iPhone, you download the App.

If you want to play a game on a PC / Mac, you go to Miniclip or similar and play a Flash game. The ad-funded or Advergame model may not be perfect but it does seem to, just about, keep the internet free.

In fact, if you want to do many things on your PC / Mac, you will probably find a Flash or Java ’something’ for it. Quite literally… “there’s a free App for that”.

Now imagine what would happen to that juicy $75million a month if you just went to a full screen Flash App on a website using Safari. Yep, you wouldn’t pay a thing for a game again.

Apple innovated with music downloads when others were struggling to come up with a model. With the App Store, Apple have also managed to get people to pay for low-level content too. Something not achieved before. Of course they wouldn’t want to allow Flash to punch big, leaky holes in their ever-so-tight monopoly for extending the iPhone’s functionality. I can’t EVER see a point where Apple will let this change unless all Flash content is preceded with an ‘pay now’ popup or micro-payment system or, heaven forbid, Adobe pays a hefty fee each month ($75million?) to offset Apple’s loss in profit.

So it’s not about handbags at dawn, it’s not about something as trivial as a rollover state, it’s (unsurprisingly) about guarding a business model that makes more in a month than most companies make in their lifetime.

I do love the blurring of the edges however. Those ’screw you’ moments like Gordon, completely written in iPhone-browser-friendly javascript that allows simple Flash to be played in the Safari browser. I also like Adobe’s own (rather cobbled together) functionality in the upcoming Adobe Creative Suite 5 to allow Flash to be compiled directly as an iPhone App. For Flash developers, Apple has turned itself into the cliché vision of King Kong, swatting off the annoying advances of desperate attackers determined to find a weakness, and exploit it. Will they succeed? I hope so. Will Apple’s clean, tidy walled-garden get scruffy and diluted? Probably. Will Flash content be on your iPhone any time soon? No.

iPhone app development tips for Flash types

Wednesday, December 2nd, 2009

Just watched Lee Brimlow’s quick demo of Flash CS5 saving out an iPhone app. Watch it!

Now, first things first, we’ve made a few iPhone apps at Digital Outlook already in native Objective C and although I’m nowhere near being even remotely classed as a developer, I have been on a basic iPhone dev course and have spent a good length of time debugging and mildly fiddling with the existing apps we have. I’ve made a few simple apps myself so I’ve got a fair understanding of how it works I guess.

I’ve also go a VERY acute understanding of the process and costs involved in creating a native iPhone app from scratch from within an agency. At the beginning, they said “take a Flash app, budget the coding part, double it and add another half”. Cool. Nowhere near. Without going into detail, it seems iPhone App development isn’t quite as simple as it’s made out to be. Yes, your developer may know Objective C, applying it to the iPhone development environment is another thing. Us Flash guys could only stare on as seemingly simple issues took days and weeks to resolve.

So the fact that the Flash SC5 release will compile to iPhone is immense news for me, us and probably every digital agency and Flash freelancer on the planet. Sure there are things it can’t do. Sure you get a bundled app that you can’t ‘add to’ in the native development environment. Sure you can’t use the camera and a few other api’s. And it may be a bit slower than a native app, but take it from me, I’ll take all of those on the chin for the ability to get a creative idea onto the iPhone and into the hands of the world’s mobile consumers.

I can’t wait for CS5 to drop but in the mean time, here are some of my observations from native iPhone development from my Flash perspective.

  • Objective C may look like AS3 but it works in a whole different way. From declaring variables to having a .h header file to your .m main class files. Don’t even think of using a ‘Trace’ or C ‘Print’ command. Underestimate the differences at your peril… but don’t be scared either. If I can do it, so can you! (No, seriously, I’m not that clever).
  • Debugging already written code is really easy when you know your way way around. Moving graphics, font sizes, swapping sounds, changing text etc. are all pretty straightforward with a simple search to narrow down the location to work on.
  • The assets are held externally to the project, so changing graphics, movies, audio etc. is simple too, just swap out the file and recompile.
  • The graphics are just plain old JPEGs and PNG files, so your designers are more than up to the job. It’s just like a Flash project as far as that goes.
  • If you have time / money, put a rough Flash demo together first. Changing your mind and feature creep during production can be slow and costly.
  • The iPhone development suite is really slick (unlike Android I may add!). The on-screen emulator is great and allows you do test it (with a few exceptions) without needing an iPhone or a developer account.
  • If your app uses accelerometers, cameras etc. the emulator will fall short as it’s can’t ‘emulate’ an accelerometer. You can get around it by installing an app on your phone to transmit the accelerometer data to your mac, then add a little code to your iPhone build to receive the data and substitute the values in the emulator. Here’s an example of screen-capturing the emulator using this technique. See the Accelerometer Simulator by Otto Chrons for more.
  • The icon is VERY important. Make sure you spend time on it. And by the way, the glassy shine and round corners are automatically added to your icon on the phone itself. You can switch the shine off though, but not the corners.
  • If you don’t have them in-house, freelance iPhone developers will charge you anywhere from £250-£500 a day.
  • If you shop around and do your research, you soon find out that the cheap way to get an iPhone app done is to go ‘off-shore’. South America, China and India are all much cheaper than your average LA, London or New York dev agency. However, they do come with the usual health warnings about production values, creative sign-off and time-zone / communication problems.
  • If you have the money and it’s your first app, get someone local to hold your hand and learn from. If not, make sure you have scoped the project within an inch of its life. After the project, budget for an extra half-day for your iPhone dev to explain what he/she did to your Flash dev team. Shame to pay all that money and lose all the knowledge.
  • Memory management is now your problem. You have to allocate memory and release it as you go. This is one of the big areas that Apple check when you submit your app to the App Store. You don’t have to allocate actual memory size as in assembly language, but you do have to ‘manage’ closely.
  • Do register with Apple and get a developer account. You can get the dev environment for free and start compiling but you can’t transfer anything onto your iPhone without a developer license and associated provisioning files.
  • While I mention it, the process to authorise your computer and set up your first app is a bit of a faff. Still not 100% sure I understand it but the instructions on the Apple site are clear enough to get you started.
  • The app submission process is pretty simple and the time taken to get a response is anywhere from 2-4 weeks. I know the guys at Apple and even they can’t affect this process, so don’t ask! However, in general, if your app is basic and doesn’t have any advanced functionality such as external database calls or live data, you go into a ‘less risky’ pool, and are generally through in less time. If you are rejected, you go to the back of the queue.
  • Make sure you look at what everyone else is doing too. Download everything remotely related to compare. Look at the top 3 in each category too, there’s a reason they are there, whether it’s the content, the execution or the user-interaction. It’s all vital knowledge.
  • The ‘Games’ category is the most varied and the most competitive. Before you assume your first app should be a game, consider that it will be up against the EA’s and the Need for Speed’s of this world. If you’re not in the top 20 pretty quickly, you pretty much free-fall until you become all but invisible to the regular browsers.
  • To charge or not to charge? 59p says “Aaaah, hell, why not”. £2.99 says “This better be good or I’ll tell everyone it’s a rip off and rate it 1 star”. Initially, you need to go for ratings, so consider an introductory low rate then change it if you see an appetite and good ratings. It’s easy to change the price on the fly.
  • And finally, if you can wait until April 2010, consider using Flash CS5! :)

Mr. Men Pinball bounces back!

Wednesday, April 29th, 2009

Just noticed that our Mr. Men Pinball game has just re-appeared in the “Hot Games” top 6 on the Miniclip homepage. Considering this game has been around for about 2 years now, that’s fantastic! Not sure of the figures as they’re probably also a little guarded, but I’d expect it to be somewhere up near 40 million game plays by now. Amazing when you consider the population of the UK is about 65 million

That’s the power of a good advergame. Equate that to a traditional media spend on say, Yahoo or the Google Ad Network and the ‘cost per click’ or ‘cost per engavement’ is very impressive on Miniclip or similar gaming sites. People actually spent more time playing the Mr. Men game then the length of an TV episode of the Mr. Men Show! Click through to the Mr. Men Show site was similarly impressive. Double figures where the usual industry average for a click through on a banner is maybe 1.4%.

Obviously, advergames are one of my pet passions and I’ve made a few games before so this is kinda big news yet a big ‘I always told you so!’ moment. I’ll post something more useful in the near future but fo now, enjoy the pinball!

Note the little square bottom right. That’s cool.

Stitched up by my own webcam!

Friday, March 27th, 2009

Another strange webcam experiment! Click the image to launch it.

I take the raw cam feed, find what changes between frames and add a threshold filter to colour the bits that change to a solid red. I then simply loop through the pixels to see if any are red then use the pixel position to draw lines to and from, sampling the original image to get the correct line colour. Completely no use to anyone… but looks nice enough.

A simple Flash 3D engine from my past…

Tuesday, February 10th, 2009

Just trawling through a few old Flash folders on my mac and found this little fella’ sitting there all unloved. Came up with the 3D engine in 1998 using Director and made a quick hack to get it into Flash. It’s not particularly neat, hence why there’s no source posted, but suffice to say the heart of he 3D bit is that old ‘fake-doodle-dandy’ equation…

var x = (worldLens*pointX)/(pointZ+worldScale)+xOffset;
var y = (worldLens*pointY)/(pointZ+worldScale)+yOffset;

Like so…

Launch it to fill the browser

If you really want the code, let me know, but I’m secretly ashamed of it… :)

YouTube problem solved…

Monday, December 1st, 2008

I’ve been blighted, as have many others, by YouTube video appearing blank and simply stating “We’re sorry, this video is no longer available.”.

There have been a couple of suggestions, like restarting your router, hard coding your IP, using an IP tunnel application, turning of Google Web Accelerator and so on. Some suggested it was a YouTube caching issue or an IP problem but it was also a bit random. My own Ducati Exhaust video stopped working while my Halo Soundtrack video was fine. When I’m at work, some of the videos that work at home failed, and vice versa. I use a Mac at home and a PC at work. Both use Firefox but all browsers seemed to do the same thing. All-in-all verry confusing.

However, it turns out it’s none of that. I’ve just updated my flash player from 10.0.2.26 to 10.0.12.36 and all’s well again. While I’m happy it’s all working, it’s also a little worrying that the big media owners and entertainment portals are so reliant on something as ’simple’ as a Flash version issue.

If I was YouTube, I’d make this solution visible on the homepage (that’s if anyone actually visits the homapage). I’m supposed to be clever and if it escaped me, it’ll be escaping a fair few others. My impression of YouTube was suffering if I’m honest, thinking they’d become too big for their architecture to cope with.

But now I can check out all those vidoes of kittens again. Karma restored.

Webcam background removal in Flash

Thursday, November 27th, 2008

If you’re a fan of the EyeToy or you’ve just got You’re In the Movies on Xbox 360, you’ll know what this is all about. How to remove yourself from a web cam image and superimpose you on another background.

The mighty Jop had a bit of a testbed working and I thought I’d get the old brain working again and have a tinker. It’s not pretty code but it’s available below if you’re interested in a few pointers. It’s also not that good, but if it inspires you to do it better (I.e. properly) then it’s done its job.

If the web cam doesn’t initailise. Try this link:

In a nutshell:

1: Grab camera feed

2: Take a snap of the background

3: Use a ‘difference’ filter on them both to fighure out which pixels have changed the most

4: Use a ‘threshold’ filter to remove all the pixels that haven’t changed much

5: ColourTransform the resulting pixels to black

6: Apply a slight blur to help make it less jagged

7: Cache the resulting image as a bitmap (so it can be used as a mask) and put it over a copy of the live feed

8: Cache the live feed as a bitmap and apply the mask

9: And repeat using an interval or similar

Here’s the main function:

function takeSnapshot() {
//grab the cam and render it into a snapshot bitmapData obj
snapshot.draw(output_vid);
}

function checkVid() {
//grab live cam
liveData.draw(output_vid);
// grab snapshot
maskData.draw(snapshot);
// apply difference to 2 images
maskData.draw(liveData, new Matrix(), new ColorTransform(), ‘difference’);
// remove all unchanged pixels. Make them transparent
maskData.threshold(maskData, new Rectangle(0, 0, output_vid.width, output_vid.height), new Point(0, 0), “<=”, (threshVal/100)*0×00ffffff, 0×00000000, 0×00ffffff, true);
// colour what’s left black
maskData.draw(maskData, new Matrix(), new ColorTransform(0, 0, 0, 1, 0, 0, 0, 0))
// Blur to improve quality
maskData.applyFilter(maskData, maskData.rectangle, new Point(0, 0), blurFiltr);
resultData.draw(liveData);
// cache the resulting mask and apply it to the live feed
mask_mc.cacheAsBitmap = result_mc.cacheAsBitmap = true;
result_mc.setMask(mask_mc);

}

Source is here. Have fun!

2 Miniclip launches in a week… Zubo Zurfing!

Thursday, October 16th, 2008

You wait ages then two come along at once! Yep, just 5 days after Corn Pops Challenge was launched, our new baby, ‘Zubo Zurfing‘ has gone live (or Zubo Surfing as Miniclip has it… doh!). It’s very cool to have our games occupying two of the three slots in the Miniclip main promo area!

The game itself is a great achievement. Original gameplay, exciting, high-quality and fun to play. Probably one of the best games we’ve made at Digital Outlook. Big thanks to EA and GoFish for giving us the chance to make it! The aim is to get the 5 Zubo characters across a sound wave. You do this by exploding ’sound bombs’ above and below the sound wave to cause ripples that fling you in the air. Of course, there are baddies, keys and bonuses in there to keep you on your toes.

What would I improve? Simple, more levels! What a great compliment to a game. It’s a great game engine that can ramp up and allow for mini-puzzles and level designs to test your skill. I think 20 levels should do it.

Anyways, I suggest you play it… play it now… and visit the Zubo web site, it’s quite fun.

Beware the Android!

Monday, September 29th, 2008

I had a fiddle with the Apple iPhone developer kit last week and it was a relatively painless experience. I had an app, albeit a useless one, up and running within an hour, like so. Apple applied the same philosophy to their development tools as they did to their consumer-facing products. It was fun, simple and even a Visual C newbie like me could figure the basic out.

Just done the same to Google’s Android developer platform. Wow, what a difference. Where Apple installs lots of applications, tools and nic-nacs to fiddle with, Android can barely bring itself to unzip the scattering of .jar files and nasty looking anonymous files into a snappily named folder “android-sdk-mac-x86-1.0_r1″.

Hmmm ok. Discarding my own “if you need to look at the manual, it’s not very good” philosophy, I followed the ugly-as-hell installation instructions. What a can of worms I’ve just opened. I need to download a third-party development environment such as Eclipse 3.4. I Google it, visit their website but can’t figure out what to download. Eclipse IDE for Java Developers? Eclipse Classic 3.4.1? Don’t know. Didn’t bother… boredom setting in…

Once you’ve installed Eclipse, you also have to install the Eclipse Plugin (ADT) with it’s own set of tecno-babble installation instructions.

So now I’m ready for my “Hello Android” starter experience. I believe the expression in OMFG! How nasty and difficult can they make it?

Ok, what’s my point? My point is the internet exploded because of two things. Creatives and Flash. Before flash, developers used stuff like C++ or HTML. Some used Javascript but on the whole, they smelled of wee and old pastry and knew the names of all the planets in Star Wars. Coders stayed in their cave and designers stayed in theirs. Then designers found a tool they could play with without too much programming. They could make content for the internet that was fun, irreverent, thought-provoking, high quality and cheap. Tradition coders didn’t get involved as ‘Actions’ were too crude to make anything out of. I loved it and so did many others. I made Flash 4 games, sites, I solved problems and people started to see the internet as a fun place rather than a place where games had interfaces made with grey Windows UI buttons. Here’s the first site I ever made in Flash 4 btw, and it ran off text files! :)

The beauty happens when people cross the lines. The epiphany where code and creativity combine to create something greater than the sum of the parts. Content exploded. Games, videos, animations, crazy (and often pointless) websites popped up at an astonishing rate to feed the new demand of the first dot-com boom. I’d been using the web for 6 years before flash came out and in one year, it was astonishing what was happening.

Spool forward a few years and Flash updated its coding engine to Actionscript, then Actionscript 2… and now Actionscript 3. Coders can come to flash from C++, Java etc. and get developing straight away. Unfortunately, flash has started to get too complex for those pioneers of creativity, the bedroom creatives out there. Coders now have a bigger cave to sit in and designers are too busy playing with their iPhones to notice the gap that’s opening up again. Most are too young to know how it ‘used to be’. Those of us that remember know it was a sterile, fractured, dysfunctional and ugly place to be. If someone has an idea, it’s imperative they have the tools to express themselves without barriers. Creativity isn’t just for designers, it’s for everyone. I can’t express how important it is to offer tools to allow those with ideas to create them, to innovate, to inspire and drive the internet forward.

As an example, look at the winners of Android’s $10 million Developer Challenge. I’m sure they’re very clever, but please, these were judged the best in the world!

What Google have offered in this case is embarrassing and depressing. I’m a big fan of a bunch of their stuff but this smacks of slapping their name on someone else’s technology and turning a blind eye to their values. I cannot use their ‘open platform’ as it’s closed to anyone other than hardcore coders. Ok, you can argue that the Apple Xcode Visual C experience is pretty nasty, but the doors are wide open and welcoming. Google has locked theirs, dug a couple of moats and put a huge, angry robot on guard to quickly beat the enthusiasm out of any passer by.

Maybe that’s why they called it Android…

Miniclip Games Arcade widget

Friday, September 19th, 2008

I deal with these guys a lot at Digital Outlook but never actually embedded their Arcade widget… easily rectified. It’s not rocket science, just go here, choose a game and get the code… except the embeddable flash apps are bigger than the ’standard’ 450 pixel width of WordPress (this blog). You can alter the flash tags to be 450 width but it does come out a bit small. Works though…

You can do it to single games too…

Here’s an embeddable promo for a game we did for Mr. Men. Last time we checked it had done 32 million game plays in about a year. Not bad! Why not add a few to the total…

Games at Miniclip.com - Mr Men Pinball
Mr Men Pinball

Activate multiple targets for bonus points in Mr Bump Pinball!

Play this free game now!!