Building on MacOS X

Discussion around programming R'n'D, its source code and its tools.

Moderators: Flumminator, Zomis

Post Reply
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Building on MacOS X

Post by Flumminator »

I've been trying to build Rocks'n'Diamonds on MacOS X (intel).

Well, I actually built it with "make mac" and having installed the SDL libraries required with darwinports.

The problem is: the program is horribly slow. If there's much graphical action (such as displaying the graphics/sounds loaded at startup or magic walls) I can watch every block on the field being updated seperately. :(

The strange thing is: If I use the pre-built (PowerPc) binary from artsoft.org it's much faster (though still slower than it should be).

In full-screen mode everything runs fine.

So: How do I build a fast version for MacOS X?
Flumminator->PostCounter += 1;
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Post by HerzAusGold »

Have you tried to link the SDL libraries static with the executable?
And the answer is ... 42 !
Flumminator
Posts: 184
Joined: Fri Jun 18, 2004 8:08 pm
Location: Germany

Post by Flumminator »

Yes, but "make mac-static" gives me:

Code: Select all

/usr/bin/ld: Undefined symbols:
__Unwind_Resume
I haven't figured out yet where this symbol should come from, so I couldn't test the result yet.

On the other hand I cannot believe that dynamic linking can cause such a big problem
Flumminator->PostCounter += 1;
HerzAusGold
Posts: 362
Joined: Sun Sep 25, 2005 4:41 pm
Location: Germany

Post by HerzAusGold »

On the other hand I cannot believe that dynamic linking can cause such a big problem
Yes, thats true- But on windows the feeling with static libs is a little bit faster (my opinion).

May be on your Intel-Mac you have to rebuild the SDL-Lib's.
May some 'make' files or some 'defines' dont regognize that there is a Intel-Mac.
And the answer is ... 42 !
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> The problem is: the program is horribly slow.

Strange. I wouldn't have expected this on an intel Mac...

> The strange thing is: If I use the pre-built (PowerPc) binary from
> artsoft.org it's much faster (though still slower than it should be).

Even stranger, as it has to be emulated... :-o

> In full-screen mode everything runs fine.

That's something I have observed on my iBook, too: Incredibly slow on the desktop (windowed mode), acceptably fast in fullscreen mode. But then, this iBook has only 500 MHz and non-accelerated graphics...

> So: How do I build a fast version for MacOS X?

Unfortunately, I have no idea.

I suspect this having something to do with the SDL libraries -- have you natively build them? But even then it might be possible that they simply need some special treatment to run well on intel Macs. (As the pre-build binary works better, I indeed think that it has something to do with the SDL libraries -- but still it's strange...)

> Have you tried to link the SDL libraries static with the executable?

This should not make a big difference...
Post Reply