Game Development Community

Universal Binaries are Here

by Paul Scott · in Torque Game Engine · 03/03/2006 (3:21 pm) · 17 replies

Universal binary ( that's a ppc+intel app all rolled up in one neat package ) versions of MarbleBlast Gold and Torque Game Engine are live here on the site. Feel free to go grab this latest Torque Game Engine SDK off your 'My Account' page!

This is not the 1.4.2 point release. We've got a couple of things here & there we really want to clean up before pushing that one. That'll be out pretty soon, I think. But in the meantime, I've seen a number of Intel related compiling probs, so if you have one of the new Intel based Macs, go get the new SDK!

If you don't know whether you have an Intel based Mac, it's easy to find out:
1. Click the apple in the upper left corner of the screen.
2. Choose 'About This Mac'.
3. Look for 'x.xx GHz Intel Core Duo', like this:
static.flickr.com/34/107472146_17b5e4d93f_o.jpg
Share and Enjoy.

/Paul

edit:fixed image url

#1
03/03/2006 (3:42 pm)
Nice one, paul. I hope now that the performance will be on par with the windows version.

Now, all i need is an intel mac... :)
#2
03/03/2006 (6:24 pm)
I know this may sound like a stupid question, but since I installed V1.4 from a installer and not from CVS, how can I update it ?
#3
03/03/2006 (8:13 pm)
Torque 1.4.0 was shipped as a gzipped tarball, ( .tgz ) not an installer.

Since you've probably made some changes here and there to your Torque installation, you should either:
a) Get the new SDK, and re-implement your changes. This is good if you dont have many C++ Code changes.
b) Unzip TGE 1.4.0u into a new folder, and use FileMerge to compare the new Torque SDK folder, and your old folder.

Since I usually have an enormous number of small changes scattered throughout the codebase, I usually choose option b.

/Paul
#4
03/03/2006 (8:22 pm)
Paul, that is great news, nice work.

Will there be any specific implications for TLK?
#5
03/04/2006 (3:48 pm)
@Paul,

Following your suggestion of comparing the files with FileMerge, that change you made in polyedron.cc :

//  S32 n = (i == 3)? 0: i + 1;
    //  S32 p = (i == 0)? 3: i - 1;
    // to
	   
	  S32 n = ( i + 1 ) & 0x3;
	  S32 p = ( i + 3 ) & 0x3;

didn't make it. Have you figured out if something else was going wrong and decided to maintain the old version ?
#6
03/05/2006 (8:28 pm)
Excellent, now my new macbook isn't so much of a paperweight anymore LOL. Not really, I love this puppy.
#7
03/06/2006 (4:48 pm)
The UB stock version ran OK on my iMac G4 but on my PC it crashed reporting the following error :

Activating the OpenGL display device...
Activating the OpenGL display device...
Cleaning up the display device...
>> Attempting to change display settings to windowed 800x600x32...
Created new window for GL [800 x 600].
Could not find valid pixel format
Failed to set up AGL windowed support.
Activating the OpenGL display device...
Activating the OpenGL display device...
Cleaning up the display device...
Destroying the window...
>> Attempting to change display settings to windowed 800x600x32...
Created new window for GL [800 x 600].
Could not find valid pixel format
Failed to set up AGL windowed support.
Loading compiled script common/ui/defaultProfiles.cs.

But that's because I'm running MacOS X on a Toshiba Celeron M with an intel graphics adaptor ( I guess it's the same the Mac Mini will use )

Now I'll try to merge it with my modified files and see what happens.
#8
03/06/2006 (6:08 pm)
@Bruno: Look man, if you want to run OSX on random x86 hardware, well... Heh, that's between you, God, and Apple.
So, first off, on the bug in polyedron.cc: remember this is 1.4.0u. The changes from 1.4.0 are very very minimal. I've still got a show-stopper bug to quash, before I can boot 1.4.2 out the door.

Secondly, and probably more importantly: you've gotta know we cannot support hardware that Apple does not support.

/Paul
#9
03/06/2006 (8:01 pm)
@Paul,

I'm not complaining at all. Just thought that you might want a report on UBs.
About the polyedron bug, I only reported it cause you said you had commited it to HEAD ( or at least I understood so). Anyway, it's not bugging anymore.

On the unsupported hardware, we've been long spoiled by Apple with a very small number of options that we had to test our programs on. Now Apple opened the pandora box.... But as I said before, I'm not complaining, just reporting.
#10
03/09/2006 (12:01 pm)
@Bruno: Hey man, no worries. Just kinda had to be clear about the support thing.

On the codegen bug: The project file in 1.4.0u is set to build the ppc side with gcc3.3, and the x86 side with gcc4.0.x , in part to avoid codegen bugs, in part to allow cross compiling back to 10.2 on the ppc side. Point is, if you're seeing that codegen bug in 1.4.0u , I need to get on that & fix the underlying problem, whatever it is.

/Paul
#11
03/09/2006 (12:58 pm)
Anyone know what this means in english?
#12
03/09/2006 (4:09 pm)
Translation for Allyn :

Quote:
On the codegen bug:
A bug created by the compiler itself when optimizing the code

Quote:
The project file in 1.4.0u is set to build the ppc side with gcc3.3, and the x86 side with gcc4.0.x ,
Even though the project file (the instructions to build the engine) is one for both the G4/G5 and Intel Macs, it compiles for the G4/G5 (PowerPC, ppc) using the Gnu C++ compiler version 3.3 ( gcc ) while using the version 4.0x for the Intel (x86) Macs.

Quote:
in part to avoid codegen bugs, in part to allow cross compiling back to 10.2 on the ppc side.
Using version 3.3 of the compiler for PowerPcs Macs not only solves some optimization problems, but also allow users running MacOs X 10.2 ( Jaguar ) to run the game.

Quote:
Point is, if you're seeing that codegen bug in 1.4.0u , I need to get on that & fix the underlying problem, whatever it is.
Paul had already fixed the codegen bug in 1.4.0 and it wasn't supposed to be happening in 1.4.0u ( notice the lower case u that stands for Universal Binary ), so he is going to look back in what might be causing it.
#13
03/10/2006 (8:38 am)
Well, i ment whats is this resorce. What is "Universal Binaries"?

But thank you for that translation. lol
#14
03/12/2006 (8:08 am)
Universal Binary is the term used for an application that can run on both the Macs with PowerPcs processors and Intel Core solo or Duo.
#15
05/20/2006 (12:10 pm)
Do you have to have an intel based mac to compile the universal binary, or can it be compiled on a PowerPC mac?

Also, does TGB compile a universal binary as well? I'm running TGB beta2, but I'll upgrade if forced to do so.

If I compile the SDK on an intel based Mac using XCode, will it come out as a universal binary, or do I have to do something special to make it universal? [EDIT] Found the answer to this after more googling. [/EDIT]
#16
05/22/2006 (7:17 pm)
Q1) "Do you have to have an intel based mac to compile the universal binary?"
A1) Nope! You do not need an intel mac to compile a universal binary, ppc and intel machines can both cross compile, as long as you have MacOSX 10.4, and Xcode 2.1+ .

Q2) "Does TGB compile a universal binary?"
A2) Yes. I'm not sure if TGB Beta 2 will, but TGB RC 1 does.

Q3) "Do I have to do something special to make it universal?"
A3) Yes. It's actually a little complex & hairy to get something that will work properly on 10.2 -> 10.4u . The Xcode project files distributed with TGB will take care of this complexity for you, as much as possible. TDN articles on the subject will be created when I have the time & energy to spare.
#17
05/22/2006 (7:26 pm)
Thanks for the info. Sounds like a lot of work, but I'm sure it will be worth it in the end :)