![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Allegro Demo Competition Referee Report |
Evert
Member #794
November 2000
![]() |
First of all: Great work done by everyone who contributed to the Demo Competition's entry. Code:
Cosmetic:
Technical:
Commenting:
Again, great work by everyone, but it needs a bit more before it can be put up as the Allegro Demo Game. Please don't be put off by these requests, even if they seem daunting. I've attached the latest version Thomas posted on the forum, with a few minor warnings already fixed. These include: DOS <---> UNIX line ending conversions and indent cleanup (using the indent.pro file that comes with Allegro). I don't know what is easier, that anyone who makes a change from this point onward simply attaches the full source to his or her post and the next person starts from that, or submitting patches. These technical issues aside, gameplay tests and bughunting is of course still welcome! We've had some of that already and most of them have probably been fixed already (I hope...) |
Elias
Member #358
May 2000
|
Quote: I don't know what is easier, that anyone who makes a change from this point onward simply attaches the full source to his or her post and the next person starts from that, or submitting patches. Should we put it into CVS already? It would make collaboratively working on it a whole lot easier. (And I assume, keeping the current demo is out of the question now anyway, so can as well put the new one to CVS right now.) -- |
Evert
Member #794
November 2000
![]() |
Quote: Should we put it into CVS already? It would make collaboratively working on it a whole lot easier.
That's true, but I don't think we should put it in right now, if we want to do RC1 tomorrow (oh damn, yet another thing I need to do That said, I think we can open up a seperate CVS module for it. We can close it down again when the work is done. |
Elias
Member #358
May 2000
|
Ok. It would certainly make it easier to work on it. Oh, and didn't we agree on [AD] that new files should use space only layout? So make sure you modify the .indent.pro accordingly before using it.. -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Is there a reason to store some bitmaps as binary data in the datafile rather than as a bitmap? Yes. They all have individual associated palettes. Allegro remains in a single member minority with respect to this sort of thing as it doesn't associate palettes with bitmaps. This is, in my opinion, the cleanest solution to that. Of course, it doesn't fully alleviate the problem, hence the death of the planned 8bpp mode. If I'm in 8bpp mode with a particular palette set then load_bmp (for example) has the following behaviour: - if the bitmap being loaded is 8bpp, silently do no colour mapping And I just didn't have the energy to write a work around and then justify it in commenting. In particular, I couldn't think of one that wouldn't cause the screen to flash unsightly colours if I loaded a bitmap during play. But perhaps I'm not entirely up on Allegro's colour conversion stuff. This design decision also has the benefit of showing off more Allegro functionality, which surely is a substantial part of a demo project. Quote: There is insufficient commenting in the code, even if it is fairly self-documenting in many cases. For instance: what is demo_textprintf()? Why is it there? What does it do? Functions should be preceded by a line or two of comments that describe their function, large chunks of code should have a descriptive comment too. I haven't attempted to fully understand Miran's code and as a result haven't commented any of it. Anything to do with menus or the framework is his and I'm not in a much better position than anyone else to figure it out so in the absence of him CVS makes even more sense. Of course, it's all very nice to be able to pass the buck like that, but I haven't even fully commented my code yet! Quote: Again, great work by everyone, but it needs a bit more before it can be put up as the Allegro Demo Game. Please don't be put off by these requests, even if they seem daunting. It also still needs to count ASCII text file lines from 1, not 0, and to draw edges defined from right to left (i.e. downward facing) correctly! Both of which are 2 minute fixes, but... [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: Oh, and didn't we agree on [AD] that new files should use space only layout? So make sure you modify the .indent.pro accordingly before using it..
Ouch, yes, you're right. Forgot to do that Quote: Yes. They all have individual associated palettes. Allegro remains in a single member minority with respect to this sort of thing as it doesn't associate palettes with bitmaps. Ok, fair enough. Although in that case I would have prefered to store palette and bitmap seperately (or convert all bitmaps to the same palette, which is nescessary for 8 bit mode anyway). Anyway, palettes are planned to be associated with bitmaps for the new graphics API. Quote: If I'm in 8bpp mode with a particular palette set then load_bmp (for example) has the following behaviour: Actually, that's the behavior that I'd expect. I agree that it would be nice to have a way to map a bitmap from one palette to another though. Quote: In particular, I couldn't think of one that wouldn't cause the screen to flash unsightly colours if I loaded a bitmap during play. select_palette() doesn't change the palette in hardware, but it does change the palette for use with Allegro's colour converter. Not sure if you looked at that or not. Quote: I haven't attempted to fully understand Miran's code and as a result haven't commented any of it. Anything to do with menus or the framework is his and I'm not in a much better position than anyone else to figure it out
Sure. I wasn't suggesting you do all the work |
miran
Member #2,407
June 2002
|
There's something wrong with the title font palette. Did no one notice this before? As for commenting my framework code, I'm really supposed to be doing something else right now, but since I've already thrown weeks away, one more day won't hurt. I'll see what I can do... Oh and about not using Allegro's dialog manager, I don't know, I suppose I could have used it but, I thought writing my own would be a lot easier, especially since I had done it many times before. Also the last time I attempted to use Allegro's GUI I had a lot problems getting it to do something useful. Although that was years ago. Anyway, what's done is done, there's no way back now... EDIT: Another thing I noticed is that at the smallest resolution (640x480) the about box doesn't quite fit on the screen. Also when switching between resolutions only the graphics should be reloaded so that the music doesn't restart every time you change something in the gfx settings... -- |
Evert
Member #794
November 2000
![]() |
Quote: There's something wrong with the title font palette. Did no one notice this before?
No, because it seems to work fine for me, and I assume other too... weird, that'll have to be investigated. Quote: Oh and about not using Allegro's dialog manager, I don't know, I suppose I could have used it but, I thought writing my own would be a lot easier, especially since I had done it many times before. Also the last time I attempted to use Allegro's GUI I had a lot problems getting it to do something useful. Although that was years ago. Anyway, what's done is done, there's no way back now... In that case I suppose I'll have to see if I can do this myself. Because I really think we should use the dialog manager already in place rather than implement a new one. |
Dennis
Member #1,090
July 2003
![]() |
Attached are fixed aboutmnu.c and credits.c --- 0xDB | @dennisbusch_de --- |
X-G
Member #856
December 2000
![]() |
Quote: Did no one notice this before? Apparently no one noticed that "continue" is spelt with one O either... -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Ok, fair enough. Although in that case I would have prefered to store palette and bitmap seperately (or convert all bitmaps to the same palette, which is nescessary for 8 bit mode anyway). The bitmaps are stored paletted to conserve space. It was found that each individual bitmap looked fine with a 256 colour palette, so this works to reduce data size. If they all have the same palette then they look a little more ugly, which is fine as an option for those with low spec systems but cannot be justified in this context because it would make all colour depths look like 8bpp and as a result make the game look uglier for those with a perfectly decent 15/16/24/32bpp frame rate. Quote: Anyway, palettes are planned to be associated with bitmaps for the new graphics API. That's cool. I didn't really mean to drag the discussion off topic, I'm just no longer a regular Allegro user and I was hoping to explain why the solution I chose isn't Allegro-optimal with comments about "minority of one". Quote:
> If I'm in 8bpp mode with a particular palette set then load_bmp (for example) has the following behaviour: Actually, that's the behavior that I'd expect. I agree that it would be nice to have a way to map a bitmap from one palette to another though. My problem with the behaviour you expect is that it means for users of 8bpp mode, load_bmp operates quite differently depending on the bit depth of your bitmaps. So your code has to know in advance (with which Allegro won't help) which type it is loading, or else to jump through hoops and invoke a colour conversion three times for non-8bpp images in order to allow for the possibility. Or, to put it in other terms, either 8bpp mode becomes harder to support for bitmap based programs which want to support better looking 15+bpp modes, or else file sizes have to needlessly grow across the board. Quote: select_palette() doesn't change the palette in hardware, but it does change the palette for use with Allegro's colour converter. Not sure if you looked at that or not. I was not aware of that function, so clearly my manual reading skills are at fault here. On an unrelated topic arising from my first reading of select_palette, do the docs really need to describe it as an "ugly hack" and imply that if you're looking at it then you must be dealing with some sort of "dodgy situation"? I'm not really sure the manual should be quite so judgmental about my coding... [My site] [Tetrominoes] |
miran
Member #2,407
June 2002
|
Quote: Apparently no one noticed that "continue" is spelt with one O either... I didn't do it.[/bart] As for writing comments, this is harder than it seems at first. I spent the last 2 hours commenting just two .h/.c pairs of files. -- |
Rampage
Member #3,035
December 2002
![]() |
It's extremly well done and fun, excellent work, everyone! Comments: I got stuck in the 'w' of 'Shawn' there's something tricky about the movement in such situations. Oh, and I really hope the cloud sprites are changed. -R |
miran
Member #2,407
June 2002
|
Updated version attached: - commented about 50% of my code EDIT: Quote: Oh, and I really hope the cloud sprites are changed.
Agreed. Also a simple gradient for the sky would be a big improvement -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Agreed. Also a simple gradient for the sky would be a big improvement In which case we'll need non-anti-aliased sprites (or aliased sprites if you prefer) if Allegro still doesn't do alpha transparency. At the minute the clouds are predrawn to that background colour and stretch_blit'd. Which is also why they are a little sparse and never overlap! [My site] [Tetrominoes] |
miran
Member #2,407
June 2002
|
The clouds we have right now are not antialiased, they are blurred! That's a huge difference. As I said, I'm not an artist but I know this much: blured != antialiased. And you can make very nice clouds even without alpha transparency. Btw, here's my sky drawing code from my last TINS entry:
-- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: The clouds we have right now are not antialiased, they are blurred! In the strict sense they're anti-aliased. The intention is to provide different pixels with apparently different 'depths'. In clouds the 'depth' of the cloud makes it darker or lighter and very thin depths don't fully remove the colour of whatever is behind. Allegro has (to my knowledge) no true alpha channel support, so in order to do this the edges are pre-blended with the background colour. This is anti-aliasing as if it wasn't done then the cloud edges would blend to a different colour, causing them to assume the alias of something other than clouds. [My site] [Tetrominoes] |
Carrus85
Member #2,633
August 2002
![]() |
Quote: Indentation is three spaces. Replace all tabs used for a single indentation level with three spaces. This must be done manually because a tab also replaces eight spaces at deeper indentation levels. Just a question (for my information)... since everything is going to be in space format, why is it that we are doing 3 spaces, then 8 spaces? Wouldn't it be easier to just indent everything at thee same amount, say, 4 or 5 spaces instead? That way we can use the tab key for all indentation (assuming the tab is set up to operate by inserting a given number of spaces).
|
Evert
Member #794
November 2000
![]() |
Quote: Allegro has (to my knowledge) no true alpha channel support Allegro supports 32 bit RGBA images. It's all done in software and I think you need to enable the alpha blender (with set_alpha_blender), but it works fine as far as I know. Quote: Just a question (for my information)... since everything is going to be in space format, why is it that we are doing 3 spaces, then 8 spaces? Wouldn't it be easier to just indent everything at thee same amount, say, 4 or 5 spaces instead? That way we can use the tab key for all indentation (assuming the tab is set up to operate by inserting a given number of spaces).
Allegro's source uses a screwed up (IMHO) formatting where indentation is 8 spaces, but eight successive spaces are stored on disk as one tab character. Apparently, Shawn prefered it that way. It confuses the hell out of some editors and in any case it requires some manual intervention in many cases. |
Carrus85
Member #2,633
August 2002
![]() |
Okay, that is just fine with me. 3 then 8 is just kinda... weird.
|
Elias
Member #358
May 2000
|
Quote: Allegro supports 32 bit RGBA images. It's all done in software and I think you need to enable the alpha blender (with set_alpha_blender), but it works fine as far as I know. I'm not sure we actually support RGBA textures.. I somehow remember a patch about it from long ago, but the docs don't seem to indicate any mode which can use RGBA. It would be trivial to add though I guess. -- |
Member #12
Member #12
April 2000
|
Evert said:
Quote:There's something wrong with the title font palette. Did
Fonts are incomplete, they don't cover all the characters used by Hopefully this could be fixed with the new demo. Including the full |
Thomas Harte
Member #33
April 2000
![]() |
Quote: There's something wrong with the title font palette. Did no one notice this before? It doesn't display like that on my machine. It looks like this: http://imageheap.com/theheap/32696676.png Although I continue to have a mouse cursor on top. I did try to switch it off, but was apparently unable. [My site] [Tetrominoes] |
Dennis
Member #1,090
July 2003
![]() |
off topic: miran said: I didn't do it.[/bart] Forgot to add: Who saw me do it? You can't prove anything.[\bart] on topic: http://homepages.compuserve.de/DennisTapier/allegroforum/aldemgrad.png --- 0xDB | @dennisbusch_de --- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: There's something wrong with the title font palette. Did no one notice this before? I get the same thing as miran on my Mac Mini. |
|
1
2
|