View Full Version : Going Mac - Java or PTK?
Now I don't want to start a flame war between devotees but I am curious what the benefits and pitfalls of each method are for porting games to the Mac.
I had been waiting for BlitzMax to come out but it looks like it could be at least into 2005 before that happens and I'm not waiting that long. Here are my needs:
1) Small .exe sizes - my games for Windows are all below 3 MB and I would like to keep it that way.
2) My games are all simple 2D puzzle / arcade games. I have no use for 3D and don't want to venture into it - that will wait for BlitzMax.
3) Rock solid stability!
My concerns with Java are if there would be any strange driver issues - I'm hoping that's only if you use 3D because of openGL - and immense runtime libraries. But I don't think either are an issue for simple 2D games.
My concern with PTK is stability - almost every game I've played that uses it has some sort of "strangeness" that occurs and occasional crashes. Is it the software or the programmers? I'm also not sure how much C++ I need to learn to use it.
I'm starting fresh with only a basic exposure to Java and C++ so the time learning will likely be the same. I learn quickly so I'm not intimidated by either.
Any thoughts - please no arguing - and are there other alternatives available? I'm aware of the Torque engine from Garage Games but then we are into extensive C++ knowledge required and, again, 3D programming. Not to mention the game distribution sizes seem quite large for the content involved.
Thanks! Sad to see these boards go :(
Mark Fassett
07-27-2004, 03:25 PM
You should have posted this on indiegamer.com.... seems most everyone is already there.
As far as PTK goes, it could be your drivers causing the crashes. PTK uses opengl, so if your card and drivers aren't up to snuff, it could be a reason. I do know that there was a texture bug that has recently been fixed that caused issues on some, mostly older cards. It would result in some textures not getting drawn.
As far as how much C++ you need to use it - ask jack_norton. He went from C++ newb to a finished PTK game in a few months (4?). PTK is really simple to use and Patrox is really responsive about fixing bugs that the developers find - usually < 24 hours.
And as far as Java goes, I've heard that Apple has a history of breaking it.
princec
07-28-2004, 02:54 AM
I'm afraid I can't compare Java with PTK having never used PTK, but I can say that the choice isn't really an apples-to-apples sort of choice at all.
The choice to use Java over C++ is probably the real issue.
You'll have no trouble with performance or stability generally, any more so than you will using C++. You'll probably get your game finished much faster in Java. (Super Elvis has taken a combined effort of <200 hours so far from scratch - code reuse in Java is a doddle)
Apple's JVM is actually very stable and very good quality. Standard Java drawing performance on MacOS is abysmal - no h/w acceleration in the current JVM - so you'll be looking at using LWJGL or JOGL (aargh) to get performance.
The JRE contains more useful code than you can shake a stick at too, and it's all generally very easy to use.
Cas :)
patrox
07-28-2004, 03:27 AM
The randomness is due to the buggy version of stuffit expander apple is shipping with the macs. ( stuffit 8.00 )
Upgrade to 8.02 and all the bugs will be gone.
I tried switching to .dmg but it gave worse results, people couldn't download the games at all :( ( the content of the dmg was displayed in their browser instead of launching a download ) so i stuck with .sit
pat.
Jack_Norton
07-28-2004, 03:33 AM
Here I am!
Yes, I passed from Blitz3d to C++ and PTK. Learning C took me about 2 months, after 2 more months, WHILE WORKING FULLTIME as webdesigner I made Spin Around, very simple 2D game.
In February passed to FULLTIME indie as a personal choice (not because I was earning yet a lot). The 18th of April UBM went out after about 2 months of development in C + PTK.
Thanks to PTK easyness, the passage from Blitz basic language was really easy. And I am not an expert C++ programmer yet, I do use mostly only C even now.
So I think that is quite easy to make that passage for everyone...
p.s. now that you'll experiment VC debugger you'll know how bad was the Blitzbasic one ;)
I guess I will probably take some time to give them both a fair shot - thanks for the advice.
nquijano
07-28-2004, 02:15 PM
Few notes on Java on MacOS X :
All MacOS X releases include Apple's JDK, it's part of the OS, hence guaranteed to be there. That means you can keep your download very small for the Mac, since you don't have to ship the runtime with your game
OpenGL drivers are also guaranteed to be there : worst case, your user doesn't have hw acceleration and only the Apple software renderer.
if you want to support all MacOS X versions, you have to target jdk 1.2 if you want to be sure everyone has it
for 10.1, I don't remember if you can update it to 1.3 or not, but you can't count on your users having done so.
Jaguar (10.2) shipped with 1.3, and is updatable to 1.4
Panther (10.3) shipped with 1.4
Don't know about Tiger, as in if they're going for 1.5 from the get go, or if it will be a separate update
iirc, lwjgl, at least the recent builds, need 1.4 (Cas can give you the real dirt on that, it's his baby ;))
JOGL and friends have the same requirement, eg 1.4 and up, iirc.
Java on MacOS X is also integrated with Cocoa, which gives you access to even more code :)
That said, if you're doing crossplatform Java, Cocoa is not an option, unless you do different builds for your supported platforms, which you have to do anyway with LWJGL, or any other JNI using solution.
Then again, the compile once run anywhere has never really been a real reason to use Java ;)
Sillysoft
07-28-2004, 05:42 PM
The above post is a little bit incorrect. All versions of Mac OS X come with a 10.3 JVM. Some versions of OSX have a 1.4 VM.
If you use the 1.3 VM then you can turn hardware acceleration on. The 1.4 VM has no hardware acceleration. I have a 2D game, and it's speed is good enough without using any of the openGL java stuffs, just java2D.
re: the .dmg file showing in the browser. That will happen if your server is not sending the correct mime-type for dmg. It should be application/octet-stream.