Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 4.9.2 has been released!

This thread is locked; no one can reply to it. rss feed Print
Allegro 4.9.2 has been released!
Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

You couldn't actually, but I have patches for it. I would like something like that in A5.

Odd, I could swear I saw update flags for the hint/require things.

Ah, it seems theres only a DOUBLEBUFFER flag in agl... (which is more page flipping than classic allegro double buffering)

I'm pretty sure this is the intention though.

--
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

Goalie Ca
Member #2,579
July 2002
avatar

Quote:

al_key_down()? failing that, this is allegro 5, so it should know what the code is doing ;)

Okay.. but the point still stands. People did a lot of screwy things and we can't convert everything. I doubt it is as simple as string replacement and would probably be similar to a compiler in structure. If you can prove otherwise please go ahead and i can write a conversion script. A proof would need to contain equivalent functions and effects without any restructuring of the code (which would require parsing/compiler type stuff).

Right now there is the potential for a compatibility layer. There are a few functions there already including the old periodic timer (cotimer.c). I have the feeling that most developers would rather focus their efforts on the A5 api before worrying about backwards compatibility. Some things will be impossible/extremely difficult to support. Take mode7 for example.

In the meanwhile allegro 4.4 branch will continue the legacy into the future. No doubt support will eventually be dropped in favour of the allegro 5 series. Hopefully by then virtual machines will be simple enough to use to provide support "forever".

-------------
Bah weep granah weep nini bong!

Matthew Leverton
Supreme Loser
January 1999
avatar

I don't see any need for an incomplete compatibility layer. I think it does a disservice to redesign of the library. If someone wants to port his 4.2 project into 5.0, he might as well use the new API. He's going to have to learn it anyway.

Evert
Member #794
November 2000
avatar

An incomplete compatibility layer is useless, but I still think there needs to be a (thin) compatibility layer - obviously it's not the highest priority at the moment. Getting the new API to work and stable will be the first and most important goal.

Compatibility layer means API compatibility, meaning you can expect set_gfx_mode(AUTODETECT,...) to work. I don't think you need to expect set_gfx_mode(MODEX,...) or even set_gfx_mode(DIRECTX,...) or set_gfx_mode(X11,...) to work - no properly written code should depend on those anyway. Don't expect writing to the key[] array to work (or that the key[] array is the best way to get input), don't expect bug-for-bug or quirk-for-quirk compatibility. Expect compatibility on the level of the old demo programs compiling with no or very little modification.

amarillion
Member #940
January 2001
avatar

IMHO the time invested in writing a compatibility layer could be better used for writing nice comprehensive docs on how to port your game to the new API.

Of course in an ideal world we would have both.

Evert
Member #794
November 2000
avatar

The aim is/should be to have both by the time 5.0 is done.

Also, be careful with an argument like that! Someone working on Y but not X does not mean X would be done sooner if that person didn't work on Y, because s/he may not want to work on X.

Neil Walker
Member #210
April 2000
avatar

I think a compatibility layer is a bad thing, if people want old code stick with 4.x. What I meant was a program that parses your code and points out what's wrong and tips on fixing it.

As for triple buffering, seems it's a hardware thing only. Maybe I'm only bothered about it because it makes my current games smoother, but in version 5 that won't be a problem due to it's speed increase and hardware support :)

I don't really understand the ordering of things, and it's off topic really, but if I enable triple buffering on my card but set vsync on, which will take precedence?

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Thomas Harte
Member #33
April 2000
avatar

Quote:

I don't see any need for an incomplete compatibility layer.

I'm not persuaded of the need for software textured triangles. One of the goals for Allegro 5 should be easy maintainability and better code readability — in the hope of attracting more developers. With that in mind, finding the smallest possible useful set of functions is desirable.

That said, I can knock up a mean software texturer. Subdivision into affine grid-aligned quads is the future. Or was, circa 1995. If you want even more performance then make it a scene graph and chuck the quads into some stacks for deferred rendering. But I really, really don't think that we do?

EDIT:

Quote:

I don't think you need to expect set_gfx_mode(MODEX,...) or even set_gfx_mode(DIRECTX,...) or set_gfx_mode(X11,...) to work - no properly written code should depend on those anyway.

Those are fine assertions, but they don't necessarily map to the entire library. For example, what do you intend to do about get_gfx_mode_list? I guess just ignoring the argument will probably do (?) — especially as the function is sufficiently useless that it's probably completely unused.

Evert
Member #794
November 2000
avatar

Quote:

I think a compatibility layer is a bad thing

You are entitled to your opinion, but since it won't affect you using the new API and doesn't preclude any guides or examples showing how to update existing code I personally don't see why that would influence anything.;)

Quote:

I really, really don't think that we do?

Probably not, no.:)

Quote:

For example, what do you intend to do about get_gfx_mode_list? I guess just ignoring the argument will probably do (?) — especially as the function is sufficiently useless that it's probably completely unused.

I can't say I've thought that much about it, but my guess would be that yes, the argument would be ignored (and as you say, the function is pretty useless anyway, although I may have used it once in the past).

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Quote:

For example, what do you intend to do about get_gfx_mode_list? I guess just ignoring the argument will probably do (?) — especially as the function is sufficiently useless that it's probably completely unused.

How would you write a resolution changer like gfx_mode_select without it?

I use gfx_mode_select fairly often , and I'd like to keep the ability to know which graphic modes are available. And what's this about getting some random graphics driver back? Will the ability to select a specific graphic driver no longer be available in Allegro5 ?

Thomas Harte
Member #33
April 2000
avatar

Quote:

How would you write a resolution changer like gfx_mode_select without it?

I was coming from the opposite point of view — since it requires a 'real' driver and won't accept AUTODETECT (and as far as I'm aware, nobody has ever explained why) and there is no get_gfx_driver_list, it's really impossible to use reliably.

Not only should there definitely be a way to poll for available modes, but I'd be surprised if there isn't already. What would be bad would be if, like Allegro 4, it completely disregarded Allegro's aim of platform neutrality.

Elias
Member #358
May 2000

Quote:

Not only should there definitely be a way to poll for available modes, but I'd be surprised if there isn't already. What would be bad would be if, like Allegro 4, it completely disregarded Allegro's aim of platform neutrality.

There is, not sure it's implemented yet though, and we likely might change the interface. At least there will have to be more fields in ALLEGRO_DISPLAY_MODE I think. http://www.liballeg.org/naturaldocs/files/display_new-c.html#al_get_display_mode

Quote:

I'm not persuaded of the need for software textured triangles. One of the goals for Allegro 5 should be easy maintainability and better code readability — in the hope of attracting more developers. With that in mind, finding the smallest possible useful set of functions is desirable.

Indeed. It's also why we split things into "addons", like the current font rendering residing all in its own folder, and a way to disable it from the build system.

Quote:

That said, I can knock up a mean software texturer. Subdivision into affine grid-aligned quads is the future. Or was, circa 1995. If you want even more performance then make it a scene graph and chuck the quads into some stacks for deferred rendering. But I really, really don't think that we do?

I don't really know how this deferred rendering optimization would work, but yeah, optimization of the software primitives is the big problem I guess. Something "like A4" (but without the shading and perspective correction and so on) is what I have in mind.

If we have textured triangles, it will mean, we can re-implement the 4.4 demo with A5, which would be nice :)

Btw., looking at your triangle code again, how would the sub-pixel precision play together with al_line? Like, if I do:

al_triangle(0, 0, 8, 6, 0, 10, ALLEGRO_FILLED, color)
al_line(0, 0, 8, 6, color)

Should we then have any semantics about possible overlap?

--
"Either help out or stop whining" - Evert

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

This is a little off-topic , but what is sub-pixel precision? Does that mean rounding? Or does it mean something like when you draw a line from 10,10 to 20,20 then the line is drawn to pixels less than half a pixel away from the precise line 10.5,10.5 to 20.5,20.5 ?

Thomas Harte
Member #33
April 2000
avatar

Quote:

I don't really know how this deferred rendering optimization would work, but yeah, optimization of the software primitives is the big problem I guess.

I'm reasonably confident that it's the same system that was used on the old PowerVR cards, including the one in the Sega Dreamcast. You divide the screen up into 8x8 pixel segments (or whatever), then divide all the polygons by those segments. Only once all polygons are added to the structure do you actually work out pixels (probably by an s-buffer, optimised for 8x8 blocks, or some such).

In scenes you would expect a software rasteriser to handle well, a lot of the 8x8 blocks are entirely covered by a single polygon and you can probably get away with drawing those blocks using a non-perspective fill as long as you have the perspective right at the edges. Though that's really about avoiding divides, so maybe it doesn't matter nowadays.

Quote:

Btw., looking at your triangle code again

Oh, I meant to say - I think that code might have an error in its horizontal clipping that allows it to draw one pixel too far to the right to BITMAPS, potentially overrunning allocated memory. The fix should be a simple replacement of <= with <, it's because I was initially confused about which pixels that sit right on the boundary of a polygon are usually treated as being inside.

Quote:

Should we then have any semantics about possible overlap?

I think it's smart to just adopt the OpenGL semantics for everything? OpenGL has a system whereby you imagine a right-angled diamond with centred on each pixel, that extends halfway to the pixel above, halfway to the pixel below and halfway to the pixel on either side.

A pixel is covered by a line if it exits the diamond. E.g.

img379.gif

(image taken from section 3.4.1 Basic Line Segment Rasterization of the OpenGL 1.1 specification).

Obviously the polygon rule is (roughly) "pixels are drawn as part of a triangle if their centres fall within the polygon", so that produces a line that straddles the inside and outside of the polygon — there should never be a visible gap between the line and the polygon in your example, but the line won't necessarily fit completely inside the triangle. Which makes sense.

Quote:

This is a little off-topic , but what is sub-pixel precision? Does that mean rounding? Or does it mean something like when you draw a line from 10,10 to 20,20 then the line is drawn to pixels less than half a pixel away from the precise line 10.5,10.5 to 20.5,20.5 ?

It's just being precise about the definitions of when pixels are and aren't inside polygons. Implementing that means that the code has to sometimes think about parts of pixels rather than whole pixels, so it necessarily has sub-pixel precision.

The hard-and-fast OpenGL rules are:
1) pixels are drawn if their centres fall within the polygon
2) pixels are not drawn if their centres fall outside the polygon

Then there's some lack of exactness about the third case concerning pixels that fall exactly on the boundary, but I went with:
3) pixels are drawn if they are exactly on the boundary, are on the right edge of a scanline which is not of zero length and covers at least one pixel centre

The point of that third rule being to try to colour pixels exactly once where polygons meet, no matter how they do so (so think two large polygons directly meeting, two polygons meeting but having a third polygon of zero size inbetween, etc).

In hardware land, I think a lot of cards use the half-space rule, which allows you to take any particular pixel and query whether it's in the polygon — which is great for parallelism. The code I suggested for Allegro 5 is a traditional top-to-bottom, left-to-right scanline filler which is probably better for a CPU.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

You are entitled to your opinion, but since it won't affect you using the new API and doesn't preclude any guides or examples showing how to update existing code I personally don't see why that would influence anything.;)

The reasons why I don't like a compatibility layer:

  • If it's not 100% compatible (and of course there will be bugs in addition to missing features), you still have to go around your code and figure out why it's not working. This is made even harder with a compatibility layer because you won't get compiler errors about bad function names. You could end up with runtime problems.

  • It introduces two APIs and double the documentation and examples (on the Internet, not necessarily with Allegro). People have no business using the old API on new projects with Allegro 5. But they will because they either won't know any better or because they'll come across a tutorial for Allegro 4 and try to fit it into Allegro 5.

It affects those of us who spend time helping newbs install Allegro and get it working because there's now more scenarios and problems for us to consider.

It's not that I'm entirely against someone writing one. It's more that I just think it's a waste of time for something that is only marginally beneficial while having the chance of being somewhat annoying.

OICW
Member #4,069
November 2003
avatar

Quote:

The reasons why I don't like a compatibility layer:
...

I'd add also that it's quite a step away from a clean API. On the other hand it can help to make a transistion from Allegro 4.2 to Allegro 5.0

I seem to have slept in cave for a really long time. I'm just so excited to hear that finally this is coming to be released. Looks like I'll wait with coding another project till Allegro 5.0 comes out.

Is there any site I can get info about how it is structured? I'm also excited by native png and ogg support, since this reduces number of other libraries you have to learn to use, you have to compile and is convinient for a developer and for the end user.

The most important question is: what is the projected release date?

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Elias
Member #358
May 2000

For png and ogg, what you likely meant is Allegro 4.3.10 (which eventually will be 4.4). It's just 4.2 bundled with some common addons. There's apparently some mainly build related issues on some platforms, but besides that, it is already released and you should use 4.3.10 instead of 4.2.2.

As for Allegro 5, the release date is very much unknown. I'd say it's somewhere between quite soon (in case lots of people suddenly join who have lots of free time to work on it) and infinity (if everyone working on it loses interest). In case the developers stay as many with as much time as right now, the release date likely will be the exact middle of those two :)

--
"Either help out or stop whining" - Evert

OICW
Member #4,069
November 2003
avatar

Well I have only one recent project that involves AllegroGL so there's no need for urgent update. But I keep that in mind.

Well I expected something between soon and infinity. I wonder how many things need to be done and how many of them are completed. I also wonder if I'd be of any help, since I haven't worked with anything involving hardware. I should se a todo list.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

Goalie Ca
Member #2,579
July 2002
avatar

Quote:

I seem to have slept in cave for a really long time. I'm just so excited to hear that finally this is coming to be released. Looks like I'll wait with coding another project till Allegro 5.0 comes out.

I don't know when the release data is so you could be waiting a while :P
But feel free to download the latest svn and give it a whirl anyways. A lot of the API should be stable by now.. i'm not so sure about sound though.

-------------
Bah weep granah weep nini bong!

OICW
Member #4,069
November 2003
avatar

Surely I will as soon as I get my hands dirty with writing a new project and Allegro 5 won't be out I'll begin to mess with svn version.

As for that cave. I've missed a.cc news and haven't lurked into dev forum for a while. So I completely missed allegro 4.9.x. I just knew about 4.3.x being released some time ago and words of a revolution coming onto us.

Edit:
Looking at the docs it seems that Allegro got complete rehaul, as I don't see any familiar identificators. A completely new API, which looks clean and not so huge. Though I suspect that sound and datafile routines will come, as they are still not in there.

[My website][CppReference][Pixelate][Allegators worldwide][Who's online]
"Final Fantasy XIV, I feel that anything I could say will be repeating myself, so I'm just gonna express my feelings with a strangled noise from the back of my throat. Graaarghhhh..." - Yahtzee
"Uhm... this is a.cc. Did you honestly think this thread WOULDN'T be derailed and ruined?" - BAF
"You can discuss it, you can dislike it, you can disagree with it, but that's all what you can do with it"

darkspire
Member #9,347
December 2007

Wow allegro has sure come a long ways. I remember in the original FAQ shawn said that allegro wan not intended to be nor will ever be a 3D API and that hardware acceleration was pretty much out of the question except for MMX optimizations and now just look at it. I havent looked at the source yet. Are you guys planning on encapsulating directX/openGL into platform independant routines? (Yes i know openGL already is independant) but it would be cool to call allegro 3D routines and have it use either DirectX or OpenGL depending on the target system.

This makes Allegro the #1 game dev solution in the world now. THe onlything missing now is built in network support! :D

Peter Wang
Member #23
April 2000

Quote:

allegro wan not intended to be nor will ever be a 3D API

That's still true.

Quote:

This makes Allegro the #1 game dev solution in the world now.

Let's not get ahead of ourselves.

Goalie Ca
Member #2,579
July 2002
avatar

Nowadays it is faster to do 2D drawing using 3D backends like opengl and d3d. al_rectangle and al_line and blitting etc are still only 2d.

2D and 3D are very different beasts and you really should be using opengl for 3d drawing. Allegro4 and Allegro5 both allow you to write opengl code to do 3D drawing.

-------------
Bah weep granah weep nini bong!

tobing
Member #5,213
November 2004
avatar

I tried to build 4.9.2 with MSVC 7.1, but didn't really succeed. There are some things in headers that don't compile, and after some changes I discovered that I would need to install the DirectX SDK on my PC, is that right? It also seems that the build instructions are not up to date, and neither is the documentation, or did I miss something?

Richard Phipps
Member #1,632
November 2001
avatar

Ohhh! I missed this too.

I definately recommend adding both Direct3D / OpenGL graphical support. I use PTK which handles those pretty well. You already have Fladimir's OpenLayer which handles nearly all of the OpenGL primitives and blits anyway..

A new (and better) input system for keyboard, joypad and the mouse (please!) would be great. As would a more powerful and flexible sound system.

:)



Go to: