Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 4.9.8

This thread is locked; no one can reply to it. rss feed Print
Allegro 4.9.8
vbovio
Member #8,283
January 2007

I just checked this release, code and docs, great work!
the A5 WIP looks promising.

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

GullRaDriel
Member #3,861
September 2003
avatar

Quote:

They are rather useless though, as they only work under Windows.

Let's tease Elias: I think it's normal, for some D3D functions, to only work under windows :-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Elias
Member #358
May 2000

Quote:

Watch out, trentg might label you as a Stallman clone if you say anything that might even remotely put windows, or developing windows specific code in a bad light.

Heh. I just want that most A5 programs written under Windows will run equally under Linux and OSX. If there is a reason to have Windows-specific features, then I don't have anything against that. Just experience with A4 shows that people used Windows specific stuff all the time for no good reason. So with A5, we should not encourage the same by advertising any platform specific functions. The same goes the other way around, Linux or OSX specific functions should not be normally used. Unless it makes sense of course, if you make a high quality game it may be worth the time to do things differently for platforms, so it's good if Allegro 5 allows doing so.

OpenGL is a different matter. We simply can't provide all the same functionality OpenGL (or DirectX) provide in Allegro, even though it all is useful for games. It has been done in projects like Ogre or Wine maybe, but those are huge compared to Allegro. And OpenGL already is cross-platform and usually works under Windows, so I don't see a big problem to use it whenever the Allegro API isn't enough.

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

Evert
Member #794
November 2000
avatar

Quote:

Just experience with A4 shows that people used Windows specific stuff all the time for no good reason. So with A5, we should not encourage the same by advertising any platform specific functions.

I agree 100%. I also think that by extension, this implies that requiring OpenGL for some (common?) tasks isn't quite "platform-neutral" enough, despite OpenGL working fine in Windows. It feels a bit like saying "but you can run X11 applications on a Mac too, so we don't need a native OS X port, the X11 port will do fine" (the X11 port doesn't work on OS X, by the way, it would be good if it did though).
I don't think we should go out of our way to wrap all of OpenGL, but some wrapping (blending?) might be in order, with the added bonus that it'd also work with D3D (don't bother with software for the time being). Now, I have a feeling this has been discussed before, and it may not be as easy as I'm making it out to be.

Quote:

And OpenGL already is cross-platform and usually works under Windows, so I don't see a big problem to use it whenever the Allegro API isn't enough.

The problem is with Windows users may (will) want to use D3D for whatever reason - which means they'll have to write platform specific code. If we can wrap that, so much the better.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

If we can wrap that, so much the better.

Indeed. Which is why I'd be in favor of supporting more blending modes, and things like shaders and whatnot. Make it so even fairly complex Allegro 5 games can use completely platform neutral code, including no direct GL.

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

Trent Gamblin
Member #261
April 2000
avatar

4.9.8 binaries are on allegro5.org.

Elias
Member #358
May 2000

Quote:

Indeed. Which is why I'd be in favor of supporting more blending modes, and things like shaders and whatnot. Make it so even fairly complex Allegro 5 games can use completely platform neutral code, including no direct GL.

I'm also in favor of it from a user view, I just don't think it's realistic to expect we will get developers to implement it. Also, if we add support for shaders, there wouldn't be much need for the fixed blending modes - we would just have some example shaders doing what the fixed ones do. Not sure about the memory functions - if Mesa supports shaders, we likely could require it, or another free library, if one exists.

So, any volunteers for adding support for pixel shaders?

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

Trent Gamblin
Member #261
April 2000
avatar

A portable pixel shader library is a huge undertaking. They already exist. Why not just let the user choose one of the existing ones?

Evert
Member #794
November 2000
avatar

Quote:

I just don't think it's realistic to expect we will get developers to implement it.

Ah! Now that is a wholly different issue. We probably could use an extra pair of hands there. I currently lack the knowledge it would take to help out with something like that (as in, I've never done anything similar with OpenGL).

Quote:

Also, if we add support for shaders, there wouldn't be much need for the fixed blending modes - we would just have some example shaders doing what the fixed ones do.

Ok.

Quote:

if Mesa supports shaders, we likely could require it, or another free library, if one exists.

Hehe... these days I think of something else when I see "mesa". Interesting how that works (no, I'm sure that one does not support shaders of any kind).

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

Why not just let the user choose one of the existing ones?

That would also work. Some kind of simple interface between said libs, and allegro (so you don't end up having to call d3d or gl specific functions yourself) would be nice though.

I really only gave "shaders" as an example of something we may want to support in a platform neutral way. I'm sick and tired, so I can't recall anything else ;D

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

Neil Walker
Member #210
April 2000
avatar

Quote:

The problem is with Windows users may (will) want to use D3D for whatever reason - which means they'll have to write platform specific code. If we can wrap that, so much the better.

Perhaps I'm getting mixed up with how the display flags work, I saw:

ALLEGRO_OPENGL - require the driver to provide an initialized opengl context after returning successfully
ALLEGRO_DIRECT3D - require the driver to do rendering with Direct3D and provide a Direct3D device

And figured that to get hardware acceleration (or however the library implements the functions) you had to specify one of them (or both for a random choice) and got software everything if you didn't.

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

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

Trent Gamblin
Member #261
April 2000
avatar

There is no software driver, at least not yet. On windows, direct3d is the default, on other systems, opengl is the default, and the only.

Evert
Member #794
November 2000
avatar

Quote:

On windows, direct3d is the default, on other systems, opengl is the default

And this is exactly why we need something to offer people using the default setup.

Quote:

Some kind of simple interface between said libs, and allegro (so you don't end up having to call d3d or gl specific functions yourself) would be nice though.

Shader add-on based on one of said libs? I'm for it.

Quote:

figured that to get hardware acceleration (or however the library implements the functions) you had to specify one of them

Nope. The point is to get hardware acceleration by default.

Elias
Member #358
May 2000

Quote:

And this is exactly why we need something to offer people using the default setup.

Well, if they need more functionality than Allegro can provide, they have to use either DirectX or OpenGL (or another library) - nothing we can do about it. But OpenGL is the best choice since it works (is supposed to work) everywhere already.

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

Neil Walker
Member #210
April 2000
avatar

Best get a move on then, I was searching for some stuff on opengl performance and near the top of the search list was this, dates just a few months ago at gamedev.net. Be warned, it'll have you spitting blood ;)

Quote:

Allegro is an old DOS gaming library written by Shawn Hargreaves in the early ninties. A small community rose around it, and have since shoe-horned it onto every other OS possible.

It creates a window for you with a macro hack and manages it on its own, and it can create a few different video drivers, like directdraw and GDI. But the library has pretty much stalled since 2000, when they started planning for version 5 and it still hasn't gotten off the ground... It technically still works, but it's not really relevant anymore. You should use something more modern.

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

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

Trent Gamblin
Member #261
April 2000
avatar

Quote:

Shader add-on based on one of said libs? I'm for it.

I would say that's the way to go. I've got too many projects on the go right now to take this one though.

Elias
Member #358
May 2000

The "macro hack" reminds me, what about removing END_OF_MAIN from Allegro 5? I sent a patch to the mailing list to do so some time ago, but got no conclusive comments. That patch doesn't change any functionality, just instead of having

int main()
{
}
END_OF_MAIN()

you would then have:

int allegro_main()
{
}

This was originally suggested by Peter Hull, and I think it is much less hackish, no macros at all involved.

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

Evert
Member #794
November 2000
avatar

Quote:

dates just a few months ago at gamedev.net.

How many months? This is relevant, because A5 has matured considerably over the past few months.

Quote:

Be warned, it'll have you spitting blood

Not really. It probably is becoming time to spread "A5" news a bit beyond these boards though.

Quote:

I've got too many projects on the go right now to take this one though.

Sure. Which is why we need an extra pair of hands.
Now that SiegeLord is done with his primitives addon, maybe he can do this one? Preferably before the next WIP? ;)

Quote:

This was originally suggested by Peter Hull, and I think it is much less hackish, no macros at all involved.

I guess. Let's just be very clear that it can't be that the user could write "int main()" without doing anything special on other platforms and have it work.
Although, we could stick an (optional) "#define main allegro_main" in there.
Personally I'll gladly settle for something that lets me write plain "int main(void|int, char**)" without doing anything special, while at the same time allowing the user to disable any "main hijacking" transparently.
In short:
Have main/allegro_main "just work" without tweaking on Windows and *nix (ie, maybe have #define allegro_main main).
Have a "real" main living in "liballegromain.a" on OS X that gets linked in, call "allegro_main" in user code, which the user secretly created by "#define main allegro_main". This can be easily disabled by not linking "liballegromain.a" and not doing the "#define".
This way, the user can (normally) write either "main" or "allegro_main" and have either of those work reliably, but still disable it easily if they need to get rid of it (when using Allegro along some other library that needs to have access to main).
That's my personal preference though.
There was something else I wanted to say, but I forget. I need to rush for morning coffee meeting anyway.

kenmasters1976
Member #8,794
July 2007

I'm thinking into installing Allegro 4.9.8 and give it a try (that announcement in the main page really got me).

Neil Walker
Member #210
April 2000
avatar

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

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

Evert
Member #794
November 2000
avatar

Quote:

Use google and enter "Allegro You should use something more modern", it's the first entry.

October then, at the beginning of the current more regular release schedule.
As I said, it's been maturing a lot since then (obviously most of the work was done before that time).

Matthew Leverton
Supreme Loser
January 1999
avatar

I wouldn't worry about it. GD has been full of misinformation about Allegro ever since version 4 was released. In library-vs-library threads, somebody always makes the claim that it's an "old DOS blitting library" as to imply that it's useless to the person asking the question—even when it's obvious that the person doesn't even have the skills to reach the limits of QBASIC.

Don Freeman
Member #5,110
October 2004
avatar

Would anyone be willing to try my binaries to see if you have trouble with the audio? The ex_saw works fine and I get sound, but the demo doesn't load and such. It seems something is amiss with the kcm_audio addon, but I don't know...Everything else seems to be fine.

Libs
Error from demo:

/*
Keyboard driver installed.
Error loading sample (null)
Failed to load demo\data\sfx\big_explosion.ogg
Error loading resources.
Error in initialization.
*/

I checked...the sample is there and plays fine in media player classic.
This is my cmake cache.
Is openAL required, even under Windows? If so, that might be the problem. I am not using it as you can see above in the cmake cache. I was under the impression that it would default to DirectSound under Windows.::)

As always,
Thanks guys!8-)

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Matthew Leverton
Supreme Loser
January 1999
avatar

I believe the demo requires the ogg library. OpenAL is not needed under Windows.

GullRaDriel
Member #3,861
September 2003
avatar

I am building it. Feedback soon !

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!



Go to: