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
Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Level 1 and Level 2 are "official" allegro addon classes.

I don't really get this "official" addon.. thing. If it's something useful, and the Allegro developers are willing to work on it, why keep it seperate? It'll just add to the list of dependancies that a program using Allegro would need.

"You need Allegro, and you also need to get the official Allegro Ogg addon, the official Allegro GL addon, and the official Allegro PNG addon, etc..." isn't much different than "You need Allegro, and you also need to get the AllegroOgg addon, and the AllegroGL addon, and the loadpng addon, etc..." The only difference is that one uses the word "official".

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

What I failed to mention is that in almost all cases, one would compile Level1 as official "current" distro. That way, if people want to just use the core hardware libraries, they can compile a core version of the library (something like alcore40.dll and liballegcore4x) so the already existing "user friendlier" functions are not clogging their programming. Of course, one could also create an official allegro-full distro that has all of the level2 addons in it as well. (something like alfull4x.dll and liballegfull4x). Level one would be the standard liballeg and alleg4x.dll. This way, one has the option to download the entire full-blown prepackaged monster. This pleases people like me that want it all in one nice, neat package, while at the same time pleasing those who want their current packaging system. It also allows for people to compile programs in a much smaller blueprint than previously possible as well. For example, a person could install the core, then use the static-link version of their level 1 and level 2 libraries (which is the current system right now).

As for X-G's comment about "now we have a 40mb library." That is just dumb. The distro itself is a little bit over 2.5mb right now, and that is including demos, examples, documentation, and tools. For our 56k modem friends out there, that is still relatively decent download size. If the demo was completely ripped out and placed as a seperate download, as well as the examples, documentation and tools, the library size that is required to get started is even less. True, it still needs to be available in an all-encompassing package for those who want it.

I'm going to write up a pdf proposal on what exactly I'm saying here.

Kirr
Member #5,060
September 2004
avatar

Matthew Leverton said:

That's what my point #4 covers.

hm, right. approximately.. :)

Quote:

The more vital it is toward Allegro's goal (whatever that is), the less concern for bloat. As the benefits of a feature becomes more doubtful, then the impact it has on the library (bloat & maintenance) should become less minimal.

What I was trying to say is that not the bloat is the problem (who cares these days, also what not used will be not linked), but incomplete or imperfect features. For example Allegro's 2d and input is pretty much perfect (except the lack of event-based input). But fixed point math is more like a joke these days.

Quote:

I cannot really tell if you are saying whether or not sound playback should be part of Allegro or not...

It may stay, since it's there already. I agree, it's convenient to have all stuff ready in one lib. But sound recording is not too badly needed feature for a normal game..

Quote:

There already is a lib for graphics (SDL).

Yeah, but it's like saying that VESA is API for graphics. SDL just gives you the screen pointer (well a little more than that) and you're on our own. Allegro way is so much more friedly! :)

--
"Go to the NW of Stonemarket Plaza to the Blue Glyph Keeper Library door and enter."
- Lunabean's Thief Deadly Shadows Walkthrough, day eight

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

(something like alcore40.dll and liballegcore4x) ... (something like alfull4x.dll and liballegfull4x)

Eww...

So, if I download AllegroFull (core+level 1 and level 2 addons), and somebody uses AllegroCore (core and nothing else), I'll have to get core, too? Or if I have the core and someone uses full, I'll have to scrap what I have and get full?

And don't even suggest allegxx.dll, allegxx-level1.dll, allegxx-level2.dll, etc. That is just plain ugly in WIndows.

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

KC, no, AllegroFull includes core, level 1, and level 2 (DLLs and libraries). Thus, if anyone develops with these libraries, they are all backwards compatable with each other. As for core developers using "full" programs, that is ineveitable no matter what you do: you have to have the proper libraries to run the program.

Example:

User A has full
Developer B has core

User A can run anything developed with a proper version of core, standard, or full.
Developer B can develop programs for anyone who has core, standard, or full installed.

Developer B can only run core programs, however, because he only has core installed.

EDIT:

Attached is a very rough start of a PDF (well, actually it is a converted openoffice document) that describes in somewhat more depth what I am thinking of. It needs more polish (buckets of polish, actually), but I'm to dang tired to work on it anymore. Feel free to read it if you so wish.

EDIT: Fixed typo in PDF

Kitty Cat
Member #2,815
October 2002
avatar

I just don't see it as a good solution. I think it's pretty obvious that the core-only distribution is mostly worthless. You can get the same functionality, plus some nice useable extras, by getting the standard at no real extra cost other than a few minutes extra download time (if that). It would just be a waste of time to support.

A similar thing would be true between standard and full. Either people will use the full distro, requiring others to use full if they want to use others' programs, and basically make standard worthless.. or not have many people use full, and make that worthless to package up.

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

tobing
Member #5,213
November 2004
avatar

I think the emphasis should be on consistency resp. integrity in allegro. Actually, being able to use it very easily, getting a lot of work done behind the scenes is precisely what I like about allegro. I would certainly wish that the areas which are covered by allegro would contain networking, maybe sound input and other stuff, but IF any of these would be to be moved into allegro, then it has to be consistent and seamlessly integrated into the usual way allegro is used.

Well, I think hereÄs the difficult part. I have been thinking about collecting a few addons together with allegro and package that as allegro molto. I'm also seriously considering this, and I'll be working on this as my project makes progress. But there's one inportant problem: allegro itself does not rely on other libraries, so that's easy. Extensions like algif or alpng do rely on other libraries, which have to be incorporated somehow. But then either you have to continuously update to developments of the other libraries, or refer to maybe outdates versions.

For me, simplicity would be a major issue as well. That would mean that I don't want to change anything in zlib or libpng (as an example). That again would violate consistency with allegro. Another more technical point: Do you want to have all extensions be included with allegro.h? If so, you would have to make major changes, not only to allegro.h but probably also to the incorporated libraries. Including the while build process. Or, the simpler way, which I would prefer in the first steps, is to just place all libraries next to each other, each with its own way to be used. The main advantage would be that the distributor would have verified that 1) all versions work together and 2) all libraries are complete. That's actually a bit of work, because you would need a decent test program which calls into each library and tries to do some little things with it. Not having such a program is my main reason for not already haing this collection ready...

But then, the design question remains. Putting all together into allegro.h would require major code changes, which generates a lot of reworking when components are to be updated. Leaving everything next to each other would violate allegro's consistency.

I'll be on vacation next week, so I plan to implement some advancements here.

Maybe I'll also add some accelerated versions of bitmap functions, as I have seen from my tests that only draw_sprite() using a system bitmap is actually accelerated, but the draw_sprite_*_flip functions are not, though the entries in the vtable are already there.

Carrus85
Member #2,633
August 2002
avatar

Well, I guess a modification on that scheme would be a to just distribute full and have those distictions only internally, just to expidate development in various areas.

I don't know. All I know it is dang annoying that I have to download packages A to do B, C to do D, E to do F, each with their own little itiosecrecies, build problems, differing build methods, seperate downloads, varying quality documentation, and bugs. Especially when the features provided by A, C, and E could reasonably be integrated into a single Allegro Distribution that could be used to do it all.

Maybe we could do this: We could have allegro, than someone else could maintain allegro: bloat edition that has every single concievable addon, library, etc. within it.

All I know is that it is dang annoying to have to download all sorts of weird crap just to get one thing to work quickly and the way you want it to. Not fatally annoying, just annoying.

Don Freeman
Member #5,110
October 2004
avatar

Quote:

...I'd much prefer having one library (Allegro) that has all the low level gaming routines needed to create a modern game (emphasis in 2D) bundled together in the nice Allegro license...

Quote:

...I would certainly wish that the areas which are covered by allegro would contain networking, maybe sound input and other stuff...

Exactly!!! Allegro is a GAME programming library, and today more and more games use some sort of networking. I do sincerly beleive that this would benefeit allegro. The possiblities are endless. One thing I HATE is using several differant libraries. But what I HATE EVEN MORE is having to learn all of the quirks of their's. Some might not even be in active developement, or just totally abandoned. Say you wrote your game and had to use the Hawk network lib....then the project is abandoned and doesn't work with a newer version of allegro. Now you are stuck either rehacking a library you might not know...or abandoning your project all together! Would it really be that hard to include net support for us poor people who would like to just use one library? Even if it was a simple wrapper over sockets or something would be better than no support except by using a seperate lib! I love the ease of use of allegro...network support would just be the icing on the cake for me, and I would finially be in heaven...::)

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

tobing
Member #5,213
November 2004
avatar

Just one remark, as I was thinking about that: Instead of having one dll for each level - alcore, allevel1, alfull - I would prefer alcore, aladdon1, aladdonfull or somthing, which means that for the full thing you would need all 3 dlls. That way programs can remain compatible like requested by somebody above.

Kitty Cat
Member #2,815
October 2002
avatar

I, previously, said:

And don't even suggest allegxx.dll, allegxx-level1.dll, allegxx-level2.dll, etc. That is just plain ugly in WIndows.

:P

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

Hi,

We had a burning discussion on this in #allegro yesterday ....

These were my views in the discussion:

1. Allegro currently puts certain implementation specific code into the same distribution. So why not separate the base from the extensions part? For instance, when bitmapping routines may be part of the base library, the bitmap file loading code and the driver specific code could be put into the extension libraries ... People who need a single binary distributable could link statically with the extensions. The whole point in removing the core part is, if there's a major patch in the one part of the library, the other one can be used as-is. It solves problems of big DLL overhead for those developers who don't want all the functionality.

2. About having many DLLs, your system already has too many of them. Think of it, Allegro uses DDraw, DInput and DSound!!! So why not put it separately when it can be beneficial for the development process? As such, the newbie doesn't bother if the re has to be a -lalleg or -l albase -lalstddext -lalmp3ext -lalaviext .. he just follows the manual and things are OK.. For other *nix platforms, there can be appropriate .so files instead of the DLLs ..

3. The Allegro core system currently has so many restrictions on how to plug newer things into it, and it becomes a mighty hack as to which extension library uses the core how .. each one has it's own separate code. Now, some developers do agree that it would be useful to put in certain things like PNG and MP3/Ogg decoding ino the core library and not as an extension. But then, they are already out there as extensions. So, the point here is, if the base of the library could be tweaked to remove the implementation specific file loading parts out, it might be easier to add on a BITMAP * loadPNG() or a SAMPLE* loadOV() into Allegro's extension library ...
It wouldn't lead to a new base release then. Only an extension release... (agreed that the WIP versions may not be backward compatible)

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

For instance, when bitmapping routines may be part of the base library, the bitmap file loading code and the driver specific code could be put into the extension libraries

"Yeah, Allegro can blit bitmap images easilly. ... Oh, you want to load images? Sorry, you'll need an extension for that."

Quote:

2. About having many DLLs, your system already has too many of them. Think of it, Allegro uses DDraw, DInput and DSound!!! So why not put it separately when it can be beneficial for the development process?

But this isn't beneficial for the development process. It just adds more seperation where there doesn't need to be. And yeah, Allegro uses ddraw, et al.. but you only need to package your exe and the dll (and maybe data, if it's not in the exe). Not the exe, alleg.dll, ddraw.dll, dsound.dll, dinput.dll. The user more than likely has DirectX already. They probably don't have Allegro already.

Quote:

3. The Allegro core system currently has so many restrictions on how to plug newer things into it, and it becomes a mighty hack as to which extension library uses the core how .. each one has it's own separate code. Now, some developers do agree that it would be useful to put in certain things like PNG and MP3/Ogg decoding ino the core library and not as an extension. But then, they are already out there as extensions.

Well, some Allegro developers think it'd be useful for Allegro to have sound, but there's no need since it's already available with FMOD/OpenAL/etc. The point is to have an all-in-one library of commonly useful features so you don't need to hunt down a million general dependancies. Any dependancies should be specific to the game.

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

Evert
Member #794
November 2000
avatar

Quote:

As for DGA.. what kind of hardware acceleration does that provide, beyond direct access?

Frankly, I don't know. But it's marked as deprecated in recent XFree86 versions and X.org, so...

Quote:

Moving GUI code to an optional 1st-party addon
Moving 3d rendering code to an optional 1st-party addon
Moving Datafile handling code to an optional 1st-party addon (maybe)
Moving ALL but the most basic of file loading routines into an optional addon. (PCX and such come to mind)

Adding low-level networking support (BSD Socket wrappers) to the core
Adding better hardware acceleration support

Yes, Allegro needs more modularity and it needs new things too. This has been discussed and agreed on. It `just' needs to be done.
Personally, I think a dedicated networking addon would be better than something hacked into Allegro, but maybe it's something to bring up again a bit further down the 4.3 branch.

Quote:

I don't know. All I know it is dang annoying that I have to download packages A to do B, C to do D, E to do F, each with their own little itiosecrecies, build problems, differing build methods, seperate downloads, varying quality documentation, and bugs. Especially when the features provided by A, C, and E could reasonably be integrated into a single Allegro Distribution that could be used to do it all.

The idea behind Allegro's proposed plugin/addon system is to make it more of a homogeneous whole. Ideally, Allegro's installer/makefile would be able to detect plugins and build them automatically for the current platform:
`Oh, I need Allegro-png.' - download into allegro/plugins - run fix/make/whatever from Allegro's base directory and allegro-png gets build and installed correctly for your platform.
Someone needs to do work for this though.

Quote:

Say you wrote your game and had to use the Hawk network lib....then the project is abandoned and doesn't work with a newer version of allegro. Now you are stuck either rehacking a library you might not know...or abandoning your project all together! Would it really be that hard to include net support for us poor people who would like to just use one library?

No, but the question to ask is if it is worthwhile to do: if there is already a freely available library out there (HawkNL is, last I knew, GPL, so you may not want to use it for licensing reasons) do you spend valuable developer time on making yet another network library? I don't think we should want to reinvent the wheel if someone else already figured out how to make a round one.
I would also like to point out that it is not nescessarily less likely that Allegro is abandoned than HawkNL is.
What I would really like is to have libnet resurrected and brought up to date: it's license is like Allegro's license and it's documentation, if not like Allegro's, is fairly decent. More so than HawkNL's, although that may have changed since I last looked at it.

Quote:

Attached is a very rough start of a PDF (well, actually it is a converted openoffice document) that describes in somewhat more depth what I am thinking of. It needs more polish (buckets of polish, actually), but I'm to dang tired to work on it anymore. Feel free to read it if you so wish.

Will do, when I have time.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Allegro's installer/makefile would be able to detect plugins and build them automatically for the current platform:
`Oh, I need Allegro-png.' - download into allegro/plugins - run fix/make/whatever from Allegro's base directory and allegro-png gets build and installed correctly for your platform.

I really really don't like this.

"Oh, this game uses Allegro." downloads Allegro and game "What? I need Allegro-png, Allegro-Ogg, Allegro-dat, Allegro-insound, and Allegro-GL too?! Forget 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

Quote:

"Yeah, Allegro can blit bitmap images easilly. ... Oh, you want to load images? Sorry, you'll need an extension for that."

is better than:

"W00t! Thing does every darn thing: BMP, PNG, JPG, XCF, GIF.. what not?!! And every time there's a bug in one of these loaders, we get a new release!!! COOL!! :D"

Quote:

But this isn't beneficial for the development process. It just adds more seperation where there doesn't need to be.

There won't be a problem the way I see it. As it is, the user will only be interacting with the implementation specific code more than the base... I don't see how this is going to affect him much :P

Quote:

And yeah, Allegro uses ddraw, et al.. but you only need to package your exe and the dll (and maybe data, if it's not in the exe). Not the exe, alleg.dll, ddraw.dll, dsound.dll, dinput.dll. The user more than likely has DirectX already. They probably don't have Allegro already.

Probably all future EXEs will carry an allegro-runtime installer, just like every commercial game ships with DirectX. Face it, it's also easier if runtime installers are available for platforms like Linux, which can make it far easier for users to install and play Allegro game binaries..

Quote:

The point is to have an all-in-one library of commonly useful features so you don't need to hunt down a million general dependancies.

Is FLIC code all that common? Or LBM loaders? Face it, time changes. Yeah, probably all this helped people develop the games of yesterday.. and probably it will help, for a few more days.. And then, all of a sudden, you'll just trash Allegro away when you realize that this framework is too rigid and you need to get more and more extra libraries than just Allegro? No way! If Allegro needs everything, you'll have to put it in without affecting the core of the library. That's the whole point.

Evert
Member #794
November 2000
avatar

Quote:

"Oh, this game uses Allegro." downloads Allegro and game "What? I need Allegro-png, Allegro-Ogg, Allegro-dat, Allegro-insound, and Allegro-GL too?! Forget this..."

Well, I see your point. I was thinking more of the technical aspect of the installer/configuration programme though. It would be nice if Allegro's installer could detect and build common extensions and plugins so that you needn't install all of them seperately and in different ways.
What you describe could happen now too: the person who wrote the game failed to mention several dependencies that are needed to compile the game. But you bring up a good point: there would be a danger of having a big download or `Allegro+' version that includes everything: people may forget that they have several dependencies that are masked by the larger Allegro distribution and not mention them.

guilt
Member #2,553
July 2002
avatar

Well, I didn't mean that these extensions should be kept separate from the main library.. as such, the whole distribution will contain the allegro base plus its standard extensions (say BMP, LBM, PCX) .. it's supposed to work just like in OpenGL 2 .. when GLSL 1.0 became part of the core..

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

is better than:

"W00t! Thing does every darn thing: BMP, PNG, JPG, XCF, GIF.. what not?!! And every time there's a bug in one of these loaders, we get a new release!!! COOL!! :D"

I would disagree. I would rather have Allegro do a little more than I want, than a little less than I need. Allegro wouldn't be updated for every little bug, and you'd only need to update if the update offers functionality you want or need.

Quote:

There won't be a problem the way I see it. As it is, the user will only be interacting with the implementation specific code more than the base... I don't see how this is going to affect him much :P

I don't generally like having a bunch of files in a main game directory. And the more seperate DLLs there are, the greater the chance of incompatibilities between them. "core 4.4.6, a-png 4.4.4, a-ogg 4.4.5 is alright.. but core 4.4.6, a-png 4.4.5, a-ogg 4.4.6 isn't.. though core 4.4.6, a-png 4.4.5, a-ogg 4.4.5 is..." shivers

Quote:

Probably all future EXEs will carry an allegro-runtime installer, just like every commercial game ships with DirectX.

I'd think hardly any Allegro games are commercial quality. :P While it'd be nice, most people probably wouldn't bother.

Quote:

Is FLIC code all that common? Or LBM loaders?

What does that got to do with anything?

Quote:

And then, all of a sudden, you'll just trash Allegro away

You'd trash Allegro just because it has a few outdated features?

Quote:

If Allegro needs everything, you'll have to put it in without affecting the core of the library. That's the whole point.

I could add PNG and Ogg (Vorbis and Theora) right now without it affecting the rest of the library. The reason why we don't is because it'd create dependancies for Allegro (which some of us are trying to find ways around).
And all it'd do is bump one revision number. :o

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

When you know that your whole core is wrong, you wouldn't expect ur alleg41.dll (4.1.18) to work with something done with Allegro 4.1.16 .. So I don't see why a set of Allegro DLLs or a single DLL could be a issue :P Also, if the core is stable, it might never need any update at all :P Or if the PNG whomsoever decides that it's time for a new PNG2 format and then probably an alleg-myext-png2-4.4.7 wouldn't be wrong a all :P

It won't be versioned this badly, I assure you.. I'm only talking about few major DLLs than one:

allegro base, allegro implementations and allegro standard extensions..

If user needs, let him/her put on more of thse extensions .. or choose a whole new implementation whatsoever (let's say he wants to use Miles3D Allegro sound driver rather than a DSound or Allegro Mixer ...) it should just be easy to plug it in..

If user doesn't need the BMP code anyway, it will still be part of the standard extensions (if this is an issue, KCat!!) .. or let him not use that at all!!

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

When you know that your whole core is wrong, you wouldn't expect ur alleg41.dll (4.1.18) to work with something done with Allegro 4.1.16 .. So I don't see why a set of Allegro DLLs or a single DLL could be a issue :P

I have no idea what you're getting at.

Quote:

If user needs, let him/her put on more of thse extensions .. or choose a whole new implementation whatsoever (let's say he wants to use Miles3D Allegro sound driver rather than a DSound or Allegro Mixer ...) it should just be easy to plug it in..

Something like this is already possible now. Write a driver vtable, init the sound stuff and set digi/midi_driver to your vtable. Allegro will now use your vtable for sound functions (granted the vtable isn't documented, and is subject to change.. which is why it's not a real "feature"). But that's basically what AllegroGL does with graphics (though it does poke a little more at the internals of Allegro).

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

the whole point is to give everybody a "clean interface" to poke Allegro in the right places.. :) that's why we need a good clean pluggable base.. and the implementation part can just be kept in another container binary file. that's the difference. :)

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

the whole point is to give everybody a "clean interface" to poke Allegro in the right places.. :)

That would be up to the developrs to decide/implement. The font vtable is getting a clean (possibly public) interface. Packfiles are. Perhaps more vtables will.

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

hi..

i drew up one image .. hope this gives an idea of what i meant :)

X-G
Member #856
December 2000
avatar

Quote:

As for X-G's comment about "now we have a 40mb library." That is just dumb.

I'd wager it is you who are dumb. Please refer to this dictionary definition of hyperbole:

Quote:

A hyperbole, largely synonymous with exaggeration and overstatement, is a figure of speech in which statements are exaggerated or extravagant. It may be used due to strong feelings or is used to create a strong impression and is not meant to be taken literally.

My point is that adding things that do not explicitly break the library can still be very, very bad, as they only add bloat that most people won't even find useful. Damn it, has no one heard of figures of speech these days?

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



Go to: