Thoughts on Allegro on Mac OS X

kattkieru
Unregistered
 
Post: #16
Use the mkdir fix I posted above. The problem is you don't have the directory, and thus the compiler can't create fixbundle.o.
Quote this message in a reply
Member
Posts: 20
Joined: 2003.04
Post: #17
Got it built and everything, and compiled the Hello World .app okay.

Wow! This looks like a reeeeally nice library. Much nicer than SDL. I can't wait to get dug into the API and try some stuff out :-)

Any ideas how fast it will be for blitting full screen/double buffered/lots of sprites etc at relatively high resolution? The reason I stopped with my current project was because SDL was simply too slooooow. I hope that I'll be able to do some much better stuff with Allegro. I'm really excited about the potential here.

Big thanks to everyone who helped make it and bring it to Mac OS X!
Quote this message in a reply
deekpyro
Unregistered
 
Post: #18
Hum...I REALLY want to compile this....here's the error I get:

tools/datedit.c:92: header file 'obj/macosx/plugins.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
<built-in>:1:1: no macro name given in #define directive
make: *** [obj/macosx/alleg/datedit.o] Error 1

Any ideas?

(I can't find plugins.h anywhere)
thanks,
Derek
Quote this message in a reply
lillo
Unregistered
 
Post: #19
deekpyro: have you tried running

make depend

before doing "make"?


joephish: thanks. About speed, Allegro gives you direct access to the screen in fullscreen mode, so if you want double buffering you have to code it yourself. It's not hard though: check the demo game, it allows you to choose among several screen updating techniques (double buffering, page flipping, triple buffering (not available on OSX) and dirty rectangles).

For any question/comments/suggestions/whatever you're all welcome to join the mailing lists (more info on the Allegro homepage here) or better to come on the #allegro IRC channel on EFnet, or simply use the forums on allegro.cc, where most of the Allegro developers hang.
Quote this message in a reply
Feanor
Unregistered
 
Post: #20
Compiling Allegro for MacOS X, optimised. Please wait...
gcc -Wall -Wno-unused -Wno-long-double -O2 -funroll-loops -ffast-math -fomit-frame-pointer -pipe -DALLEGRO_USE_C -I. -I./include -o obj/macosx/alleg/datedit.o -c tools/datedit.c
tools/datedit.c:92: header file 'obj/macosx/plugins.h' not found
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
<built-in>:1:1: no macro name given in #define directive
make: *** [obj/macosx/alleg/datedit.o] Error 1
Quote this message in a reply
ClosetPacifist
Unregistered
 
Post: #21
Very interested in this, since I've been looking into programming games on OSX, but all the options seem to be rather intimidating and such. My main goal would probally be a tile-based RPG.

I'm on 10.1.5, with, I think, the latest devtools avaliable for this setup. I try to compile it, but it tries to use gcc- when I change it to cc, it gives the following errors on 'make depend':

cc: unrecognized option `-MG'
./include/allegro/alcompat.h:31: illegal external declaration, missing `;' after `)']


The final one repeatedly, with different line numbers. Probally a burp in the source or me overlooking something, but... Can't wait to check this out!
Quote this message in a reply
athomson
Unregistered
 
Post: #22
I get the same error with the plugins.h file, however the library and some (most?) of the test programs are compiled by that point so it isn't a great problem at the moment (though it really needs to be fixed).

Could someone please tell me why the test application (in the tests directory) uses roughly 5% of my CPU time when it isn't doing any more than displaying a window with static contents?

Andrew.
Quote this message in a reply
lillo
Unregistered
 
Post: #23
To Feanor and Athomson: running "make depend" before "make" should solve the issue.

This will not be needed in the official releases (both Work In Progress versions and final versions); remember this is still a CVS snapshot you are testing...

The compile process should go painlessly if you do this in sequence in a clean CVS snapshot:

./fix.sh macosx
make depend
make
sudo make install
sudo make install-framework
sudo make install-template

And aftet this, if you want to create an application bundle for the demo program, use

make fixdemo

That's all you need to compile/install the current Allegro CVS snapshot. As already said, the process will be the same in official versions, except for the fact you'll not need the "make depend" step.

To ClosetPacifist: are you telling me gcc isn't available on the Dev Tools for OSX 10.1.x? I have no clue on how you could solve the thing if gcc is not there, sorry...

To Athomson: the 5% CPU usage could depend on several factors. Allegro is multithreaded under OSX, and while the user app runs in a thread, another thread fetches system events and updates the window as many times per second as the current refresh rate (of course only dirty areas are updated, but still if you move the mouse the area around it will need to be redrawn). So assuming your refresh rate is 70, the events handling/window updater thread will sleep for 1000/70 milliseconds each time... Then you have to consider how much the user app thread sleeps; most Allegro apps make sure they sleep sufficiently when there is little activity, but still you get some CPU usage.
I don't think this is a problem though... Even Safari, opened on this reply page takes 10-15% CPU...
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #24
Quote:Originally posted by lillo
To ClosetPacifist: are you telling me gcc isn't available on the Dev Tools for OSX 10.1.x? I have no clue on how you could solve the thing if gcc is not there, sorry...

gcc is not called gcc in the 10.1.x dev tools, it's called cc. I believe the last set of 10.1.x dev tools (april?) finally called it gcc. It's 2.95 by default, but you can use gcc_select to switch to a beta of 3.1. Certainly in the last 10.1.x dev tools the gcc2 and gcc3 commands were present; these still work in 10.2 so it might be worthwhile changing the makefile to always use the gcc3 command...
Quote this message in a reply
Feanor
Unregistered
 
Post: #25
Moreover, though I am a dolt with make, I know that you can make a variable for gcc and set it to cc on OS X if version is prior to 10.2 -- heck, cc is an alias for gcc, so it still works for backward compatibility.
Quote this message in a reply
Feanor
Unregistered
 
Post: #26
Quote:Originally posted by lillo
To Feanor and Athomson: running "make depend" before "make" should solve the issue.

OK, that did it. I did not see that in the build instructions. Anyway the fixdemo command doesn't work for me -- ah, and the demo won't run, either; it can't find demo.dat. Cleaning the project wouldn't delete the demo.dat file, I hope. Well, I'll report back in a few days after I have tried something out.
Quote this message in a reply
lillo
Unregistered
 
Post: #27
You can easily change this.
Open makefile.osx, and on the very beginning of the file you'll find

CC = gcc

Change this to suit your needs and it should work.
I'll update the CVS snapshot to always use gcc3, thanks for the clarification. I hope gcc3, at least as symbolic link, will still be present in future Dev Tools releases!
Quote this message in a reply
kattkieru
Unregistered
 
Post: #28
Hey cats and kittens -- I've posted a binary distribution of the Allegro OSX lib on my site:

http://ministryofdoom.org/cloud/files/al...10-wip.dmg

This does not include all the source; it's merely meant for people who've already downloaded the sources and can't get them to compile.

If there are any problems with it, post a message here and I'll try to help.

- Charles
Quote this message in a reply
jcactaur
Unregistered
 
Post: #29
"The port is already "lightyears" ahead of SDL". Could someone please explain how the port is ahead of SDL if at all? Last time I used allegro for OS X(maybe a month ago) it was a cheapo xwindows port and didnt even support fullscreen. Also SDL with glSDL supports fully hardware accelerated blits. So in what ways is the allegro port ahead?
thanks
Quote this message in a reply
Member
Posts: 20
Joined: 2003.04
Post: #30
Well, from what I saw from the demo, it was pretty darn good.

It had fullscreen, and everything I saw was easily on par with SDL. What was superior (that I saw) was that it had a lot more built in stuff like rotation/scaling of bitmaps built in (?) And from the API it has loads more functions and stuff. Sorry, this is really vague, but I just get the impression that it's just got more to it.

I don't know about speed yet really, but from what I saw it was pretty good - full screen 1024x768, double buffering and lots of sprites was 60-100fps. Quite a lot faster than what I've seen in SDL!

I may be wrong though, these are just the impressions I got from playing around with it for about 1/2 hour.
Quote this message in a reply
Post Reply