Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » why allegro doesnt come with others libs?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
why allegro doesnt come with others libs?
lucaz
Member #4,194
January 2004

if allegro gui is very simple, the font system is bad, and we cant load png.
Why it doesnt comes with alfont, masking and loadpng?
Just include them inside allegro, why not?

23yrold3yrold
Member #1,134
March 2001
avatar

Because not everyone wants them, and those who do can get them easily. The PNG format has licensing issues as well IIRC. Not sure if that still applies.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Quote:

The PNG format has licensing issues as well IIRC.

PNG does not, and has never had licensing issues. It's completely compatible with Allegro.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

I was pretty sure of that, but it was the excuse for a while. Or maybe it was zlib with the incompatible license; I forget.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Zlib is not incompatible with Allegro either, and never has been.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

Well, I'm just parroting what I've heard in other threads. :) Feel free to contribute to the thread by informing all what the real reason is.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Chris Katko
Member #1,881
January 2002
avatar

I do agree that Allegro's basic font support is horrible. If it's a "game programming library" why doesn't it have all the essentials. Almost every game requires TTF fonts, and compressed bitmaps. BIOS fonts don't cut it.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Kitty Cat
Member #2,815
October 2002
avatar

Because we aren't totally sure how to do it. If we compile zlib/libpng into Allegro, you won't have a way to upgrade those libs without rebuilding Allegro. If we leave them external, there's no easy way to tell if the user already has them or not (Unix could use a configure check, but Windows and DOS has no such way to check).

What's I'd say is to just compile them into their own DLLs durring make, then after running make install, put a note to run 'make install-zlib' and 'make install-libpng' if you don't already have those libs installed. Unix would do those extra installs automatically if configure didn't detect them. Though that still leaves the "problem" that the user would have to link in more than just -lalleg (though here again, Unix could add those as needed, I don't think Windows/DOS would have a way to automatically).

I believe GCC allows you to specify extra libs when creating a lib (via gcc or g++), and those extra libs will be added automatically when the new lib is linked to a program. But AFAIK, MSVC doesn't do that.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

23yrold3yrold
Member #1,134
March 2001
avatar

Couldn't someone hard-core write a PNG loader from scratch? All they need to be able to do is load and save. You could even peek at the open-source libs to see how they do it. :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Carrus85
Member #2,633
August 2002
avatar

I think the main reason is because of what window's programmers term "DLL Hell"... Personally, I wouldn't mind having a few more of the "useful" features incorperated into the main library stream. DLL's are bad, but there is no reason to completely avoid them.

Especially if we could do some cool stuff like specify where the dll's are located...

Speaking of which, is there any way to do something like #define ALLEGRO_DLL_SEARCHPATH "/dlls" and move the dll's out of the program directory (or have the option to place them elsewhere, at least)?:)

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Couldn't someone hard-core write a PNG loader from scratch?

Then of course you run into the problem of incompatibilities in the loader, and retain the problem of not upgrading when things are added.

Quote:

Speaking of which, is there any way to do something like #define ALLEGRO_DLL_SEARCHPATH "/dlls"

This is the OS's job. The OS searches the program's dir, then the system PATH environment var. Allegro has no control over it.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

CGamesPlay
Member #2,559
July 2002
avatar

Yes; add "../dlls" to your PATH.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Chris Katko
Member #1,881
January 2002
avatar

Quote:

If we compile zlib/libpng into Allegro, you won't have a way to upgrade those libs without rebuilding Allegro.

Is that a problem? Unless there is a catastrophic bug/security threat in the code, they shouldn't even need to be updated that often, right?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Kitty Cat
Member #2,815
October 2002
avatar

Need? Perhaps not. But a) it'd make the Allegro lib bigger, and b) you'd lose out on all the advantages future versions of those libs may have (maybe an updated PNG standard, faster and better decoding/encoding, etc).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

CGamesPlay
Member #2,559
July 2002
avatar

The same problem exists for people who use those libraries now: they need to recompile them to get the new features. I don't see how that argument carries weight.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

The same problem exists for people who use those libraries now: they need to recompile them to get the new features. I don't see how that argument carries weight.

You'd only have to recompile and install libpng and zlib.. and everything that uses them automatically uses the updated libs (assuming you're using dynamic libs, which IMO is dumb not to for these).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Carrus85
Member #2,633
August 2002
avatar

Quote:

If we compile zlib/libpng into Allegro, you won't have a way to upgrade those libs without rebuilding Allegro. If we leave them external, there's no easy way to tell if the user already has them or not (Unix could use a configure check, but Windows and DOS has no such way to check).

Call me stupid, but who said the libraries had to be compiled directly into allegro? You can support something without having to directly compile it into the library. Just look at allegGL... you added openGL support to allegro without modifying the original allegro library.

True, it might get a bit ugly with dll dependencies, but it works...

Kitty Cat
Member #2,815
October 2002
avatar

I also said:

Though that still leaves the "problem" that the user would have to link in more than just -lalleg

;) GCC could probably get away with it, but I don't think other compilers would.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Marco Radaelli
Member #3,028
December 2002
avatar

I will prefer the actual approach. This mostly because i.e. zlib developers aren't Allegro developers, so coordinating the work isn't as easy as if we're talking about DirectX, which is made by the same company.

Moreover, say for the GUI, here we have more than one solution, so including just one will require to choose one and not the other and including all may cause incompatibilities and will surely result in a waste because you can't use more than one GUI system at the same time.

Actually most of the libs out here are easy to install, so I do not see a real need to include all them in Allegro.

So, mostly what 23yrold3yrold said :)

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Actually most of the libs out here are easy to install

I've tried compiling both Miran's and Steve's GUIs and failed in both cases because I haven't managed to compile some of required libraries. Some of you probably won't agree, but I think that libraries should come in binary form too. :)

Marco Radaelli
Member #3,028
December 2002
avatar

I said:

Actually most of the libs out here are easy to install

I should have said at least half of them :)

I have had the same problem with masking... I'm starting to hate dependencies >:(.

Chris Katko
Member #1,881
January 2002
avatar

Quote:

Moreover, say for the GUI, here we have more than one solution, so including just one will require to choose one and not the other and including all may cause incompatibilities and will surely result in a waste because you can't use more than one GUI system at the same time.

That's not the same thing. There's a difference between many GUI libraries (err, two?) and adding support for PNGs. There aren't 10 different ways to load a PNG. It either works, or doesn't (excluding bugs).

Quote:

Need? Perhaps not. But a) it'd make the Allegro lib bigger,

Though, I must ask, does that matter in this day-and-age? It's already bigger than a floppy. How big are SDL, OpenGL, and DirectX?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

X-G
Member #856
December 2000
avatar

I agree with Chickenko, and also would like to add that any added feature will add to Allegro's size. So, either we stop adding features completely, or accept that the size of the library will inexorably grow; in which case, we need to ask ourselves not "does this make the lib bigger?" but "is this worth making the lib bigger for?"

In the case of PNG, I say the answer is a huge "yes".

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Kitty Cat
Member #2,815
October 2002
avatar

I still think using dynamic linking is better. Making the lib bigger may not be that big of a deal, but I think the loss of easilly upgrading the libs for your project is. Even if you specify zlib and libpng explicitly on the command line, the ones in Allegro would override it. Not to mention if you do: -lalleg -lsome_other_lib_that_uses_zlib_andor_libpng -lpng -lz.. how would GCC handle that? You could potentially get both versions of the same lib linked in.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

lucaz
Member #4,194
January 2004

if allegro get bigger because of new features that everybody needs, (like load a png!!!!!) theres not problem.

I dont care about each update of a lib. I dont think game developers will update libs in the middle of a project!.

 1   2 


Go to: