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
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.
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.
That's a blow since I tested it with "Run under Rosetta" and it was fine.
pete
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
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"}
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.
The colors are fine Except the text doesn't look right.
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
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
Those graphics look like poo.
Anyway, it works fine on my MacBook Pro. 2.4GHZ/8600M GT, OS X 10.5.4.
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)
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).
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.
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
...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...
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?
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!
Might want to attach something Peter
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.
Pete
Yeah I was using Safari so the procedure is:
Under Safari 3.1.2 the normal attachments interface works perfectly.
EDIT:
Yet still rather large!
It's nothing in a world where some Cocoa Commodore 64 emulators are more than 40mb.
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"}
EDIT:
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...
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?
Is this the current SVN you are testing? Otherwise makes no sense to test.
OK my friends can you test this one. I appreciate all the help.
Milan: Current SVN as of a couple of days ago.
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.
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
I have just committed a patch which might fix the problem with fonts...
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
OK my friends can you test this one.
Works flawlessly now. I'd post a screenshot, but you know what it looks like.
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?)!
No one's really done anything yet with the font subsytem. Eventually I'd like to see something more like GlyphKeeper in the core.
No one's really done anything yet with the font subsytem. Eventually I'd like to see something more like GlyphKeeper in the core.
Well, Trent translated the A4 font system into a bitmap-font addon. Which means it works just like A4 though.
We definitely need a freetype addon as well. Adding support for kerning ("overlapping bounding boxes") is rather easy, some font addons for A4 can already do it (e.g. glyphkeeper and fudgefont). So even the A4 font vtables are more than enough for that.
Also rendering TTFs with vector outlines would probably be nice - it would also provide us with an al_draw_triangle implementation which we are still missing currently
Well, Trent translated the A4 font system into a bitmap-font addon
Oh, so you've stuck to the idea of using add-ons for branch functionality? I'm even more impressed than I was before.
We definitely need a freetype addon as well. Adding support for kerning ("overlapping bounding boxes") is rather easy...
Stuff like ligatures would also be nice. But I guess that if you can pair kern then you can, ummm, ligature.
Also rendering TTFs with vector outlines would probably be nice - it would also provide us with an al_draw_triangle implementation which we are still missing currently
If you're going to support non-OpenGL targets then I guess the hardest part of writing such an add-on would actually be the tesselator (unless you made GLU a requirement, given that the tesselator parts actually don't need the underlying GL to be functioning); I posted triangle code which followed the OpenGL criteria for pixel painting to this forum a while ago, I guess the stuff that constitutes the various "does this look the same on you machine" tests that have been posted a couple of times elsewhere is being used instead, almost certainly for a smart reason.
Are you planning on keeping a sort of semi-official collection of addons (ala SDL_ttf, SDL_mixer, SDL_etc) and if so is TTF font rendering a suitable sort of thing to be one of them?
Stuff like ligatures would also be nice. But I guess that if you can pair kern then you can, ummm, ligature.
Yes, I guess, basically, FreeType would be asked to return the position - so whatever it supports will work
I posted triangle code which followed the OpenGL criteria for pixel painting to this forum a while ago
Yes, I was meaning to add an al_triangle with this as the non-GL implementation back then I think, forgot what stopped me from doing it.
Are you planning on keeping a sort of semi-official collection of addons (ala SDL_ttf, SDL_mixer, SDL_etc) and if so is TTF font rendering a suitable sort of thing to be one of them?
Yes and yes. That is, we never could decide yet what constitutes official/semi-official/external addons - probably it will mostly depend on if and by who an addon is maintained.
Works fine here. MacBook, intel, OSX 10.5.4
I posted triangle code which followed the OpenGL criteria for pixel painting to this forum a while ago
Except for the fact that its output looked nothing like an OpenGL triangle's, and it had overlaps when stacked next to other triangles of the same type . I've a fixed version of that algorithm in a primitives addon I am sort of working on though.
Except for the fact that its output looked nothing like an OpenGL triangle's, and it had overlaps when stacked next to other triangles of the same type . I've a fixed version of that algorithm in a primitives addon I am sort of working on though.
It was written specifically not to overlap over triangles of the same type; the whole point was to demonstrate the problems with ye olde Allegro's built-in stuff (for which an approximate similar algorithm might be "plot any pixel whose centre is in or, you know, roughly near the triangle").
I'd really appreciate it if you could PM me a summary of the problems you found, as I'm about to implement a polygon filler for a z80 target, where plotting any more pixels than is absolutely necessary hurts quite a bit in speed terms, so obviously if my comprehension is at fault then I'd much rather know now — doubly so given the effort of z80 assembly.
Hopefully I just made implementation errors... but please don't try to tread politely around it if there seems to be some fundamental flaw in my understanding. I would much rather know.
What's the z80 target? TI calculators?
And yes, Peter's last version worked here, too. PPC Powerbook.
I completely missed Peter's fix. The program continues to run as correctly as it ever did through Rosetta on my Core Duo MacBook Pro, for what little benefit that is.
What's the z80 target? TI calculators?
Nope, the Sam Coupé — an ancient 8bit that you've probably never heard of. For discussion, I've posted a hasty message about my efforts to the "The Depot" forum here, so as not to pollute this thread with off-topic chatter.