![]() |
|
Allegro 5.0 (or 6?) - Request For Comments |
nempko
Member #1,253
April 2001
|
and yes, i care what the internals are Allegro because they are reflected in the API. And in fact i would love to be a developer of Allegro, for free that is. |
kns
Member #1,707
December 2001
|
This note is not intended to push support in any direction. It's simply a documention of how the DOS port is relevant to some... For me, DOS Allegro provides the means to collect reaction time data without the worries of the added variability introduced by Win(whatever#). I suspect that there are dozens to hundreds of psychology labs using Allegro for this very reason. Though I'm not in need of additional features it would be comforting to know that some development - code improvement - will always be considered. DOS has it's place for those with specific needs. Whatever happens I have been thankful for Allegro and the help that I have received from the community... KNS [ December 06, 2001: Message edited by: kns ] |
Bob
Free Market Evangelist
September 2000
![]() |
quote:Well, you are quite wrong bob. He had said if he would recreate C++, he would not use the illogical C syntax. He kept it so many people can migrate much easier to it. It is a Better C and i find it funny that people refuse to learn it out of sheer pride for C. C was his biggest design mistake The internals of Allegro don't reflect the API - that's why they're called Internals. Notice how the internals have gone from straight function calls to VTables and more in between 3.11 and 4.0-beta, without any changes to the API? (except of course for the added functionality) -- |
nempko
Member #1,253
April 2001
|
you are right bob, many of the internals are not reflected, yet many are also, such as global variables. and of course |
Plucky
Member #1,346
May 2001
![]() |
Despite reading these forums since this website's inception, I have rarely posted a message. After reading these threads on Allegro's future, I've decided to be brave and wade in. I'm known to be longwinded however and perhaps that is why I rarely post. I'll throw in my 2 cents on the topic of DOS support and its spawned topic of C vs. C++. I'll start with C/C++ in this post since it's easier for me, and I'll continue with DOS support in my second post. From my two full decades of hacking around on PCs (it all started as a kid when my Dad brought home the original IBM PC from his job at IBM), the argument over the superiority of C or C++ for over the other for games programming is a moot one. They both work well. Even BASIC will work well. For a given processor and operating system, their speed will be the same if each have the most efficient compiler possible for their respective langauges. After all, the compilers all translate the languages to the same machine code. However I can perceive practical differences among the languages, because each language is structured differently. For example, I perceive C to have certain "advantages" over BASIC. C language is formed to better support structured programming and easier hardware (memory) access. No more gotos and pokes and peeks that can drive people crazy. However I emphasize that there's no reason a BASIC programmer cannot program in a structured fashion or not access memory directly. There are simply more sophisticated tools in the C language. Now we can extend this example to C and C++. C++ is formed to better support object-oriented programming. But you can still program objects in C; it is perhaps more unwieldy for certain OOP elements. (I admit that my status as a C++ programmer is 'dabbler', and most of my programming these days are in C.) On the flip side, a C++ programmer can ignore much of the OOP elements. For Allegro, no one is suggesting that it be written in BASIC. Memory access would be a nightmare, and it suffers from portability problems. Allegro is currently written in C (and asm). And we all agree that it works with C, and it is adequately portable. Some propose that Allegro be rewritten in C++ (and asm). I consider C++ to effectively be a different language. But C++ is a superset to C, you say. My point exactly. A C compiler would read C++ code as gobbley-gook. In order to switch to another language, there must be very good reasons for doing so. In my mind, the switch to C++ would require a great benefit: Allegro would be improved much to the same magnitude as a switch from BASIC to C. And because C++ can compile C, this hurdle should be even greater. I have yet to see an argument for C++ for Allegro that satisfies me. To me, Allegro does not require heavy OOP elements where C++ would suddenly make everything better (or faster). There are plenty of C++ graphics libraries out there. C++ programmers can use Allegro directly because C++ can compile C. C programmers cannot use C++ libraries directly. For the C++ community, I would support that community's effort to write their own version of Allegro: Allegro++. [continued...] Plucky |
Plucky
Member #1,346
May 2001
![]() |
[post continued...] As background, the loss of DOS support would not affect me personally, because I've moved over to MingW. I've interpreted the statements by the core Allegro developers as: we plan to streamline and update Allegro for Windows (and presumedly Linux.) A secondary statement I interpreted was: we will not have the bandwith to do the same for DOS. What I also heard: If you want an Allegro update for DOS that is compatible with the proposed Allegro update, then form a band of developers to make it happen. It is your job to make all the calls compatible with the Windows Allegro update, ostensibly ver. 5.0. I have yet to hear (or don't remember) any significant reason to not go ahead with a Windows-(and Linux too?)-only update of Allegro because I have yet to hear any evidence that a separate DOS update cannot be compatible with the original proposed Allegro 5.0 update. That is, DOS "after-market" support or something similar seems to be still possible with the planned update of Allegro 5.0. I found interesting the point about how DOS allows support for accurate timestamping of inputs in measurement systems and so forth. I've had expereience with the difficulty of an OS like NT to timestamp an event when the OS polls the input in a random manner due to its ability to run multiple programs (more) properly. And though this point was raised to garner favor for DOS support, I think it also shows a window into why Allegro core developers feel that to improve Allegro they would not support DOS directly. An operating system such as Windows NT/2000/XP and Linux are different than DOS in how they allow programs to access hardware (for games, namely video memory, video cards, and keyboards). This is manifested in the timestamping problem above. The ability to run multiple programs properly is a big reason why an OS like NT or Linux allows access to hardware much differently than DOS. For someone looking outside-in, this seems to be a big driver for change since the vast majority of people out there will use one of these "modern" operaturing system. Again, similar to what I said in my C vs. C++ post above, DOS can be made to run multiple programs, though not always running at the same time. An example program that allows DOS to do this is called Windows 3.1. And with some clever tweaks, you get Windows 95. I wonder why these two programs always crashes? One more point. For those Allegro programmers that don't need DOS to support specific DOS features (e.g. its inability to run multiple programs properly), perhaps Allegro in DOS is easier to program than Allegro in Windows. For such programmers I'll suggest that perhaps if Allegro was updated for Windows, it would be easier to program Allegro for Windows than for DOS. Plucky |
Neil Walker
Member #210
April 2000
![]() |
I never thought about classifying myself (NT4) as using out-of-date OS that is hampering Allegro development like DOS is. So why not, either: a) let us out of date OS's stick to 4 and sacrifice ourselves for the good of Allegro version 5. If the changes really add value then upgrade (I can't because I develop on my works computer who aren't migrating to newer Windows until a long time). b) If its just the upgraded whizzy drawing stuff in DX thats required, why not just use/incorporate OpenGL for graphics and limit DX for the others (e.g. DInput) using DX? If its good enough for RTCW then its good enough for me ;-) If its support for joysticks, etc in DX7 that is required, why not do what someone else said and modularise stuff so that different versions can be easily supported. Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Jonathan Metzgar
Member #245
April 2000
|
Ok, I would like to input some input. As I understand from current Allegro development, Allegro 4 is the end of the line for the current API structure. Because of this, I would like to offer some suggestions for what Allegro 5 should be like. |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
Talking about DOS... I can't run dos games made by someone else for some reason. I always get SIGSEV thingy memory problems. And I've got Win98 with a real dos! Uurght I can't even think how those poor ppl who have win2000 could be able to run them. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Jonathan Metzgar
Member #245
April 2000
|
You can't run or even develop DOS games with DJGPP with Windows 2000. I don't think XP is capable of the same thing. Even if you could, support is extremely limited. If I need to develop a "DOS" application, I simply write a Win32 console application with MSVC. And really, if you need to develop DOS style games, just switch over to Linux (It's free!). It provides a console mode style operating system with much better features and Allegro will run on it. DOS is really a terrible operating system (and very old I might add) and will always remain so. |
Bob
Free Market Evangelist
September 2000
![]() |
jonathan the master coder: Wrappers don't have that much of an effect on performance, unless you use putpixel() a lot. The added overhead will be less than 1% for 99% of the time, since most likely you will do multiple function calls to acheive whatever operation you were trying to do anyway. (edit: s/independent/dependent/) -- |
Jonathan Metzgar
Member #245
April 2000
|
For threading support, I wasn't suggesting that Allegro be threaded so to speak. But since we have the timer routines, etc. We could write a simplified version for developers to use threads in their applications. |
Inphernic
Member #1,111
March 2001
|
A selfish, n00b perspective! Why DOS should stay: I don't have mad C skills + even less knowledge about the insides of Windows = The only platform available for me is DOS. Why DOS shouldn't stay: I don't have mad C skills + even less knowledge about the insides of Windows = I finally have to face my inner fears and start studying Windows programming.. Conclusion - Kill the DOS so I'm forced to learn Windows programming. Otherwise, I'm too lazy to depart from DOS.. It's like a forest fire.. To create you need to destroy. Or something. -- |
Richard RPG Concept
Member #473
June 2000
|
well with allegro by using on MSVC.. you can do the coding the same in dos mode... with allegro, it made everything so SUPER-EASIER for window programmers. please correct me if you find my reason mistaklable of in allegro 4.0 differ than my own expernices. Cuz i have not updated my allegro 3.9 to 4.0 |
Jonathan Metzgar
Member #245
April 2000
|
Well, if you don't want to face Windows Programming (which really isn't that bad once you get the hang of it), the use Linux. Linux is extremely easy to program for. Remember to expand your horizons and leave the past behind. - Me |
Connelly Barnes
Member #1,329
May 2001
|
Ideas: |
Bob
Free Market Evangelist
September 2000
![]() |
For graphics related suggestions, please post in the other thread. Except no one else likes it It's probably going to end up as al_read_button(AL_MOUSE_B_LEFT), al_read_axis(AL_MOUSE_X), or somesuch. See the conductors list for details. AL_BEST == 32bpp, AL_FASTEST == 8bpp. What's wrong with almain(int argc, char **argv)? See the config API thread. Bad idea. A better solution would be for the user to specifically ask for the update method. Other bad idea. First, it's not clear what you'll be doing with the bitmap. If you're planning to read it a lot (to do some effects or blending), then having in video memory is a bad idea. Secondly, you lose all your video bitmaps when you switch out of a Windows app. You don't really want to reload all your files, now do you? But it is. Want accelerated bitmap? Make your own 6 line function which returns the proper type. Otherwise, Allegro could claim that a certain bitmap type is "fast" whn in fact it is not (blending a video bitmap). FBlend already makes it faster (about 5x). OpenGL would sure help, but that wil only happen when blitting from to the screen. No, they should include every function. It's damn near impossible to tell what they'll accelerate next Already on the table. One function, with possibly rotate_sprite and pivot_sprite for the often-used cases. What if you destroy the parent BITMAP? Now you need to include list management. But then, if you delete a sub-bitmap, you'll need to do some extra work to get rid of it. This is really something internal to Allegro, so it wouldn't really go into the API. -- |
spellcaster
Member #1,493
September 2001
![]() |
Oh... I just wanted to point out that I had once a system with two mice connected, so don't be sure there's just one. I did this only to play a self written air hockey with a friend of mine, and it was fun. I'm not sure what -- |
Eric Love
Member #846
December 2000
|
I didn't read it it all but... |
23yrold3yrold
Member #1,134
March 2001
![]() |
Quote: We should have versions of draw_sprite and the primitives which observe the z-buffer. Oh Lord yes. I was just wishing for this yesterday. -- |
Korval
Member #1,538
September 2001
![]() |
Quote: Oh Lord yes. I was just wishing for this yesterday. Yet another problem that would be easily solved with OpenGL. [ January 05, 2002: Message edited by: Korval ] |
axilmar
Member #1,204
April 2001
|
About the naming convention : that's 4 people guys! 'DrawSprite' looks much better in the long term than 'draw_sprite'; it makes code browsing faster. For one more time, Allegro needs to go 3D. Everyone is doing 3D; couldn't Allegro developers provide an API for 3D ? or they don't like 3D at all ? And don't say again 'use AllegGL'; OpenGL is not the most efficient way of doing 3D in Windows; Direct3D is. The API would provide wrappers above Direct3D/OpenGL/whatever 3D system is available in the target machine. About DOS : I think that support for it should be dropped. DOS is so much outdated technologically. About C or C++. If you plan to do it in C, why don't you keep it as C-like as possible ? I mean, using straight functions, variables, structs and enums. You may drop vtables already, and provide the functions as is. For example you could have "blit_memory_to_screen", "blit_screen_to_memory", "blit_memory_to_memory", "create_video_bitmap", "create_memory_bitmap", etc. |
23yrold3yrold
Member #1,134
March 2001
![]() |
Quote: I'm very much considering writing an allegro interface .h file that inlines calls from the rediculously unreasonable under_score style to the far more legitimate AltCaps style.
I'll write one now (OK, start writting one now) and stick it on my site. Any objections to (dest, source) in all the blitting functions? -- |
Bob
Free Market Evangelist
September 2000
![]() |
quote:For one more time, Allegro needs to go 3D. Everyone is doing 3D; couldn't Allegro developers provide an API for 3D ? or they don't like 3D at all ? And don't say again 'use AllegGL'; OpenGL is not the most efficient way of doing 3D in Windows; Direct3D is. The API would provide wrappers above Direct3D/OpenGL/whatever 3D system is available in the target machine. See this thread -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
Screw 'em -- |
|
|