May 5, 2010

I recently took part in the Ludum Dare 48 hour game challenge, number 17. Here's my list of blog entries at the Ludum Dare site.

Hovergirl

I didn't finish a game, but it gave me a chance to experiment some more with writing games in pure Javascript in the browser. I consider the final product a reasonable proof of concept of a Sprite() class which uses div tags with background-images. I'll probably develop it some more and put it into jsGameSoup. I really need to do a speed test on various platforms, and between using div tags and canvas.drawImage.

Graphics mockup

Here is a link to the tech demo, which has only been tested in recent versions of Firefox, but probably works in webkit browsers too. The world is procedurally generated using perlin noise on the server side, and a seedable MWS number generator on the client side for placement of trees and stuff.

Final screenshot

Here is a link to the source code. There is a working bzr branch repository in the tarfile, as well as the source code itself.

I recently started working on the multiplayer code for Infinite8BitPlatformer, so hopefully there will be a playable multiplayer demo in the not-too-distant future. What I have working is test-client connecting to the server and getting a unique ID back.

April 30, 2010

It's ridiculous that a Free Software developer like me should be defending one prorietary software maker against another, but that's the point that this whole thing has reached: ridiculousness.

Steve Jobs, April 2010:

I wanted to jot down some of our thoughts on Adobe’s Flash products so that customers and critics may better understand why we do not allow Flash on iPhones, iPods and iPads. Adobe has characterized our decision as being primarily business driven – they say we want to protect our App Store – but in reality it is based on technology issues. Adobe claims that we are a closed system, and that Flash is open, but in fact the opposite is true. Let me explain.

Both are wrong. Flash is a closed system. Apple products are closed systems.

Adobe’s Flash products are 100% proprietary. They are only available from Adobe, and Adobe has sole authority as to their future enhancement, pricing, etc. While Adobe’s Flash products are widely available, this does not mean they are open, since they are controlled entirely by Adobe and available only from Adobe. By almost any definition, Flash is a closed system.

Ditto for Apple products.

Apple even creates open standards for the web. For example, Apple began with a small open source project and created WebKit, a complete open-source HTML5 rendering engine that is the heart of the Safari web browser used in all our products. WebKit has been widely adopted. Google uses it for Android’s browser, Palm uses it, Nokia uses it, and RIM (Blackberry) has announced they will use it too. Almost every smartphone web browser other than Microsoft’s uses WebKit. By making its WebKit technology open, Apple has set the standard for mobile web browsers.

To quote Wikipedia:

"WebKit was originally created as a fork of KHTML as the layout engine for Apple's Safari; it is portable to many other computing platforms."

-- "WebKit" on Wikipedia

It's deeply offensive that Steve Jobs implies that Apple made WebKit technology open. They did not. It is open because KTML, upon which it is based, is Free Software. Forking KTHML was the fastest way that Apple could gain a competitive advantage without doing too much of their own actual work. This is the identical move they made when they took chunks of the BSD licensed FreeBSD and NetBSD operating systems and the Mach kernel to make OSX. Apple have a history of taking the work of other people and using it in their closed systems to make themselves rich. It's incredibly selfish behaviour.

The only person who could truly claim original credit for the 'opening' of so much software these days is the creator of the LGPL and founder of the Free Software movement, Richard Stallman. Almost all of Apple's products up to this point have been compiled with a compiler which Richard Stallman wrote, called gcc.

Adobe has repeatedly said that Apple mobile devices cannot access “the full web” because 75% of video on the web is in Flash. What they don’t say is that almost all this video is also available in a more modern format, H.264, and viewable on iPhones, iPods and iPads. YouTube, with an estimated 40% of the web’s video, shines in an app bundled on all Apple mobile devices, with the iPad offering perhaps the best YouTube discovery and viewing experience ever. Add to this video from Vimeo, Netflix, Facebook, ABC, CBS, CNN, MSNBC, Fox News, ESPN, NPR, Time, The New York Times, The Wall Street Journal, Sports Illustrated, People, National Geographic, and many, many others. iPhone, iPod and iPad users aren’t missing much video.

Nice advertisement. I thought this was supposed to be about Flash, not how great your YouTube application is and how many dead media companies are sucking up to you.

Another Adobe claim is that Apple devices cannot play Flash games. This is true. Fortunately, there are over 50,000 games and entertainment titles on the App Store, and many of them are free. There are more games and entertainment titles available for iPhone, iPod and iPad than for any other platform in the world.

"many of them are free," except in the sense of freedom which implies that you are free to do what you want with something you own. No, those games are very definately not free. They come with the high price of locking you into a system owned by Apple and behaving in Apple sanctioned ways. That goes for users and developers.

Symantec recently highlighted Flash for having one of the worst security records in 2009. We also know first hand that Flash is the number one reason Macs crash. We have been working with Adobe to fix these problems, but they have persisted for several years now. We don’t want to reduce the reliability and security of our iPhones, iPods and iPads by adding Flash.

One word: sandbox. If Google can do it with Chrome, then Apple could do it with Safari. In other words, if your operating system was written correctly, 3rd party buggy plugins and apps should not be an issue. Giving your users the freedom to run any software they like (even if it does contain bugs) is important. Otherwise you risk treating them like children, or like idiots.

In addition, Flash has not performed well on mobile devices. We have routinely asked Adobe to show us Flash performing well on a mobile device, any mobile device, for a few years now. We have never seen it. Adobe publicly said that Flash would ship on a smartphone in early 2009, then the second half of 2009, then the first half of 2010, and now they say the second half of 2010. We think it will eventually ship, but we’re glad we didn’t hold our breath. Who knows how it will perform?

Development takes time. Don't talk to us about slow development, Steve Jobs. A cursory look at Apple's history is enough to see the pot calling the kettle black.

To achieve long battery life when playing video, mobile devices must decode the video in hardware; decoding it in software uses too much power. Many of the chips used in modern mobile devices contain a decoder called H.264 – an industry standard that is used in every Blu-ray DVD player and has been adopted by Apple, Google (YouTube), Vimeo, Netflix and many other companies.

Although Flash has recently added support for H.264, the video on almost all Flash websites currently requires an older generation decoder that is not implemented in mobile chips and must be run in software. The difference is striking: on an iPhone, for example, H.264 videos play for up to 10 hours, while videos decoded in software play for less than 5 hours before the battery is fully drained.

Ridiculous nitpicking. Flash could, and should use hardware decoders. I wonder why they can't, or won't? Oh, that's right, it's because Apple only just openned up that previously closed API. Infact, since then Adobe have indeed put that functionality into Flash.

In other words, more FUD from Steve Jobs.

When websites re-encode their videos using H.264, they can offer them without using Flash at all. They play perfectly in browsers like Apple’s Safari and Google’s Chrome without any plugins whatsoever, and look great on iPhones, iPods and iPads.

That is great, except that H.264 is also not a free codec that anyone can use without worries. It requires licensing, unlike ogg, vorbis, theora.

Flash was designed for PCs using mice, not for touch screens using fingers. For example, many Flash websites rely on “rollovers”, which pop up menus or other elements when the mouse arrow hovers over a specific spot. Apple’s revolutionary multi-touch interface doesn’t use a mouse, and there is no concept of a rollover. Most Flash websites will need to be rewritten to support touch-based devices.

Just like most apps have to be written from the iPhone to the iPad, right? Just like most apps have to be re-written from any other language and framework on the planet, into C/C++/ObjC/Cocoa right? Double standards.

Software needs to be written and re-written all the time. That's not a good reason for sabotaging the people who develop for your platform. If anything you should be helping them by supporting as many 3rd party frameworks as possible.

If developers need to rewrite their Flash websites, why not use modern technologies like HTML5, CSS and JavaScript?

Or modern, open technologies like Objective C and Cocoa and... wait a second, those aren't modern or open, but you still require your app developers to use only those techonlogies. Again, double standards.

Even if iPhones, iPods and iPads ran Flash, it would not solve the problem that most Flash websites need to be rewritten to support touch-based devices.

Could be rewritten like this: "Even if iPads run the same technology as iPhones, it would not solve the problem that most apps need to be rewritten to support a larger screen size." Hippocracy.

We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party development libraries and tools, they can only take advantage of platform enhancements if and when the third party chooses to adopt the new features. We cannot be at the mercy of a third party deciding if and when they will make our enhancements available to our developers.

Total rubbish. Any 3rd party framework which doesn't keep up with the latest innovations will be ditched by developers. In addition, any worthwhile framework will still let you use the features of a specific platform outside of that framework. It's called a function call, but you probably haven't heard of it because Woz wrote all of the function calls for you.

The truth is that there are many wonderful pieces of software out there, like Mozilla Firefox, which use abstraction layers and 3rd party libraries and frameworks so that they run in as many places and on as many platforms as possible.

This becomes even worse if the third party is supplying a cross platform development tool. The third party may not adopt enhancements from one platform unless they are available on all of their supported platforms. Hence developers only have access to the lowest common denominator set of features. Again, we cannot accept an outcome where developers are blocked from using our innovations and enhancements because they are not available on our competitor’s platforms.

Once again, total rubbish. No framework would try to block it's developers from doing something outside the framework for a specific platform. Oh wait, one framework would try and do that and guess who makes it?

Flash is a cross platform development tool. It is not Adobe’s goal to help developers write the best iPhone, iPod and iPad apps. It is their goal to help developers write cross platform apps.

100% true, and laudible. The more places your application runs the better.

Our motivation is simple – we want to provide the most advanced and innovative platform to our developers, and we want them to stand directly on the shoulders of this platform and create the best apps the world has ever seen. We want to continually enhance the platform so developers can create even more amazing, powerful, fun and useful applications. Everyone wins – we sell more devices because we have the best apps, developers reach a wider and wider audience and customer base, and users are continually delighted by the best and broadest selection of apps on any platform.

This paragraph is the truest of the whole thing. Basically there is a frank admission in here that Apple want developers to only work on Apple platforms so that Apple can "have the best apps" and sell more devices. They want to be the only ones to have those apps. They don't want those apps to run anywhere else. The part about developers reaching a wider audience is total rubbish. If you only release on Apple devices you are by definition not going to reach the widest user base you can. Only writing a cross-platform app can garuantee you that. This is also definately not best for users. If you are locked to a particular platform because the applications you use only run on that platform then you lose all freedom of choice. No, there is only one entity that this is really good for, and that is Apple.

Flash was created during the PC era – for PCs and mice. Flash is a successful business for Adobe, and we can understand why they want to push it beyond PCs. But the mobile era is about low power devices, touch interfaces and open web standards – all areas where Flash falls short.

Stupid argument. iPhone OS and OSX are based on the Mach kernel and parts of FreeBSD which is based on 1960s technology. Additionally, HTML5 is slow as hell right now, as anyone who has tried to write a game as a web-app knows.

The avalanche of media outlets offering their content for Apple’s mobile devices demonstrates that Flash is no longer necessary to watch video or consume any kind of web content. And the 200,000 apps on Apple’s App Store proves that Flash isn’t necessary for tens of thousands of developers to create graphically rich applications, including games.

It's not necessary at all, but Apple want to make it impossible. Apple want to dicatate completely what users and developers and can can't do on their platform. Do you want Apple controlling every aspect of your computing life so tightly?

New open standards created in the mobile era, such as HTML5, will win on mobile devices (and PCs too). Perhaps Adobe should focus more on creating great HTML5 tools for the future, and less on criticizing Apple for leaving the past behind.

That would be awesome. If Adobe re-wrote Flash in HTML5 it would be a win for everyone. It would also be a big win for everyone if Apple openned up their platform and allowed developers and users the freedom to use their devices how they please.

They should both stop being such conniving selfish jerks.

April 24, 2010

I am taking part in the Ludum Dare #17 48 hour game challenge this weekend, and hence taking a bit of a break from Infinite8BitPlatformer programming this weekend. Follow me on the competition blog if you're interested! I will be releasing all of the sourcecode from my game at the end of the competition.

Incidentally, I have fixed up many of the Infinite8BitPlatformer bugs that were reported during the pre-alpha, and had some more great contributions from Crispin, such as a spray-can tool for in-game editing and some fun levels. Also last week I finished a bunch of tweaks, features, and bug fixes on the PodSixNet code, so next on the agenda is the multi-player code. Hopefully I'll be able to fit that in around the contract work I have on next week. Exciting stuff!

Anyway, back to the competition.

April 14, 2010

Wow, today marks a huge milestone in the life of Infinite8BitPlatformer, thanks to my friend Crispin. He's written some code which adds a line tool to the existing suite of pencil and fill tools, and he created a level with it. This is the very first substantial code submitted from someone else, and the very first user contributed level, and the game isn't even released yet! In case you can't tell, I am super excited.

This was also the first opportunity for me to experience the proof-of-concept of exploring a level someone else created. I must admit that it lived up to my expectations. Running around in the new level, exploring, and finding items was a genuinely enjoyable experience, and one I can't wait to repeat many more times as the game matures and gets further contributions. Good times.

Thanks, Crispin!

PS The game is currently in pre-alpha testing. If you'd like to try it out, drop me an email and I'll send you the link.

April 6, 2010

Only one of the little robots that I designed survived the 3D printing process. This is because of my inexperience in designing for 3d printing. As you can see from the one that worked out, many of the connecting struts were almost too thin to be structurally sound, and this was the case in the other ones I sent off for printing.

Nonetheless there is something deeply profound and kind of humbling about holding this delicate little robot in my hand. I've spent my whole life creating virtual things - computer programs, graphics, music - and now it is possible to use the exact same skills to produce something who's physical structure may well outlast that of my own. Walking through Roman ruins earlier this year I realised that there is something about hard physical matter that is so important. Seeing a marble carving of some guy's face which has outlasted his original face by so many thousands of years really drove it home.

Last year I also read "Matter" by Iain M. Banks and although it didn't grab me as much as some of his previous books, there was an interesting argument about virtuality from one of his characters. The essence of the argument was that we don't inhabit a virtual universe overseen by some creator or creator race because any sufficiently advanced entity or culture would not allow the terrible things that can happen to sentient beings in our universe, to occur. It's sort of a meta-ethical argument saying that we can't be anywhere other than at the top of the stack of turtles, if the ethics of highly evolved intelligences are always consistent.

On a related note, this blog post makes the case that in software development the execution of an idea is much more important than the idea. I have come to believe that this is true in general. Because we now live in this highly populated and deeply connected age, ideas have become cheap. Real things, done things, executed things, are better than virtual things and ideas.

This decade is going to be fascinating because of the increasing protrusion of the virtual into the real and the modification of the real by the virtual. Bring on the self configuring household ornaments built of programmable nanotech, such as a flower which has as many petals as there are emails in your inbox.

Virtual things are ok, but real things are better.