![]() |
|
The make Allegro better project |
kazzmir
Member #1,786
December 2001
![]() |
Id like to try an experiment. I think the Allegro source could be refactored somewhat and made more elegant so I propose that the community rewrites portions of Allegro. I( or anyone really ) will post a function or other snippet of code from Allegro and people can modify it in any way as long as its "better", be it by choosing better variable names or simply adding useful comments. For now the code will come from 4.2 since 4.3 isn't ready for mass consumption. After people agree on the changes it will be sent to the Allegro developers list and if approved will be committed. And if it needs justification I would say there are two main benefits. Ill start off with the gourad sprite routine in gsprite.c. I havent yet refactored this one, Ill post some modifications later on.
|
Andrei Ellman
Member #3,434
April 2003
|
I just thought that this would be a good time to post a link to the Allegro coding standards (it's the 'coding style' section) so that we know how to rename the variables/functions, and how to format the code, etc. AE. -- |
Elias
Member #358
May 2000
|
Note that we do not follow the tab standard described there anymore: Any new code should not contain any tab characters. About the original idea, it sounds good to me. Also, improving documentation of how Allegro works internaly could be a good idea.. like a description how drivers work together, and how single drivers (e.g. DirectX) actually work. Hm, and not sure how well this all can work for 4.3 as of yet, as some very base structures like AL_SYSTEM_DRIVER, AL_DISPLAY or AL_BITMAP are not implemented yet. -- |
kazzmir
Member #1,786
December 2001
![]() |
Quote: Hm, and not sure how well this all can work for 4.3 as of yet, as some very base structures like AL_SYSTEM_DRIVER, AL_DISPLAY or AL_BITMAP are not implemented yet. Thats why I think we should focus on 4.2 for now and only the parts of the code that can be used in 4.3 so the work isnt wasted once 4.2 isnt worked on anymore. [edit]
|
Evert
Member #794
November 2000
![]() |
I think this is a nice way to encourage more people to have a look at and work on Allegro. |
Peter Wang
Member #23
April 2000
|
I am all for getting more people involved with Allegro, but this is silly. Work on 4.3 instead. There's plenty to do.
|
kazzmir
Member #1,786
December 2001
![]() |
For the changelog a single line description would suffice:
Quote: I am all for getting more people involved with Allegro, but this is silly. Work on 4.3 instead. There's plenty to do. 4.3 is still under design and while it would be great to have more opinions on the design thats not something many people can readily contribute to simply because its fairly difficult and you already have to have a deep understanding of Allegro to do so. I thought people would be interested to simply rewrite code so that it looks better and potentially spot any bugs. So far no one has done so, maybe its too early or its Sunday, I dont know. Shouldnt Allegro strive to be perfect in every way? |
Peter Wang
Member #23
April 2000
|
Quote:
Evert is talking about tracing when lines were last changed, e.g. using `svn annotate'. Large scale cosmetic changes mess that up for dubious value. Btw, it takes far too much energy on this forum to check what changes have been made, and whether anything was broken. All I can tell is that you've renamed some variables and added whitespace where there shouldn't be. pixel = _blender_func24(pixel, _blender_col_24, (int)color ); Patching, verifying and committing will take even more energy. Count me out.
|
kazzmir
Member #1,786
December 2001
![]() |
Well heres my last attempt for the night. Unfortunately its about 5 times slower than the current version, mostly because all the macros have been wrapped into functions. Of course I wouldnt want to slow down any functions so if there are any ideas how to speed this generic version up Id appreciate it.
|
HoHo
Member #4,534
April 2004
![]() |
Quote: Unfortunately its about 5 times slower than the current version Forcing inlining might help but I'm not too sure about this. In general I agree with Peter Wang. 4.2 series is pretty much "done" and all energy should go to 4.3. Most people don't know anything about Allegro source anyway so for them it doesn't matter much if they work on 4.2 or 4.3. Perhaps only 4.3 is a bit easier because of less garbage. __________ |
Fiddler
Member #5,385
January 2005
|
HoHo said: In general I agree with Peter Wang. 4.2 series is pretty much "done" and all energy should go to 4.3. Most people don't know anything about Allegro source anyway so for them it doesn't matter much if they work on 4.2 or 4.3. Perhaps only 4.3 is a bit easier because of less garbage. For 4.3 the problem is that little is known about what has to be done, what is already there, what is currently being worked on etc. I am sure that if some specific tasks were posted in allegro.cc (for example: "implement the joystick driver for X") it would attract developers. If even one or two people responded and started contributing more seriously it would be worth it IMHO. However, this means that a more or less finalised API is needed, at least for the core (event queues, error handling, driver API, I don't know what else). Unless this has been stabilized and made public somewhere, there is very little a non-developer can do to help. The Open Toolkit: a game development library for .Net/Mono. |
Peter Wang
Member #23
April 2000
|
Ok, then. If anyone wants to finish off the mouse API and implementation, especially the Windows implementation, please tell me. It's sitting in a Subversion branch at the moment (I just need to merge the latest 4.3.0 changes into it). Any takers? Also, it would be nice to have a force feedback API. Probably it will be a rather thin wrapper around whatever DirectX provides. Anyone with such a device want to work on that? Chris Robinson has half a sound API designed and prototyped (if I remember). This would be quite a nice modular task to work on, I think. The Mac port needs attention. Contact Peter Hull. Thomas is working on his file hooks. And then there's the display and graphics API... Elias and Evert seem to be jointly in charge of this. We were just discussing it recently on [AD].
|
gnolam
Member #2,030
March 2002
![]() |
Are there actually any API (proposal) documents anywhere? -- |
Fiddler
Member #5,385
January 2005
|
Take a look at the Allegro Wiki: http://awiki.tomasu.org/bin/view Although it seems it has been hit by spam bots recently, there is quite a lot of useful information there. Also, the Allegro 5 documents (I think there is a link in the wiki to them). However, I don't think these are followed closely, if at all. The Open Toolkit: a game development library for .Net/Mono. |
Evert
Member #794
November 2000
![]() |
Quote: However, I don't think these are followed closely, if at all.
It's certainly the idea that they're followed at least somewhat. I should point out though that some of the details were left blank or undecided in them. |
Andrei Ellman
Member #3,434
April 2003
|
Actually, I think that the Allegro source could do with some more comments and clearer variable names. Although I think that re-writing the algorithms to be more readable, yet slower is going a bit too far. I recently fixed a bug in the Grabber, and found that I would have fixed it much faster had the source been more commented. Having a well-commented source would encourage more people to fiddle around with it. Also, while we're on the subject of adding comments to Allegro source, now would be a good time to discuss the possibility of using a self-documenting sourcecode-comments based form of documentation such as Doxygen as a replacement for the current ._tx format. When I mentioned this on the [AD] list recently, I was told that Doxygen (along with it's alternatives) had already been discussed, so if anyone could link to the discussion, that would be appreciated. The web page for Doxygen is at http://www.stack.nl/~dimitri/doxygen/, and a liat of alternatives is here AE. -- |
kazzmir
Member #1,786
December 2001
![]() |
Did this get sent to the top or something? Anyway, I havent done much with this because I was waiting for 4.2.1 to come out. About doxygen, I have no idea. It sounds nice, but the allegro docs are already so well written! |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: Although it seems it has been hit by spam bots recently Fixed all the ones I could find. Please people, if you find any, TELL ME. -- |
|