Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » New Allegro Funtions / Layout

This thread is locked; no one can reply to it. rss feed Print
New Allegro Funtions / Layout
spellcaster
Member #1,493
September 2001
avatar

Quote:

Please refer to this dictionary definition of hyperbole:

That it's a hyperbole doesn't make it less dumb. Allegro is a pretty llarge lib right now as well, but I'd rather have a 500k dll than an extremly modularaized system.
If you want to reduce your size, you can always static link. And most of the time the allegro DLL wouldn't be the best point of optimization.

Allegro should be more than a lib. It should be a solution. As it is right now. The only thing that really should be added is support for a "modern" image format (PNG comes to mind) and hardware accel.
GUI and Video support (FLI at the momemt, hopefully something better for later versions) should be made add-ons.
If we want audio support, we should take a look at fmod and consider to get some inspiration from it. Outsourcing audio completely would be a bad idea, making the support too basic isn't that clever either. If we have basic support, the user can either use plug-ins which try to do their best using the given allegro interface, or use a specialized lib (OpenAL or FMod) which can handle all they need.
If allegro wants to stay a all-in-one solution, we need good audio support, including a way to play streaming (pseudo) CD quality music.

Input device support should be modelled after DInput mainly because that is the Defacto standard right now. And we should support force feedback in both the down-to-the-metal version that dinput supports and a high level version that simply "rumbles".

While a FVS would be nice, if we do it, we should try to use something that is already tried and proven - like the zip interface. Which would fit perfectly the suggested PNG support.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

X-G
Member #856
December 2000
avatar

Quote:

Allegro is a pretty llarge lib right now as well, but I'd rather have a 500k dll than an extremly modularaized system.

So would I, but I'm objecting to the "whatever doesn't break the library only makes it stronger" statement. Nothing else. I'd love to see PNG and OGG support in the core library as well, but that statement up there is just asinine. That's the kind of statement that leads to Allegro having Fourier transform functions, because it "doesn't break the library".

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

guilt
Member #2,553
July 2002
avatar

hey guys.. i'm not sure where the real issue of splitting up is, because already Allegro has dependancies.. like, they do not have a single directx.dll or a windows.dll that Allegro uses.. and there's a separate DLL for the dx GUIDs as well ... Why can't we split it up if it becomes easy to make major updates to the core? And to the implementations as well?

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Most users would already have the Windows and DirectX DLLs. Most won't already have the extra Allegro DLLs.

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

guilt
Member #2,553
July 2002
avatar

Right... about that..

1. It ideally can be a redistributable Allegro distribution which can make things easier for the developer.. And about the point on not so many commercial Allegro games, I don't think that's fair. People would like to have a feel that Allegro is a standard for making commercial quality games.. And whether it's used to that extent or not is solely dependant on the developer..

2. If you are releasing the game, you wouldn't be bother about releasing a version of MSVCRT.DLL that's already assumed to be there... In any way, it's either going to be one binary (static linked), or not one binary.. So What's the issue is the question? It's not going to make your distribution cluttered.. You just have to package the re-distributable installer with the game installation ... or keep ur DLLs in a separate bin folder ..

But, on the other hand, look at it this way: the development process of Allegro will become much easier. You are going to distribute all the three subprojects/DLLs/.libs in the same package after all.. Updation of subprojects is easier .. and just that the organization of code is more modular.. Hey, think about it.. :)

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

1. It ideally can be a redistributable Allegro distribution which can make things easier for the developer..

Redistributable Allegro distribution? The current Allegro distro is redistributable already...

Quote:

And about the point on not so many commercial Allegro games, I don't think that's fair. People would like to have a feel that Allegro is a standard for making commercial quality games.. And whether it's used to that extent or not is solely dependant on the developer..

Having many seperate DLLs for one library doesn't make a game feel more commercial. If anything, just the opposite.

Quote:

2. If you are releasing the game, you wouldn't be bother about releasing a version of MSVCRT.DLL that's already assumed to be there... In any way, it's either going to be one binary (static linked), or not one binary.. So What's the issue is the question?

"game.exe + data.dat + allegxx.dll" vs "game.exe + data.dat + alleg-xx-core.dll + alleg-xx-imgldrs.dll + alleg-xx-sndldrs.dll + ..."
or for source distribution:
"You need Allegro version x or better" vs "You need Allegro core version x, Allegro image-loaders version y, Allegro sound-loaders version z, ..."

Quote:

It's not going to make your distribution cluttered..

Splitting up the library will make more DLLs, which will cause more DLLs to be in the game's directory, which is clutter.

Quote:

You just have to package the re-distributable installer with the game installation

Not everyone is (I'd say most aren't) going to bother with an installer. Especially for source distributions.

Quote:

or keep ur DLLs in a separate bin folder

Windows doesn't allow that. If the DLLs aren't somewhere in %PATH% or the current working directory, it won't be loaded.

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

guilt
Member #2,553
July 2002
avatar

hey look.. you know that.. setting an evironment variable is not a "big" thing :P
and, if you don't want clutter, go and link ur EXE statically, and append the data.dat to it using exexedat :P it still doesn't give you a valid reason to say why splitting the library is wrong in the first place :P

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

setting an evironment variable is not a "big" thing :P

Rule of thumb: If you have to ask a Windows user to do something more than double click here and there, they aren't going to do it. Yes I know they're not all like that, but it's a nice rule of thumb to go by. And you do not want to modify a user's system settings on them.

Quote:

if you don't want clutter, go and link ur EXE statically

Which defeats the entire purpose of DLLs, which is shared code and ease of upgrading the lib without recompiling the exe.

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

guilt
Member #2,553
July 2002
avatar

Quote:

Which defeats the entire purpose of DLLs, which is shared code and ease of upgrading the lib without recompiling the exe.

Then splitting it up to re-use the base and implementation isn't breaking the rule of making the DLLs.. and, putting it together may involve recompilation of implementations even if the base isn't modified. So why have DLLs in the first place? The sharing concept didn't go ka-put! :P it went: poof!

If you want the generalized re-usability, go for DLLs. If you don't want file clutter.. why bother wasting space for an alleg41.dll? Link statically. End of story.

Karthik Kumar Viswanathan

Website

Carrus85
Member #2,633
August 2002
avatar

Quote:

Which defeats the entire purpose of DLLs, which is shared code and ease of upgrading the lib without recompiling the exe.

Um, why are we even putting the DLL code in the program directory then, KC? If every program that uses allegro includes its own copy of the DLL, then we are defeating the purpose of "sharing" the code to begin with. The point is that the allegro dlls are and should be handled behind the scenes; aka, in the c:\windows\system32 directory. This way all allegro programs use the same DLL. This ensures that the DLL is in a commonly accessable location. It also prevents windows users from having to mess with pathing or having a cluttered directory; just copy the dlls to the system32 folder with the installer if they don't already exist, and viola! you're done. No more clutter, no more duplicated DLLs.

EDIT:
And even this definition of the reason allegro is in a DLL is rather flawed. True, you can try to use a new DLL with an older version of the executable, but so many things are changing (especially with WIP releases) they are bound to be broken.

Quote:

Splitting up the library will make more DLLs, which will cause more DLLs to be in the game's directory, which is clutter.

The multiple DLL clutter issue is really a moot point. Most users never even look at the programs directory to begin with; they just extract and run a shortcut. Who cares what the dlls look like in the directory? If it makes updating easier for us, the developers, then I say go for it.

I mean, here, lets look at some more "common" programs and their DLLs in their directories:

Starcraft w/ Broodwar - 5 Dlls in the root directory
Battlefield 1942 - 4 DLLs in root
Total Annialation - 9 DLLs
Valve's Steam - 5 DLLs
Blender - 3 DLLs
GIMP - 17 DLLs in the Bin Directory (where gimp.exe is located)
OpenOffice.org - 200 DLLs in Program directory (where soffice.exe is located).

DLL clutter is VERY common, and really isn't a problem, unless you like to browse your program directory daily and on a regular basis. Here, try this for a rule of thumb: if the user has to be messing around in the program directory to get things working, there is something wrong besides the DLLs in the directory. ::)

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Then splitting it up to re-use the base and implementation isn't breaking the rule of making the DLLs

Never said it was.

Quote:

and, putting it together may involve recompilation of implementations even if the base isn't modified.

I hardly think Allegro is large enough to make this a cause for concern.

Quote:

If you want the generalized re-usability, go for DLLs

Which is why we put Allegro into a DLL, so it can be reused by multiple programs.

Quote:

If you don't want file clutter.. why bother wasting space for an alleg41.dll? Link statically. End of story.

You're not making sense anymore. Linking staticly will waste more space than dynamicly. And splitting the library isn't going to have any effect on code re-use since Allegro is already all inside a DLL.

Quote:

Um, why are we even putting the DLL code in the program directory then, KC? If every program that uses allegro includes its own copy of the DLL, then we are defeating the purpose of "sharing" the code to begin with. The point is that the allegro dlls are and should be handled behind the scenes; aka, in the c:\windows\system32 directory.

And how will this change with multiple DLLs? It'll make more work for the program developer to keep track of more than one DLL, and it'll make more work for the library developers to keep track of seperate packages.

Quote:

If it makes updating easier for us, the developers, then I say go for it.

That's the thing though. It won't. Either you now have to download/install/use multiple packagaes instead of just one, or you get the all-in-one package which defeats the whole seperate-packages issue.

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

You're not making sense anymore. Linking staticly will waste more space than dynamicly. And splitting the library isn't going to have any effect on code re-use since Allegro is already all inside a DLL.

The problem is not code reuse, it is the fact that some portions of the library may become "more stable" at a more rapid rate than others. Thus, these portions of the library would be upgradable independantly of any other "lesser" sections. The problem right now is that while certain parts of the library are maturing at a decent rate, other parts are lagging behind, pushing back "stable" release dates for other features.

Splitting was never designed to increase code re-use; it is designed to prevent redundant updates and to expidite development of the library in various areas. (Not to mention it helps remove the libraries dependancy on all sections of itself. If a person wants to use allegro for nothing more than a hardware wrapper (no "frosting" functions), they only include one, much smaller DLL, instead of including one much larger dll in their installer.)

tobing
Member #5,213
November 2004
avatar

More DLLs = more problems. Either you keep it simple and release all DLLs together, then there no advantage over having one DLL. Or you release the parts separately, then you'll get into versioning-hell. So I would prefer to stay with one single DLL here.

guilt
Member #2,553
July 2002
avatar

@KCat.. look at the point:

1. Linking statically doesn't share the common code. (agreed)
2. Linking dynamically doesn't make a difference when there is one DLL or two DLLs or 200 (agreed)
3. DLLs increase file clutter : you mean to say, I have 300 Allegro games and there will be 300x alleg4x.dlls or 300 x 3 = 900 DLLs? So where did all that code sharing go?
(flame here)
4. Splitting the library isn't going to cost the developer/producer/publisher :P (flame here)
5. The gamer (user) doesn't bother if there are some 3000 DLLs in that directory. He just double clicks the EXE file, plays the game and stays happy. (agreed)
6. Splitting the library does make it easy for Allegro-Developers. (agreed)
7. The developers are going to get the whole package, just more organized. They don't lose anything. They'll gain when Allegro gets more loaders into the extensions package... Their code won'tt not need any re-compilation.. Coz updating the alleg-stdext.dll will cause a load_bitmap() to load a PNG file in the future. it's just like updating to a newer version of alleg41.dll .. No difference, see?!!

seriously, give me good reasons as to what makes it too hard to follow? And a good reason is not like:

"it's been like this all this years, and I don't like it" :P

@Tobing:

Versioning hell is a problem, eh? Try running a 4.1.18 compiled game with a 4.1.16 dll, did it make any difference? :P These arguments are just lame. DLL hell with one DLL, DLL hell with 10 DLLs :P

P.S.: I, as an Allegro user am ready to change my makefile if it's going to help Allegro in the long run.

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Thus, these portions of the library would be upgradable independantly of any other "lesser" sections.

"Yes, the image loaders are all fully stable now. But you need to upgrade to the WIP core to use it. Sorry." or "Yeah, we got Ogg support in the latest sound loader module. Unfortunately, you need to temporirlly downgrade the core until we get a problem fixed. Oh yeah, that means you won't be able to use the fully stable image loaders, either. Oops."

You can have all that, and more, without even getting to the issue of compatibility with your programs.

Quote:

3. DLLs increase file clutter : you mean to say, I have 300 Allegro games and there will be 300x alleg4x.dlls or 300 x 3 = 900 DLLs? So where did all that code sharing go?
(flame here)

Okay, as mentioned, this is a moot point for the end user. However, you now need to keep track of what DLLs to ship with your game, instead of just one.

Quote:

4. Splitting the library isn't going to cost the developer/producer/publisher :P (flame here)

Oh, yes it will. "Oops, I forgot to package a DLL or two." ... "I'm sorry, your allegro-core is incompatible with our allegro-sound-loaders. Downgrade/upgrade your Allegro core, please. Beware, down/upgrading my break your other Allegro programs."

Quote:

6. Splitting the library does make it easy for Allegro-Developers. (agreed)

Where did I say this? It most certainly would not.

Quote:

7. The developers are going to get the whole package, just more organized. They don't lose anything. They'll gain when Allegro gets more loaders into the extensions package... Their code won'tt not need any re-compilation.. Coz updating the alleg-stdext.dll will cause a load_bitmap() to load a PNG file in the future. it's just like updating to a newer version of alleg41.dll .. No difference, see?!!

4.odd is not compatible across versions. Only 4.even is. Since most development is done in 4.odd, and compiled for release in 4.even, you still fall into versioning hell.

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

Eh, frankly, I don't care. As long as allegro either A) eventually supports automatic compilation and detection of plugins (evert's idea sounds really cool) or B) includes all of the features any decent modern gaming library solution should contain, I'm happy. The problem is that it gets, as stated previously, very annoying to get everything setup and working properly when all of the libraries have their own build systems, quirks, dependancies, bugs...

Now, if the makefile could somehow be tweaked to automatically detect the plugins and compile them, that would be one sweet setup. I could go for that.

Something like

1) You copy a standardized plugin directory into the allegro\plugin directory.
2) Run make in the root allegro directory.
3) Run make install to install all of the necessary libraries, DLLs, headers, etc.

This would have some unique implications as well. We could provide a standard method for plugins to add features to the grabber utility, for instance; or add new pages to the documentation; or add more libraries to the *nix command `allegro-config --libs`.

I could really go for a system like this. At the very least we would be providing a common framework for plugins to be built upon.

EDIT:

Although, I think we can all agree that the allegro core could be a bit more modularized. The unneeded functions could be moved into the plugin system that evert mentioned. That way, they could be "removed" without destroying the rest of the system. Of course, this complicates things because either we have to A) statically link these functions, B) create a dll for all of the plugins seperately (version hell), C) create a single Allegro DLL with all of the plugins (version hell), D) create an individual DLL for each plugin (slightly less version hell)

guilt
Member #2,553
July 2002
avatar

Quote:

"Yes, the image loaders are all fully stable now. But you need to upgrade to the WIP core to use it. Sorry."

I'm sorry.. :P because it's the core. When the core changes, the whole library changes. :P And, you don't need to update the core when it's the image loaders which have the problem. If they follow the same vtable interface, then the core won't need any updates ever

Quote:

"Yeah, we got Ogg support in the latest sound loader module. Unfortunately, you need to temporirlly downgrade the core until we get a problem fixed. Oh yeah, that means you won't be able to use the fully stable image loaders, either. Oops."

you don't update ur core unless you've gotten the whole idea of core wrong.. try another argument :P

Karthik Kumar Viswanathan

Website

tobing
Member #5,213
November 2004
avatar

Quote:

Versioning hell is a problem, eh? Try running a 4.1.18 compiled game with a 4.1.16 dll, did it make any difference? These arguments are just lame. DLL hell with one DLL, DLL hell with 10 DLLs

No need to flame here. I'm working in a project involving a bunch of DLLs, so I DO know what the versioning problem is. That's the reason why we decided to only deliver complete packages to our customers: You have to verify correctness of every combination of DLLs you're going to release. The sheer number of possibilities to get strange errors with multiple DLLs of different versions is endless, and nobody would like to try to debug those bugs.

guilt
Member #2,553
July 2002
avatar

Yeah man.. i do know what you're talking about :) The whole idea was to deliver a solid core so it is easy to debug and add on to certain parts of the library without affecting it's base functionality :)

[edit]
Btw.. the current vtable interface does have that compliancy .. so all GFX drivers that are/will be released shall be tested with the base for bugs :)
[/edit]

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

And, you don't need to update the core when it's the image loaders which have the problem.

It depends on what the problem was. Maybe to fix the problem there had to be an addition to the core.

Quote:

If they follow the same vtable interface, then the core won't need any updates ever

What if we don't get the vtable interface just right the first time? Or something comes along in the future that'd require core changes?

I'd consider something as simple as the BITMAP struct to be core-worthy. Do you have any idea how much that struct has changed throughout Allegro's development?

Quote:

you don't update ur core unless you've gotten the whole idea of core wrong.. try another argument :P

It's not a matter of something wrong. It's a matter of fixing incompatilibilities or adding, or removing redundant, functionality. :P

And see my edit in my previous post (you people post too fast >:()..

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

guilt
Member #2,553
July 2002
avatar

@KC:

Please elaborate your point on how splitting the DLLs could be a pain to the Allegro Developers themselves.. ???

and, as for the allegro-users who develop the games, it is their responsilibity to read the fine manual before publishing the games. of course the documentation will be updated... and you don't release a game before ou test it right, or give people the instructions for running it. this isn't correct at all.. when you make the game, you should be aware of what happens, where and when. :) that includes knowing what DLLs are and how exactly your allegro program works.

yeah KittyCat, agreed that splitting will now have to be monitored carefully .. but, it has to be done sometime.. else the whole library still remains the hack it was 5 years ago!!

and, the BITMAP definition would be part of the core :)

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Please elaborate your point on how splitting the DLLs could be a pain to the Allegro Developers themselves.. ???

"Hey, I just found a way to add JPG2000 support!" "Cool! But we just released imgldrs version x.y with PNG support. Perhaps the next version." "Wait, didn't you just release core version x.y? I thought we were on imgldrs version a.b?" "No, we're on sndldrs version a.b. The core is version u.v and imgldrs is x.y." "Hey guys, what about my patch? :("

Quote:

and, as for the allegro-users who develop the games, it is their responsilibity to read the fine manual before publishing the games.

Reading the manual doesn't take away from the fact that'll it'll still be a pain to keep track of everything.

Quote:

of course the documentation will be updated... and you don't release a game before ou test it right, or give people the instructions for running it. this isn't correct at all.. when you make the game, you should be aware of what happens, where and when. :) that includes knowing what DLLs are and how exactly your allegro program works.

You can only reliably keep track of what you use. Say you have a game working with core-4.3.5 and imgldrs-4.3.2. The user already has core-4.3.6, imgldrs-4.3.1, and sndldrs-4.3.3. Now you run the risk of updating his imgldrs, which is incompatible with his core. He can downgrade his core, but now it may be incompatible with his sndldrs.

Quote:

but, it has to be done sometime.. else the whole library still remains the hack it was 5 years ago!!

Why would it have to be split to update to more modern times? ??? You can internally split the code (eg. modularize) without creating multiple DLLs. Some things are already like this.

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

guilt
Member #2,553
July 2002
avatar

Isn't it already agreed that the core and loader interface is function compatible? :P And this just "appears" to be looking complicated, but it's not. If version a.b or x.y are both compatible with core c.d or e.f, it should'nt be any problem because they all work :P

And yeah, probably in ur example, the imageloaders might have a newer release so people can check out JPG2000 support along with PNG support, which will work with the same core [:P] And soundloaders is part of the same package too [:P] So, if it's in the same DLL, the patch applied is only to the extensions, which include:
JPG2000 and Soundloader patch a.b [:P] So nothing gets mised out and evrybody is happy :P

And, as developers, they are expected to be more responsible about versioning and patching up... and developers aren't downright silly :P as you make it appear.

You down downgrade cores, you upgrade them. When cores are updated they are only bug fixes, not vtable structure updates. If they are major structural updates, your imagehelpers won't do any good :P it'll just be like saying: i'm downgrading my WIP alleg41.dll to make it work with AllegGL :P having agreed that WIP DLLs are not compatible :P people using these older DLLs are doing so at their own risk.

Karthik Kumar Viswanathan

Website

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Isn't it already agreed that the core and loader interface is function compatible? :P And this just "appears" to be looking complicated, but it's not. If version a.b or x.y are both compatible with core c.d or e.f, it should'nt be any problem because they all work :P

Unless the user happens to have core g.h, which may or may not be compatible. The only way to know that would be to test (ie. more work).

Quote:

And, as developers, they are expected to be more responsible about versioning ... and developers aren't downright silly :P

It was an example. Of course developers would be able toi keep better track of versions, but that doesn't mean it'd be a huge pain in the ass to keep track of (which is, after all, what we're trying to avoid).

Quote:

You down downgrade cores, you upgrade them. When cores are updated they are only bug fixes, not vtable structure updates.

What if the bugfix implies a vtable structure update? You can't be implying that vtable structures won't change..

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

guilt
Member #2,553
July 2002
avatar

Currently, as is KittyCat, when updating the definition of the BITMAP vtable, won't the loader also change? Yes, they will :) Then anyway, the binary compatiblity is "lost" in the WIP releases.. won't they?

Also, how many times do we test the blit() and loadBMP() code when we update the BITMAP vtable definitions? If we do that, then doing the testing here won't be a big issue as well, let me assure you :)

Karthik Kumar Viswanathan

Website



Go to: