It’s not officially supported by Apple, it requires jailbreaking your iPhone which isn’t illegal, but removes your warranty.
There’s a lot of misinformation and confusion on this subject.
There are two ways to develop for the IPhone. The first way is to use Apple’s official IPhone SDK, which is the only way to get your app distributed via Apple’s App Store. It is also the only way to get your app onto a non-jailbroken IPhone. This official SDK does indeed run on Intel Mac only. It also costs you $99 per year, for the right to ship your compiled apps onto your (or anyone else’s) IPhone.
Or you can jailbreak your IPhone and use the open-source toolchain, or some combination of open-source tools of your choice. Once the IPhone is jailbroken, you can use gcc to compile for it and then ship your apps to the phone via ssh and scp. This pipeline works from Linux, Windows, PPC Macs, or just about anything you’ve got. You can even compile directly on the IPhone itself.
Legal issues with the latter pipeline are murky, of course. You can find lots of people on the internet–none of them lawyers–enthusiastically espousing arguments for and against jailbreaking. For myself, I will remain neutral on the topic.
So, then I couldn’t use this IPhone support with the official SDK and release my game on the app store even if I’m on an Intel Mac? Or is there any way that this could be supported using Python?
I do plan to support the official SDK using this, so you’ll be able to develop in Panda using Python, then distribute your app on the App Store. But, you’ll need to have an Intel Mac, and pony up the $99.
We can also support the open-source toolchain, for the rest of you.
That’ll be great. This is awesome, great job.
Will you use the IPhone SDK 3.0?
Huh, I don’t know that it matters that much. The particular version of SDK used to compile the engine is surely the smallest part of this whole porting effort. Most of the stuff that Panda brings to the table is outside of the realm of the SDK, anyway–Panda is a 3-D graphics engine, while the SDK and its Frameworks provide fundamentally 2-D operations. If you’re programming in Panda, you probably won’t be using most of the UIKit operations, unless you go out of your way to call them directly (for instance, by using PyObjC or some such).
You could, of course, write your own Objective-C app using the full SDK and all of its interfaces, and also link with Panda to use Panda’s operations only when it suited you. Then you would largely be writing your own app using Apple’s SDK, and using Panda incidentally; and it would be completely up to you which version of the SDK you used.
But, if you wrote an app entirely in Python and Panda, you wouldn’t really see any of the SDK directly.
Hmm, it doesn’t seem like the Cg Toolkit supports the iPhone. We should get GLSL support working.
GLSL not supported on the IPhone either.
Oh, darn. I thought iPhone supported OpenGL ES 2.0 (which supports shaders) but it seems like they only support 1.1.
A bit of news:
the new iPhone 3GS supports OpenGL ES 2.0
Hi, I’m new here… This is fantastic news…
Dare I ask, when do you reckon this capability will be available?
Depends on how intrepid you are, I suppose. You could actually download Panda from the cvs tree and build it yourself (using a special iPhone build configuration), and run Panda3D apps on your phone today. But for a fully-supported turnkey solution, you’ll need to wait at least for the 1.7 release, which is not yet scheduled but will hopefully happen within a few months.
(In addition to the publish itself, there’s also a little more work that still needs to be done in the codebase to make it a complete iPhone solution. Some of this work will overlap with the web plugin effort I’m also working on, so I’ve put the iPhone development temporarily on hold while I continue the web plugin effort full-speed. But the claimed timeframe of a few months still applies.)
Quick reply! …wow, didn’t realise it was that developed? A few months? That’s nothing!
I’m a total noob to all this stuff really, I’ve just been looking for a way of making simple 3D games with my mate who is studying 3D modelling and animation. I looked at Blender but can’t import his 3dsmax models (with animation) properly it seems. I’m learning Python for my web development job, so I looked around and came across Panda! …looks great, and then read this about iPhone deployment, even better!
Nice one! Certainly appreciate all the hard work.
Sweet, looking forward to it. I’ve already started developing 2D games on iphone, but I already have a couple game concepts I’d really love 3D graphics for.
I’ve just checked in OpenGL ES 2.x support to CVS, including GLSL support of course.
It’s highly experimental, but functional (I can apply shaders to objects). Since the fixed-function pipeline is no longer there, we do need a shader generator with GLSL support though.
I don’t own an iPhone, but it seems to work on my PowerVR SGX 530 card of my OMAP 3530-based SoC. =) The iPhone 3GS uses the SGX 520, I believe, which is almost the same thing, but just 2x as slow.
your avatar makes my computer feel 2x as slow.
Can we get more updates from David regarding this? I heard that its stopped do to browser plug in. Can we get update on the plugin as well?
I’ve just changed my avatar.
I can see he’s checking in loads of new stuff to the web plugin every day- most of it even compiles fine on my Linux box.
Too bad there’s no npapi plugin support for Linux yet, I’d love to try it already.
PS. p3dPythonRun.cxx references a “runp3d_frozen.pyd”, how do I make that?
The iPhone support is on hold for now, but it will eventually take advantage of the same .p3d packaged application we’ll be using for web distribution, so it does make sense to wait a little bit for that to be finished. Still, as it is right now, Panda does run just fine on the iPhone, with Python and everything. It does take a bit of an effort to compile for the iPhone, and this is one reason why it will be advantageous to have a p3d-runner already precompiled for the device. (Of course, installing this p3d-runner program on your iPhone will require a jailbroken phone, because Apple doesn’t want you to have apps that run other apps. For those who’d rather not go there, we can still provide the straight-and-narrow path to iPhone development, which will just be a little clumsier.)
I have the following script on my Mac box:
python $DIRECT/src/showutil/pfreeze.py -i direct.directbase.DirectStart -i direct.actor.Actor -i direct.fsm.FSM -i direct.directutil.Mopath -o runp3d_frozen.so direct.showutil.runp3d
.pyd is just the extension on Windows, other platforms will use .so.
Having the runp3d_frozen file isn’t enough, though; you’ll next need the Python/Panda package that it will want to download. I also have this script:
#! /bin/sh cp -v $DTOOL/built/lib/*.dylib ~/p3drun/ || exit cp -v $PANDA/built/lib/*.dylib ~/p3drun/ || exit cp -v $DIRECT/built/lib/*.dylib ~/p3drun/ || exit cp -v $DIRECT/built/bin/p3dpython ~/p3drun/ || exit mkdir -p ~/p3dstage/coreapi/dev/osx.i386 cp -v $DIRECT/built/lib/p3d_plugin.dylib ~/p3dstage/coreapi/dev/osx.i386/ || exit python $DIRECT/src/plugin/make_package.py -d ~/p3dstage -s ~/p3drun -p panda3d_dev_osx.i386 || exit python $DIRECT/src/plugin/make_contents.py -d ~/p3dstage || exit
And then I compile with:
#define P3D_PLUGIN_DOWNLOAD file:///Users/drose/p3dstage
As you can see, there’s a bit of setup work you’ll need to do to play with this locally. Still, I don’t see any reason why you wouldn’t be able to get the panda3d standalone application to compile and run on a Linux box or anywhere else. It might not even be far to get the npapi part compiled on Linux, though I’ll get there eventually, I promise.
Thanks - I was able to run p3dpython with your instructions. No idea how it works, though - does it communicate with the plugin via sockets? How is the XML stuff piped to p3dpython?
After a lot of hacking I was also able to get pfreeze, packp3d and runp3d working. Really neat stuff =)
I recently installed WinXP on VirtualBox (Panda works with 3D acceleration on it) so I’m sorely tempted to try building the plugin.