Quick update!

We are so close to the open beta. Stay tuned!

Advertisements

AppleScript, mother tongue of Mac’rs

Before you were a Codewarrior addict, later Carbon libraries consumer, then Cocoa, then Obj-c, then iPhone developer, then what!

If you are a Mac user (not developer, being old or new to the business), AppleScript is your friend. In fact, any OSA-based language or “dialect” if I can call it so (such as appscript by Has or some handmade experiments by Phillip Aker). Apple Events. Application Intercommunication. Sounds like simple, but it’s the marmalade (not to talk about glue) of the daily workflow of hundreds of thousands of Mac users.

Come to mind other “experiments”, like “basic” (being Real or MS) or JavaScript for apps (such as Adobe’s apps or Air), but that is just System/App communication. It’s fine, but not in any way a checkpoint.

Although Qilania lives in a Ubuntu-driven server, many automation tasks are done in various “slave” machines, and many of them are driven by AppleScript, specially mirroring and db integration. For example, you can make tiny changes to a SWF file, and see them live in a few seconds. First, on the local server. Then, in the live server. And also changes are propagated to backup disks and so on. Magic under a double-click. Lots of technology involved: network connections, remote servers via ssh or sftp or scp, various desktop applications, etc. And one scripting language to rule them all: AppleScript.

I can ensure today, Sep 10th 2010, there is not programming language to acomplish most of these tasks we solve in a few seconds in Qilania, not in Mac nor in Win or *nix.

AppleScript, the marmalade and mother tongue of all Mac users.

ActionScript 3 madness

Many people in the big corporations thinks now it’s time to move to AS 3 their oldies (I heard of people still using AS 1 code). But seems they are only interested in quick transcodings (concept which isn’t possible, at all, unless we are talking about 10 lines of code).

In Pescados Software we use AS only as a tool, so we moved to AS 3 when we needed it, but allways for new projects. Re-usable AS 2 code was finally thrown, as most of times we found it wasn’t so “re-usable” at all. I think AS 3 is a good starting point to make new “solid” stuff. Although I’m not specially satisfied with the performance and “features” of the newer versions of Flash Player, I think AS 3 is a pretty decent language which many people coming from other programming languages (such as Java or PHP) adopted easilly, and others like us (more in the “design side of Flash”) can adapt-to, coming from the background usages of AS 1 and 2.

Still, from the end-user point of view, I don’t see many advances (watching silly HD videos in Youtube is no more than watching silly videos at all, only to mention one of the best new features of the latest FP versions, quite unrelated to AS 3 at all). If we spend the new power of AS 3 creating special effects (which aren’t so special at all), I will feel like a monkey with a gun. We must evolve and create the web 2.0, before the web 3.0 arrives so soon.

AAA (Adobe Attacks Again) and bugs

CS5, which we could as well call C$5 or C$$. I will take a look to the trials, but I don’t think I will find something interesting for me. I didn’t with CS4.

I’m so much concerned with the performance of the free Flash Player plugin that I’m not interested at all with any new products concerning IDEs, while they support ActionScript 3 (which means CS3).

Now, after years working fine, seems I can’t input my own language’s characters in a Flash text field. I can’t type “cáspita” in Safari or Chrome. Which is a dramatic issue. Now our users can’t play anymore the “Game of Wishes”, where everyone can (could) type their wishes. Not, unless they use plain ASCII in their native language or we rotate 180º and use a different programming language (!).

Also, seems there is some issue with layers (DIV) and Flash, as many sites stopped working fine in both Safari and Chrome (not to mention other browsers with less impact), including King of Kungfu (Facebook) and even Adobe’s own site.

While this isn’t solved (I hope it will), we won’t consider taking a look to CS5, not to talk about the previous CS4.

Certain issues (every app and platform has its own issues) affect so much one’s daily work that, being an old-time believer, you may consider certain alternatives which are doing their own way, such as Silverlight. It’s not that you love one or another. It’s just matters of daily tasks and production. I can’t spend months for Adobe to restore Unicode support or wmode in certain browsers (a long reported issue and still active!), as well as my customers won’t wait for me.

Flash bitmap filters (ie: DisplacementMapFilter, perlinNoise) and CPU usage

I was looking for a way to animate water in qilania (our virtual world) and I found some quick code using the DisplacementMapFilter and perlinNoise, which seems very realistic for our traditional way to animate stuff (more like cartoons), but is a quick and acceptable hack which can actually fit with our design and will save some time to the illustrator in chief.

But seems that kind of scripted animation (should say more “effect” than animation) consumes so much CPU, specially in the SmartFox/OpenSpace environment which uses to be 30fps by default.

After some researching and looking for alternative methods, we decided the fractal noise was looking so nice after all, but we needed some way to save some CPU and RAM for the end user, specially looking towards old machines and architectures. And we found a way to decrease it. This is a very simple tip: decreasing the frame rate. We did it this way (follows pseudo-code):

this.addEventListener(Event.ENTER_FRAME, go);
var nvar:int = 0;
function go(evt:Event):void {
	nvar++;
	if(nvar%3==0){
		// perlinNoise stuff...
	}
}

This way we reduced the filter to 1/3 (that is 10fps for a 30fps project), which saves more than 50% of the CPU at execution time.

It’s still so much, but minimum enough and, after all, we don’t have water in all our maps!

Hope this simple idea can help someone in a future: the simple, the better 😉

Flash against the world

Although I use to make a living from Flash since Flash 4 (learning time) and Flash 5 (real usage time, when AS 1 was born), I’ve never been in the mood to write about the goods and chimes of Flash, as most of times I’ve been forced to agree with the general sense which said that stuff made-in-Flash was crap. Who doesn’t hate Flash intros and banners and nonsensycal fireworks?

Today, in the mature age of Flash (and maybe myself’s professional mature age), I see the cake quite different.

  1. Flash is a plugin, just like the old Java plugin, QuickTime, Windows Media Player or VRML: a way to introduce rich content in a browser.
  2. Nobody demands for a plugin a bunch of features regarding navigability (integration with common browser’s features, such as history, bookmarking or accessibility), except for the Flash plugin.
  3. People in Macromedia (then) and Adobe (now) made a great effort of creativity and enthusiasm in order to introduce in the Flash plugin lots of features, including support for audio, video and 3D. Do you remember when you was forced to install a bunch of things only to hear audio in the mp3 format? Flash supported it. Do you remember when watching a video in the web was sort of chance if you had the codec installed, if available at all for your machine specs? Flash made possible a successful website such as Youtube. Do you remember when people needed something else, from the programming point of view, and AS 2 was born (and yet more AS 3), being a real alternative to today’s so called Web 2.0 and smelly things such as Ajax, which is today a very common technology?
  4. Flash, even being a plugin, offered a bridge to the user’s surfing experience from the beginnings. Wheter you like it or not, being more or less difficult for the developer, you can bookmark a page from Flash contents, access the history, make a Flash movie fully accessible and localizable, make practice of asynchronous communication with the server, get your contents indexed by major search engines and a long catalogue of things you would never expect from a plugin.
  5. Most probably, people who feels anger against Flash, feels anger as well against bad (or low-cost, if you prefer so) web developers. Me and my team can make a full blown rich app driven by Flash -in the client side- in a few days, supporting navigability, accessibility AAA and advanced features (such as databases in the backend). Today, 2010, you are told to make a website with A/V support. You have three days to make it live. Will you rely on WM, QT or Real? Or you will stick with the de-facto standard, codenamed Flash? What about 3D? Do you prefer Flash via Swift 3D, for example, or you will force your users to install whatever plugin?
  6. Bad and low-cost developers still can offer with Flash to their bad and low-cost customers much more than they can offer with their bad and low-cost web knowledge.
  7. Although Flash still offers usually much more features than other plugins (I won’t say “similar plugins”, as I don’t know similar ones), including a brand new OOP programming interface with AS 3 and integration with most if not all of modern technologies, along with the mentioned A/V capabilities, as well as support for 3D, bitmap and vector graphics, camera and micro input, etc… Although Flash offers more and still more, it still offers more again: Flash was exiled from major mobile platforms (specially iPhone, which is a point of reference), but Flash keeps trying and trying. The new betas, with an eye put over the mobile platforms, are performing so fine in the desktop in the first optimization. I believe they’ll keep improving. Stuff in the computer uses to require more and more resources (RAM, CPU, etc.). That’s because we all are forced to replace our computers, mobile phones (and now also TVs —in Spain, at least— with digital TV). And now Flash is in the business of downsampling: more features, less resources. It was time, anyway, and now begun the race. They’ll keep improving. Once more again, we demand from Flash a very high level of performance and optimization we don’t in fact demand to the own machines (nobody seems to blame Apple for creating a 4 GB iPhone or iPod, then very soon the 8GB one, then 16, 32GB, etc., making every new release feel oldies the previous ones). Adobe is making his homework in order to optimize CPU and RAM usage, support multitouch and a very long etcetera in the chain of the —oftenly stupid— needs of the market.
  8. SWF specs are free. We have now many tools —paid and free— to create and compile Flash movies. If you are freak enough, you can even create your own swf-based format and your swf-based flash player. In fact, they DO exist. You can even use your Flash knowledge to create robust cross-platform desktop apps based on SWF (Adobe’s AIR wasn’t the first to make it real, others did it first, creating environments similar to the RealBASIC or Revolution IDE’s and runtimes, such as mProjector, Zinc or the open-source HippoHX… And much more).
  9. Still waiting for others’ answers: universal, cross-platform, localizable, accessible, extensible and with the unlimited level of support of a huge and still-growing community of developers. And, as stated, with the enthusiasm required to make something new every day.
  10. Finally, the market rules. In my personal and tiny market, I never thought I was forced to learn AS 3, coming from AS 1 and 2, as well as I never thought the print shop would never accept as input a 5MB PDF document, instead of a Quark 3 document with a bunch of fonts and images enclosed in a ZIP disk. Today we have market for Flash, as well as yesterday, and a brighting future for the “newborn” AS 3 language, along with all the daily newcome features for us developers and end-users.