![]() |
|
Collaborators for Allegro Demo Game Competition? |
Goodbytes
Member #448
June 2000
![]() |
You can alternatively use load_bmp instead of load_bitmap and be able to drop the .bmp extension in your datafile; but again, be sure to grab the bitmap as binary data and not a BMP datafile object. This is a slightly unusual way to load data from a datafile, as the "usual" way to to it is using the built-in Allegro datafile object types; maybe it would be better for the newbies to use those built-in types. |
Elias
Member #358
May 2000
|
Definitely, if datafiles are to be used, then only load_datafile should be used. The # syntax is more or less a hack, since we didn't include that index patch posted on [AD] a while back for 4.2. -- |
Kitty Cat
Member #2,815
October 2002
![]() |
Quote: Definitely, if datafiles are to be used, then only load_datafile should be used. I prefer using the # syntax. Problem with load_datafile is that it loads all the objects into memory, and it's not very easy to open individual objects. Plus, if you use thing like PNG and Ogg and whatnot, it becomes an unnecessary burden to load them, convert them if needed, and leave them loaded when you no longer need them. -- |
Elias
Member #358
May 2000
|
Yes, of course, the # form is nice. It's just the implementation which isn't so good right now (loading a single object with # takes about as long as loading the whole datafile, disk-access wise). What we would need would be an index with the offsets to the individual objects, so only the index would need to be read, and then fseek could be used. -- |
Thomas Harte
Member #33
April 2000
![]() |
I found one prima facie error in my code, which was that I was directly comparing a floating point result of an sqrt to zero in order to avoiding a later divide by it becoming nan. Obviously you shouldn't compare floats to exact values anyway, but in any case I've changed it to test for less than 1 as I can afford to be more cutting on that front. I've also chucked all of the game resources that are expected to survive until the end into datafiles. Latest everything is attached. It dumps some stuff to stdout while parsing the level so that if Elias's errors persist (they are consistent with a potential result of the bug explained above) I can bug hunt more properly. Included is stdout.txt which is the output of my machine. Please please please test this! EDIT: have just now realised that like an idiot I have no overarching acquire/release_bitmap for my level draw! Please no nasty comments about speed for now... EDIT2: Quote: This is a slightly unusual way to load data from a datafile, as the "usual" way to to it is using the built-in Allegro datafile object types; maybe it would be better for the newbies to use those built-in types. I'm using #. As I understand it, once you've load_datafile'd you index an array of data objects using integers that you obtain from a header file spit out by the grabber. This would mean that the game had to know about all the materials that may exist before it is run and tie art creation to programming to such a degree that I am unwilling to do it. [My site] [Tetrominoes] |
Elias
Member #358
May 2000
|
No change here. Output attached. Oh, and please rename your shutdown function, shutdown is a libc function. [Edit:] And I think, best to not use datafiles at all then.. as Shawn said himself on this issue, they are really only useful when loaded all at once into memory. (After 4.3.x this will be changed by the indexing patch.. but for now the demo should just use load_bitmap, or show the intended way.) -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Oh, and please rename your shutdown function, shutdown is a libc function. That's one of miran's! I'll fix it. Quote: No change here. Output attached I was able to replicate the bug on my own machine (using a slightly different geometry) and have now properly fixed it. The problem is that edge stripping is really edge vertex stripping and a fundamental assumption of the code is that all vertices are part of at most two (collidable) edges. The error was that when a vertex was removed, both of the edges that were joined to it end up with the same start and end point - i.e. they become the same edge. But the old code wasn't succeeding in removing either. Hence it starts to look as though more than two edges meet at a vertex and things go wrong. As I say, all solved now. Quote: [Edit:] And I think, best to not use datafiles at all then.. On the contrary, there is one datafile that is statically loaded in the way you would like and another that is read 'item by item' as necessary by load_bmp. Surely as an example program it is good to show both ways of doing things? While I'm on the topic of good practice, at the minute the code has a hard coded list of allowed screen resolutions. I'm aware there is a function that returns a list of available modes but it requires an actual driver (i.e. a platform specific) to be passed rather than a dummy one. Is there any way to get a list of available drivers and if possible their attributes as far as which dummy driver they would fall into? I can see absolutely no use for the mode list function otherwise but I can't find anything in the docs. [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: Is there any way to get a list of available drivers and if possible their attributes as far as which dummy driver they would fall into?
Afraid not. With the current setup, there's no way to know what a driver can do until you've installed it. On the other hand, you could see how the GUI mode selector handles this problem. If I recall correctly, it will only list supported resolutions. It probably just uses the platform-specific driver list though. |
Thomas Harte
Member #33
April 2000
![]() |
Okay. So I'll put that on the list of Allegro features I find useless! Attached is source that should have the problems that have been occuring recently fixed. It also has a degree of resolution indpendence but at the the minute it makes an incomplete attempt to scale the physics, as a quick fix. In particular, returning to the menu then switching resolution and continuing game usually causes the player to fall through any platform he's on and the gravity and air resistance aren't scaled. That doesn't matter because the physics won't be 'scaled' in the end - but it provided a useful way to test the edge clipping. Allegro's lack of subpixel accuracy on scaled bitmaps is also painfully evident. Anyway, I hope it works okay. [My site] [Tetrominoes] |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: Okay. So I'll put that on the list of Allegro features I find useless! Very constructive -- |
Richard Phipps
Member #1,632
November 2001
![]() |
How's the actual game coming along? Isn't there some kind of time limit for this competition? |
Elias
Member #358
May 2000
|
Quote: Allegro's lack of subpixel accuracy on scaled bitmaps is also painfully evident.
Well, as you know, Allegro 4.2 without AllegroGL is mainly meant to be used with non-scaled/rotated bitmaps - but I think that's what makes your game a great demo.. the same demo, when run with 4.3.x, will work much better, with anti-aliased, OpenGL drawn polygons and sprites Oh, and I updated the blender exporter a bit, I'll post it together with a bigger test level later (or tomorrow). About the edge stuff, I think I'll do this: "collidable" will be per-mesh in Blender I think that's about as good as I can get it to work in Blender. -- |
Goodbytes
Member #448
June 2000
![]() |
Quote: Well, as you know, Allegro 4.2 without AllegroGL is mainly meant to be used with non-scaled/rotated bitmaps - but I think that's what makes your game a great demo.. the same demo, when run with 4.3.x, will work much better, with anti-aliased, OpenGL drawn polygons and sprites Whoa, whoa... what? You're not saying that Allegro 4.3 will use OpenGL as a driver... are you? . . . don't phunk with me . . . |
Thomas Fjellstrom
Member #476
June 2000
![]() |
It does now with AllegroGL, to some degree. AllegroGL is a wanted addition, its just not finished yet. -- |
Goodbytes
Member #448
June 2000
![]() |
Compiling the newest source provided by Thomas Harte: about_menu.c:22: initializer element is not constant about_menu.c:22: (near initialization for `menu[7].name') about_menu.c:22: initializer element is not constant about_menu.c:22: (near initialization for `menu[7]') about_menu.c:23: initializer element is not constant about_menu.c:23: (near initialization for `menu[8]') about_menu.c:24: initializer element is not constant about_menu.c:24: (near initialization for `menu[9]') about_menu.c:25: initializer element is not constant about_menu.c:25: (near initialization for `menu[10]') about_menu.c:26: initializer element is not constant about_menu.c:26: (near initialization for `menu[11]') about_menu.c:27: initializer element is not constant about_menu.c:27: (near initialization for `menu[12]') about_menu.c:28: initializer element is not constant about_menu.c:28: (near initialization for `menu[13]') about_menu.c:29: initializer element is not constant about_menu.c:29: (near initialization for `menu[14]') The compiler (MinGW; gcc version 3.2) seems not to like allegro_id in line 22 of about_menu.c: { demo_text_proc, allegro_id, 0, 0, 0, 0 }, Replacing allegro_id with a string literal fixes the problem. By the way--it's "Goodbytes," not "Goodbyte." I thank you for putting my name in the credits; hopefully I'll have something more to show for it soon [EDIT] [EDIT2] |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Very constructive As I already said, this would only be helpful if there were some way to obtain a list of drivers as well as at least learning which are full screen and which are not. That sounds like constructive criticism to me. Quote: By the way--it's "Goodbytes," not "Goodbyte." I thank you for putting my name in the credits; hopefully I'll have something more to show for it soon Oh, yeah. I keep noticing that and making a mental note to fix it. I'm definitely sure I'll do it almost any minute now. Quote: Uh-oh... I fell through a wall. I attached a screenshot of where it happens... this results from just running back & forth and picking up speed - when the character reaches that point in the wall, he falls through. This is a very repeatable bug... it's not supposed to happen, is it? No, and it doesn't ever happen for me on my PowerPC. I'm starting to get incredibly annoyed by it though as every 'fix' seems not to fix it and of course I can't test the stupid thing myself. I'll work on some sort of logging system that allows me to track what is going on. [My site] [Tetrominoes] |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Sounded like a useless complaint to me. edit: See, it may have been what some call "Constructive Criticism", but just how constructive was it? What did it accomplish? The devs KNOW we need stuff like that, but currently (as you are fully aware of), allegro's underlying system doesn't support it. The feature you want will likely be in 4.3, but who knows, it probably wont be if all we get is "constructive criticism". -- |
Thomas Harte
Member #33
April 2000
![]() |
It does if you misquote it. The entire conversation looks quite different: Thomas Harte said: While I'm on the topic of good practice, at the minute the code has a hard coded list of allowed screen resolutions. I'm aware there is a function that returns a list of available modes but it requires an actual driver (i.e. a platform specific) to be passed rather than a dummy one. Is there any way to get a list of available drivers and if possible their attributes as far as which dummy driver they would fall into? I can see absolutely no use for the mode list function otherwise but I can't find anything in the docs.
Evert said: Afraid not. With the current setup, there's no way to know what a driver can do until you've installed it.
Thomas Harte said: Okay. So I'll put that on the list of Allegro features I find useless! Looks to me like a mere acknoledgement of Evert's answer that turns my earlier comment into constructive advice. EDIT: Goodbytes said: It seems to happen right at the point where the track becomes fully vertical on the left side. Cool. I'll focus on the tests that check the extent of line segments (as contrasted with infinite lines). Until now I've been concerned that its a rounding error to do with the 'one way' collisions system (i.e. the necessary capacity to jump 'in front' of a platform and then stand on it, which people expect to be able to do) [My site] [Tetrominoes] |
Thomas Fjellstrom
Member #476
June 2000
![]() |
read my edit, and note that I place that last quote of yours on the same level of "usefullness". -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: See, it may have been what some call "Constructive Criticism", but just how constructive was it? What did it accomplish? The devs KNOW we need stuff like that, but currently (as you are fully aware of), allegro's underlying system doesn't support it. Firstly I don't consider whether criticism has been raised before or is popularly known to be determinative of whether it is constructive. Secondly, I don't understand how the code seems to know which drivers are full screen or not when the user uses GFX_AUTODETECT_FULLSCREEN but apparently couldn't when providing a list of available drivers. Thirdly, I don't think either of us want to seriously divert this thread in this direction! [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: Firstly I don't consider whether criticism has been raised before or is popularly known to be determinative of whether it is constructive.
Certainly. By all means, remind us of things that need to be done. It helps keep our list of priorities straight (even if it can be annoying at times Quote: Secondly, I don't understand how the code seems to know which drivers are full screen or not when the user uses GFX_AUTODETECT_FULLSCREEN but apparently couldn't when providing a list of available drivers.
There's a drv->windowed flag in the gfx driver struct. Again, you need to figure out how what drivers are available.
The modelist contains information about width, height and colour depths. The driver has a `windowed' field that indicates wether it is a windowed or fullscreen mode driver. So it's possible to get this information, but once again, I don't recommend it for a demo game. |
Elias
Member #358
May 2000
|
We could simply document some of the public drivers, system_driver already has no underscore, so is a public API symbol.. so a simple docs patch (only mentioning the gfx_drivers member) might fix this.. (didn't think much about it though) -- |
Evert
Member #794
November 2000
![]() |
No, I don't think we want to expose the contents of the system driver. If we want to do this, the proper way to do it is through a documented API function - which it's too late to add to 4.2 right now. |
Carrus85
Member #2,633
August 2002
![]() |
So, how exactly is the development going to continue after 4.2 comes out (non-RC or beta)? Are we going to maintain compatability for the same functions up until 5.0 (Implying that version 4.9 would be the first major API break)? Or are we going to simply maintain compatability with the current version forever? Or are we going to simply going to phase new API changes into the branch and drop them at 5.0? Or are we going to phase new API changes into the branch and leave the older code behind? How exactly is development going to continue beyond 4.2? Just to satisfy my curiosity...
|
Goodbytes
Member #448
June 2000
![]() |
To whom it may concern (probably Thomas The melody will probably change, it's just something I threw in for now... [EDIT] I should have mentioned, Thomas - I fall through that vertical wall even when jumping to it from the opposite wall of the half-pipe; so I pass through it regardless of how I approach it. It's as if the edge isn't even there... |
|
|