Games on iPhone via Quartz Composer?
Todays iPhone related question, which I can hopefully test out this weekend is if we can embed Quartz Composer files in iPhone Safari pages, like we can in Mac Safari and the Dashboard?
(don’t get too excited this screenshot was taken of iPhoney and not a real iPhone)
Most mac users (and probably almost no non mac users) know about QTZ files, the files generated by Quartz Composer.
The Quartz Composer is a free tool that’s included in the dev tools that come with every Mac. It is extremely powerful and I guess the best way of describing it is that you can create super Mac optimized flash like interactive or non interactive media for embedding in applications, web pages, dashboard widgets or for use as screen savers.
If you are a Mac user and haven’t tried it follows Apples’s Quartz Composer Programming Guide and it will get you started in no time.
Apple also has this page Introduction to Quartz Composer Web Kit Plug-in JavaScript Reference, which is all about how you can control a QTZ file via JavaScript.
Due to the nature of Quartz composer files this might very well be a possibility. After all it has Quartz, which is OS-X’s lower level graphic library.
Quartz Compositions is a great repository of user submitted examples that you can play around with. There are also a few games including "Gary Martin’s:http://osx.garycmartin.com/ Asteroids, which I have embedded for test purposes here Embedded QTZ Asteroids to test with my iPhone, when I have one in my sticky fingers.
To embed a qtz file you embed it like this:
<embed type="application/x-quartzcomposer"
src="my_composition.qtz"
id="myComposition"
width="300px"
height="150px"
opaque="false">
</embed>If this works, it will be an amazingly cool way to add real mac like visual effects to your applications. In particular games are obvious applications for embedded QTZ.

Follow me on Twitter
Though without a keyboard or any obvious gaming input device it’s not going to be very playable :)
Another interesting thing to test: does it have Safari’s full SVG support (which is quite good enough to play a bit of SVG tetris).
There was a time when portable game devices only had a directional pad and 2 buttons: A & B. They were fun to play with and some games were more fun than those you play today on PSP and other modern game devices. My point is, you just need to be creative to design simple and fun games based on multitouch, finger flicks and virtual buttons.
The real fun games would come once Apple offered access to the accelerometers, multi-touch, and video camera. The latter may be accessible from QC, but the others would probably need custom code.
Just commenting quickly to say that I’m currently on an iphone and am not able to view the composer files — I get a broken plugin image in its place, which really is too bad. Maybe in a future software update.
awww.
It doesn’t work.
(posted via iphone)
Just tried on my friend’s iPhone – no go. It just displays a missing plugin icon.
quartz composer relies on core image which relies on a gpu for its performance. No gpu on the iphone. So it is not surprising that all of core image isn’t available.
I am making a 2d iphone game. My problem is I need a graphics program that I can use to make my graphics and put them in quartz any ideas?