Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 4.9 and OS X

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro 4.9 and OS X
Peter Hull
Member #1,136
March 2001

I've build a version of the Allegro 5 demo on OS X. Please could someone test it and let me know if it works or not? Please let me know your OS version and whether you're on PPC or Intel. For reference I built it with 10.4/Intel.
link
Pete

Evert
Member #794
November 2000
avatar

Quote:

Please could someone test it and let me know if it works or not?

Sortof. It starts, music plays. The screen and colours are screwed up though (I'd post a picture, but any attempt to upload it here results in a "failed" message for some reason). I don't see the mouse and I didn't get beyond the startup screen.

Quote:

Please let me know your OS version and whether you're on PPC or Intel. For reference I built it with 10.4/Intel.

10.4.11, on PPC.

Peter Hull
Member #1,136
March 2001

That's a blow since I tested it with "Run under Rosetta" and it was fine.

pete

lemranger
Member #10,003
July 2008
avatar

It runs fine on my machine (iMac 3.06 GHz Intel Core 2 Duo - NVIDIA GeForce 8800 GS OS X 10.5.4). The only thing that didn't work was exiting from the menu. I just hit ESC and everything cleaned up nicely. Are you using a latest WIP?

>Really< appreciate your work on Allegro Mac, Pete!

Paul

Johan Halmén
Member #1,550
September 2001

Quote:

any attempt to upload it here results in a "failed" message for some reason

Maybe Safari refuses to act with a.cc's attachment uploading. Write your posts without attachment, then edit your post and use the Attachment link that appears in down right corner.

.{"name":"596033","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9deccab5de613ff3ebb62e3f845a2843.png","w":652,"h":517,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/d\/9deccab5de613ff3ebb62e3f845a2843"}596033
The application started with a black window. The game starte after about 10 s. Colours appeared to be off, like screwed palette. Otherwise it was playable.
I have a Powerbook PPC, 1.5 GHz, OSX 10.4.11.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Milan Mimica
Member #3,877
September 2003
avatar

The colors are fine :P Except the text doesn't look right.

Peter Hull
Member #1,136
March 2001

Right, I was about to say that. It looks like I posted back in March
http://www.allegro.cc/forums/thread/595534/735479#target

So maybe just the text rendering needs to be sorted out. Is that the same as what you saw, Evert?

By the way, no disrespect, but I don't think the current graphics do justice to the actual game. I wonder if there's anyone who would like to draw some (particularly the UFO)

Pete

vbovio
Member #8,283
January 2007

Runs fine on my machine:

MacBook Pro 2.2 GHz Intel Core 2 Duo - GeForce 8600M GT, OS X 10.5.3

The game looks fine to me:

http://www.allegro.cc/files/attachment/596036
http://www.allegro.cc/files/attachment/596037

:)

---------------
BovioSoft

BAF
Member #2,981
December 2002
avatar

Those graphics look like poo. :P

Anyway, it works fine on my MacBook Pro. 2.4GHZ/8600M GT, OS X 10.5.4.

Evert
Member #794
November 2000
avatar

Quote:

Maybe Safari refuses to act with a.cc's attachment uploading.

Maybe, but since I use Firefox that shouldn't affect me, right?
(EDIT: Wrong, apparently... it works if I edit the post)

Quote:

So maybe just the text rendering needs to be sorted out. Is that the same as what you saw, Evert?

Yes, it is.

At this point I think it's safe to say that it runs fine on Intel Macs. Would be interesting to know how it displays on an Intel Mac if it's compiled as a PPC binary (apart from running horrendously slow).

Thomas Harte
Member #33
April 2000
avatar

Worked here on OS X v10.5.4, MacBook Pro with Intel Core Duo 2.16Ghz, 2 GB RAM, ATI Radeon X1600 video card. There are issues, like the close button does nothing and when I first load, I have to press 'y' three times to get into the game (the first two just make the music restart), but pressing 'z' causes it to start immediately. After playing once (by pressing either key), both start it immediately.

Major kudos for using less than 8% of a CPU core.

EDIT: the graphics look quite good for a 16 colour mode. Please don't misunderstand my point.

EDIT2: works well under Rosetta too. Another general observation: the icon is really, really low resolution.

EDIT3: my olde PowerPC Mac died a few months ago, but for that I might be able to be a bit more helpful.

Peter Hull
Member #1,136
March 2001

The font rendering ultimately calls al_draw_bitmap for each glyph, and it looks like bitmap drawing is OK in general (Johan's UFO is OK). Maybe it's down to some issue in the font loader. However, it also looks like the actual character is drawn OK, just the background is messed up. Confusing.

Evert, Rosetta is the PPC emulator for Intel. So the ppc version works fine for me and also for Thomas (and at full speed, for me anyway) under emulation.

Thomas, it's the same graphic as the game, put in the 48x48 slot of the icns. Is that what you mean by really low resolution? (I know the preferred size for 10.5 is 256x256!) I am aware of the close button but as for the Z/Y thing, the code looks like this:

   if (al_key_down(&kbdstate, ALLEGRO_KEY_Z) || al_key_down(&kbdstate, ALLEGRO_KEY_Y))

so I can't see why they work differently. If you feel brave, exnewevents can be used to test the keyboard code.

On the fonts, I don't know how to proceed without some debugging on a genuine PPC Mac, does anyone have any ideas?

Pete

Thomas Harte
Member #33
April 2000
avatar

Quote:

...the code looks like this:

I can't see that now, since I'm at work and Internet Explorer is an idiot. But I just got a text from O2 to say that the internet is back in my home, so I'm sure I'll be able to work it out later...

Quote:

On the fonts, I don't know how to proceed without some debugging on a genuine PPC Mac, does anyone have any ideas?

Maybe someone with a PPC Mac would be able to let you have a VNC session? If you enable fast user switching, launch a VNC server for user x then switch to user y then the VNC server is still running, allowing you to log in and work as user x while the person physically at the machine labours on as user y. So it'd be something relatively quick that a PowerPC user could do to help the project if the time coordination could be arranged.

I'm sure the built-in remote desktop stuff is similarly capable, but I had the feeling that Apple charge for some part of it?

Peter Hull
Member #1,136
March 2001

Can the PPC folks test out this program? (attached)
It's a minimal* program to display some translucent bitmaps and some fonts. I just want to see if it's only fonts not working or whether it's the underlying bitmap code.
It's supposed to look like this:
http://www.allegro.cc/files/attachment/596057

Pete

  • Yet still rather large!

Thomas Fjellstrom
Member #476
June 2000
avatar

Might want to attach something Peter ;)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Hull
Member #1,136
March 2001

Yeah I was using Safari so the procedure is:
Make the post without attachments
Edit it
Add the attachments
Hope no-one else is looking at Allegro.cc at that time. :P

Pete

Thomas Harte
Member #33
April 2000
avatar

Quote:

Yeah I was using Safari so the procedure is:

Under Safari 3.1.2 the normal attachments interface works perfectly.

EDIT:

Quote:

  • Yet still rather large!

It's nothing in a world where some Cocoa Commodore 64 emulators are more than 40mb.

Evert
Member #794
November 2000
avatar

Here you go. I hope the distribution of the circles is supposed to be random since it's completely different than in your screenshot...
{"name":"596063","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/5\/e584881af1a66163692ce3691e18d5d6.png","w":640,"h":502,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/5\/e584881af1a66163692ce3691e18d5d6"}596063

EDIT:

Quote:

Under Safari 3.1.2 the normal attachments interface works perfectly.

Now works with FF 3 as well... weird, I remember it being broken before. Maybe something in my last OS X update fixed it...

Thomas Harte
Member #33
April 2000
avatar

Here's my crazy guess: a memory initialisation problem. It'd explain why the problem isn't seen under Rosetta and why it seems to affect the background of glyphs without affecting their contents.

Incidentally, what have you done for the built-in font handling in Allegro 5? Ye olde Allegro (& many others) invented-by-programmers fiction of every glyph having a bounding box and the bounding boxes never being allowed to overlap? If so, to what extent can that behaviour be replaced by add-on libraries without having to provide a separate API?

Milan Mimica
Member #3,877
September 2003
avatar

Is this the current SVN you are testing? Otherwise makes no sense to test.

Peter Hull
Member #1,136
March 2001

OK my friends can you test this one. I appreciate all the help.

Milan: Current SVN as of a couple of days ago.

Quote:

Incidentally, what have you done for the built-in font handling in Allegro 5? Ye olde Allegro (& many others) invented-by-programmers fiction of every glyph having a bounding box and the bounding boxes never being allowed to overlap?

Exactly that.

Quote:

If so, to what extent can that behaviour be replaced by add-on libraries without having to provide a separate API?

Easily, every font has its own vtable.

Pete

Milan Mimica
Member #3,877
September 2003
avatar

I have just committed a patch which might fix the problem with fonts...

Peter Hull
Member #1,136
March 2001

This is the change I made for the demo above

*** /tmp/PB.2143/XCSCMTopOfTrunkRevision-fontbmp.c/fontbmp.c  Thu Aug  7 23:31:14 2008
--- fontbmp.c  Thu Aug  7 22:15:33 2008
*************** A5FONT_FONT *a5font_grab_font_from_bitma
*** 227,232 *
--- 227,233 ----
        return 0;
  
     al_set_target_bitmap(cf->glyphs);
+    al_clear(al_map_rgba(0, 0, 0, 0));
     al_draw_bitmap(bmp, 0, 0, 0);
  
     _al_pop_target_bitmap();

I believe that cf->glyphs was full of garbage when it was created therefore it shows through when the transparent bitmap bmp is blitted onto it.

I don't think your changes are relevant to this particular bug (because the yellow circles are drawn perfectly), but I updated it anyway.

Pete

Evert
Member #794
November 2000
avatar

Quote:

OK my friends can you test this one.

Works flawlessly now. I'd post a screenshot, but you know what it looks like. :)

Quote:

Incidentally, what have you done for the built-in font handling in Allegro 5? Ye olde Allegro (& many others) invented-by-programmers fiction of every glyph having a bounding box and the bounding boxes never being allowed to overlap? If so, to what extent can that behaviour be replaced by add-on libraries without having to provide a separate API?

As said, that can easily be done (it can even be done in Allegro 4.2, actually).
That said, at this point nothing is set in stone, so if someone wants to contribute a better (default) font system, that would be great (it wouldn't be that hard to store the bounding box per character separately, would it?)!

Peter Wang
Member #23
April 2000

No one's really done anything yet with the font subsytem. Eventually I'd like to see something more like GlyphKeeper in the core.

 1   2 


Go to: