iDevGames Forums
Intel Mac Speed - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Intel Mac Speed (/thread-3543.html)

Pages: 1 2 3


Intel Mac Speed - igame3d - Jan 20, 2007 01:34 PM

On a monster Windows Box I'm getting 70 to 160 FPS
On a two year old Mac Mini I get 30 to 90 FPS
On an new-ish intel iMac I get 12 to 30 FPS
In parrells I get 7Fps.. yay emulation!

Whats the story with intel Macs?
What has to be done differently to get the speed up?

The program is entirely C, is platform independent, but something is
happening under the hood that makes the game slow as mud on the new Macs.


Here's a link to the game

Check the options for keyboard controls.


Intel Mac Speed - Skorche - Jan 20, 2007 01:41 PM

For starters, it would help if it was a universal binary.

PowerPC binaries have to run under emulation on the Intel Macs. Been stuck under a rock for a while? Rasp


Intel Mac Speed - OneSadCookie - Jan 20, 2007 02:14 PM

You also need to tell us what kind of Intel Mac it is. The Mini, MacBook, and one iMac have Intel GMA 950s, which have no hardware vertex processing, so a heavy vertex load can cause problems for them. There are solutions to that, but you can expect to have to optimize your engine with them in mind.


Intel Mac Speed - igame3d - Jan 20, 2007 02:29 PM

Well thats what I'm wondering.

If the software already supports Intel hardware from the get go, what exactly is the UB deal doing besides duplicating code and setting a flag for the OS not to run the application like junk.

I don't code the thing, so I need some solid facts to explain why we have to go with Universal Binary. Germany is too far away for me to just muscle the programmer into action.

I'm running it on an ATI Radeon Imac, with 128MbVram, you're saying things get worse?


Intel Mac Speed - OneSadCookie - Jan 20, 2007 03:02 PM

There are two kinds of processor -- PowerPC and Intel. Neither can run machine code designed for the other. Apple includes software with Intel Macs called Rosetta which transparently translates PowerPC machine code to Intel machine code, allowing PowerPC programs to run on Intel Macs. This translation is *slow*, and the resultant code is *slow*. A ballpark figure is that MHz-for-MHz of CPU, PowerPC code running on an Intel Mac will be at best 1/3 the speed it is on a PowerPC Mac.

A "universal binary" includes both PowerPC and Intel machine code, allowing the program to run at native speeds on both PowerPC and Intel machines.

"ATI Radeon iMac with 128MB VRAM" isn't a very solid description, but if that's a G5 iMac with a Radeon X600, then yes, an Intel Mac Mini or MacBook has a worse GPU (and almost every PowerPC Mac has a worse GPU).


Intel Mac Speed - igame3d - Jan 20, 2007 05:51 PM

Thanks.
I suspected that was the issue, that explanation should work to motivate an update.


Intel Mac Speed - Taxxodium - Jan 21, 2007 02:47 AM

You shouldn't bother to do PowerPC only projects from now on. Start doing Universal Binaries from now on and all will be fine.

I tested your game on a PowerMac G5 with a GeForce 5200 FX card (64 MB Ram) and I had about 70 fps. Can't test on an intel mac, yet.


Intel Mac Speed - OneSadCookie - Jan 21, 2007 03:44 AM

I just get a gray window on my Intel iMac...

Also, somebody should tell your programmer that "Quit" doesn't belong in the file menu, and hasn't for six years now.


Intel Mac Speed - igame3d - Jan 21, 2007 04:20 AM

OneSadCookie Wrote:I just get a gray window on my Intel iMac...

OneSadCookie Wrote:isn't a very solid description,

What kind of Intel iMac? One with an ATI or one with the POS..er whatever it is.

It might tell you something in console about what went wrong.


Intel Mac Speed - OneSadCookie - Jan 21, 2007 03:46 PM

ATI X1600. I'll check the terminal log later... if I remember Smile


Intel Mac Speed - igame3d - Jan 21, 2007 09:24 PM

Hmm no idea why it would work on my machine and not yours, they are the same hardware, and I've never had to do anything special to get it to run.

Tobi's in the process of getting it UB, 135 errors on the first try.
Fun.


Intel Mac Speed - OneSadCookie - Jan 22, 2007 03:56 AM

Here's the console output; nothing in there looks weird to me:

Code:
-----   OpenGL Fullscreen setup   -----

CGGetActiveDisplayList() returned: 0
Number of active displays found: 1
Picked display 1

Display 1 Information:
Resolution: 1440x900 pixels
Refresh Rate: 0.000000 Hz
Colors: 32-bit (Millions)
Trying to get a valid fullscreen OpenGL pixel format on device...
DMGetGDeviceByDisplayID() returned 0
aglChoosePixelFormat() returned a valid fullscreen OpenGL pixel format on this device!
aglCreateContext() succeeded.
aglSetCurrentContext() succeeded.
Stencil buffer bits: 8
OpenGL Version: 2.0 ATI-1.4.40
GLSL is supported.
GL_ARB_fragment is supported.
Number of texture units: 8
//Loading level



Intel Mac Speed - igame3d - Jan 22, 2007 07:07 AM

Well thats the same exact console spam I get, so technically there is no error to that point.

If I take the Data folder out of the bundle I get a grey screen, but the console spits an error at the level load, which yours doesn't.

If I take the levels folder out it finds the game script but doesn't throw an error when Lua doesn't find the first level its looking for, and I get a grey screen.

Did you by chance play around in the package and not put something back?

Probably what I need you to do is send me your iMac, yeah, thats the ticket.


Intel Mac Speed - OneSadCookie - Jan 22, 2007 01:40 PM

Ah, I bet it's because I have a case-sensitive disk.

Folks, this is an Apple-supported configuration. You get the option when you erase your disk at OS install time. Please be aware that it *does* matter that your strings in your source code match the names of your files on the disk!


Intel Mac Speed - igame3d - Jan 22, 2007 11:43 PM

OneSadCookie Wrote:Ah, I bet it's because I have a case-sensitive disk.

Folks, this is an Apple-supported configuration.
And does Xcode make any warnings about this when compiling?

You know like "Hey, .005% of the world might have a silly formatting system in effect, better run through every word of code thats worked for five years on three operating systems and re-write it for that one sad cookie"

OneSadCookie Wrote:You get the option when you erase your disk at OS install time.

When I bought this iMac and reformatted and reinstalled, that was not an option.

I reformatted a partition this morning, seven months after a Tiger upgrade and saw this "Case Sensitive" nonsense for the first time and thought "What kind of mad man would do that to their drive?"

Sure enough I check my email when I'm done with that and there is Keith, standing up in the sea of 25 million mac users, like something out of a Where's Waldo book.

OneSadCookie Wrote:Please be aware that it *does* matter that your strings in your source code match the names of your files on the disk!


It hasn't made any difference at all until Tiger which is maybe 50% of the OS X installed base, and of all the machines tested so far, you are the only one with CaSe_SeNsItIvItY.

Anyway, THAT issue will be dealt with in the future, just in case Sad Cookie-ism becomes a fashionable trend.

UB has been dealt with on normal case insensitive Macs.
Speeds boosted from 30FPS MAX on intel to 130FPS average.

Thank you for the input. Smile

Download the iFly Universal Test.
I have not found anything broken yet, but I'm sure someone will.