Thursday, December 11, 2008

Google Native Client

OR Changing the web one press release at a time

Google have released a new experimental browser plugin called Native Client that allows embedded application to interact with the operating system. Traditionally browser to OS interaction has been severely constrained for security reasons. Plugins that have attempting to provide more options for interaction have proven to be highly insecure. ActiveX attempted to do this by allowing the user to decide what plugins it trusted but users are generally poorly positioned to make these sorts of decisions. Google's Native Client plugin aims to provide secure interaction by identifying trusted modules for interfacing with the OS. I'm guessing that Google will be making the decisions about what modules can and can't be trusted. The up side is that you can develop an application and know that it will be as secure as the trusted module that is doing the work for you.

A nice feature of this system is that existing applications can apparently be quickly compiled to work with a minimal number of changes:

"As a test, Google ported an H.264 encoder that is about 11,000 lines of conventional C code. To get the encoder to compile and run in Native Client, they only had to add approximately 20 lines of code and modify the Makefile. The resulting binaries are completely portable and can run without requiring recompilation on any operating system supported by the Native Client. "
Safer than ActiveX: a look at Google's Native Client plugin

It's not hard to see that this has the potential to transform the internet (not that old chestnut again). Especially when it's combined with Google's Chrome browser and the growing popularity of Google apps.

Tuesday, November 18, 2008

Web Developer IDE's

Like a very large percentage of the worlds web developers I've been using Dreamweaver as my main Developer IDE for many years. Recently I've started to do some of my web development in Eclipse due to some handy Javascript and PHP plugins. But I still go back to Dreamweaver for CSS and FTP ( there is a plugin for enabling FTP in Eclipse but it needs more time and patience than I have to install all the dependancies). Really I'd prefer to have one application open rather than two so I'm always on the look out for alternative. Consequently, my radar went up when I saw a post comparing Komoda Vs Coda. I'd never heard of either so I started hunting around :

Sunday, October 26, 2008

Flash NumericStepper : Setting the Background Color

Have you ever wanted to customize the appearance of the NumericStepper component in Flash (it's pretty easy in Flex). Specifically I wanted to change the color of the text input area. Looking at the NumericStepper class there is some mention of the upSkin and I tried setting this the way I would normally set a button upSkin but with no effect. So I started looking into how the component is constructed. It shouldn't surprise you to find out that the text in the NumericStepper uses the TextInput component. You can get a reference to this object by using the NumericStepper textField property. The next problem is that the TextInput component offers no direct way to change it's background. It turns out that TextInput uses a TextField to display it's text. You can get a reference to this object using the TextInputs textField property. Consequently to change the background color of a NumericStepper's text you need to access it's textFields textField. It looks like this:

myStepper.textField.textField.background = true;
myStepper.textField.textField.backgroundColor = 0x0F1A2F;

What makes this confusing for me is that the first textField returns a reference to a TextInput and then the second textField returns a reference to a TextField. There may be an easier way to do this and I hope to hear what it is. Perhaps I'm missing something regarding upSkin?

Thursday, October 16, 2008

Perpetual Motion : My New Game

Perpetual Motion Singapore

A few days ago we (myself and the nice people over at King.com) published my latest game : Perpetual Motion. This new game has much in common with my first physics based game : Wheel of Death. In Wheel Of Death you had to arrange props to get the wheel to the goal. Walls, bus and various other obstacles provided variety to the levels. Box2D was used as the physics engine to allow some realistic collision and physics. While I was developing Wheel Of Death I regularly found I was more interested in building perpetual machines with the available props than I was in completing the levels. By perpetual machines I mean a combination of props that cause the wheel to cycle for an indefinite period. It seemed to me at the time that it would be simple enough to "quickly" build this new game as it used much of the engine from the original. To be honest much of the engine from Wheel of Death remains unchanged except for a few enhancements to make it more reliable but as I became more interested in the concept I started to invest more time in refining the user experience (dialog transitions, a world map with each location having a unique landmark and a different background) and introducing instructional elements (numbers to show the sequence of prop interaction). Getting a meaningful scoring mechanism was probably one of the biggest challenges and from the comments on Kongregate I don't think I went far enough in explaining the scoring system. Still I feel Perpetual Motion is a real leap forward from my first game. I hope you enjoy playing it.

Wednesday, October 01, 2008

OzFlex October Meeting : Andrew Spaulding presents CS4

If you didn't make it to last weeks launch of Adobe Creative Suite 4 then you might be interested in joining Adobe's Andrew Spaulding as he presents an "exciting, fast‑paced, developer focused session on Adobe’s latest line‑up of their flagship Creative Suite products, and how they interface with Flex & AIR". This event will be hosted as part of OxFlex's October meetup and will take place at Melbournes Loop Bar from 6.30 PM on Monday 13 October (more details).