|
DJGPP or MinGW?? |
Mr. Xboxor
Member #3,763
August 2003
|
Basically, I am making a game and want to use allegro. It is very likely that I will only use allegro's function's for the game. So which would be better for this? I have grown comfortable making games in DOS, and expect DJGPP to be a very easy move from Turbo C++. However, if I just use allegro with MinGW will that be an easy move to? I want to run my game at 640x480x256, or maybe 800x600 or even 1024x768 if its fast enough, and use all the hardware acceleration I can get. I guess I am really only worried about a couple things: Can I get access to all the hardware acceleration I have using DJGPP? "Java is high performance. By high performance we mean adequate. By adequate we mean slow." -Mr. Bunny |
kazzmir
Member #1,786
December 2001
|
Yes. Yes. No!. No! Use mingw32. you will thank yourself later for the switch. |
CGamesPlay
Member #2,559
July 2002
|
I believe MS dropped real DOS support at 2k, so you should use MinGW for those. Personally, I've never used DJGPP, but MinGW is simple enough for me. Are you talking about Turbo C++ as an IDE, or a compiler? If an IDE, then either compiler will do better (so I recommend MinGW), but if a compiler, then I couldn't tell you. -- Ryan Patterson - <http://cgamesplay.com/> |
Evert
Member #794
November 2000
|
You can develop using DJGPP - if you do this from pure DOS, you will have better chances of catching invalid memory access than you do under Windows. Then when you release your game, simply recompile with MinGW. |
Mr. Xboxor
Member #3,763
August 2003
|
Maybe I'm just stupid, but just looking at the MinGW website confuses the crap out of me. I have no idea what I need to download. DJGPP's website is much simpler, I just tell them what I want to do with the compiler and my operating system, and they tell me which files I need. Heck, I couldn't even find the world "compiler" on the MinGW website. If I just randomly ran into the website before so many people recommended it to me, I would have no idea that MinGW was even capable of compiling stuff. Someone please give some guidance to me. "Java is high performance. By high performance we mean adequate. By adequate we mean slow." -Mr. Bunny |
aybabtu
Member #2,891
November 2002
|
I recently (about 2 weeks ago) switched from DJGPP to MinGW, because a lot of people couldn't play my games, because they were DOS only! You can download all you need here. I don't know how I found it, but that's everything you need for MinGW! Once you have that, try compiling a few test programs, using the commandline: gcc file.cpp -o file.exe
If you ever used command line to compile with DJGPP, you'll notice that the commandlines are exactly the same. It's just a different port! |
Johnny13
Member #805
October 2000
|
aybabtu:i CAN still play dos game:P..latest MinGW is 3.0rc4, 3.0 may_be release soon Quote: Do DOS programs made with DJGPP work well with Windows XP/2000? modern PC use USB,gameports are no longer supported,USB joypad not work in DOS!>< so you can only use it as Alg3D Praise my Games!!<code>#define SPAMMER (post>=666&&postperday>=6)</code><Mr.spellcaster>What post? <Mr.spellcaster>A useful post by me. |
Mr. Xboxor
Member #3,763
August 2003
|
Well, MinGW looks really confusing. I definitely want to use allegro, but if I have to get a direct x dll or lib file or header file or something, it just sounds like a big pain in the butt to do on my home computer where I have to get permission from my dad to download anything. And he'll get all confused probably when he's trying to install it, and then I'll have to tell him that I need a direct x thing, and then I'll have to make him download the allegro stuff, and then he'll have to install that. You see what I'm dealing with? So right now I think I'll just get DJGPP, then when I go back to school I'll download MinGW and port my code over from DJGPP to Windows. Will that be hard? And also, can I run DJGPP on Windows XP (our schools run XP, my home runs ME so I'll be okay) easily? Do I like have to worry about XP not letting me do somethings? And here's a question no one will give me a clear answer to: When I initialize graphics mode, allegro will allocate some memory for the screen, which may be much larger than what is actually visible. Then it warns not to use the global *screen at the same time as create_video_bitmap() because the two may overlap. Well, I'm going to be using a double-bufferring system (I'm am overdrawing some, so I assume that is the fastest method?), and want to shrink the screen down to the physical size of the screen. Then I want to allocate a screen size amount of video memory for the screen_buffer (assuming blitting is being accelerate by hardware) along with the rest of the video memory for my graphics (assuming masked blitting is being accelerated by hardware). How do I do this? "Java is high performance. By high performance we mean adequate. By adequate we mean slow." -Mr. Bunny |
psundlin
Member #175
April 2000
|
Installing mingw and compile allegro is not a pain in the butt. And then just the usual allegro dance: edit: I had some problems with video bitmaps in allegro, but i found some advice in these forums. BITMAP *foo = create_video_bitmap( SCREEN_W,SCREEN_H ); BITMAP *buffer = create_video_bitmap( SCREEN_W,SCREEN_H); destroy_bitmap(foo); The problem looks to be that the first video bitmap is the same as the screen bitmap. So this should fix that. |
Sirocco
Member #88
April 2000
|
Why not use both? For my non-commercial work, I do all my coding with Rhide/Djgpp, then take the finished work and compile it using MingW to get the win32 port. Since I spent many years using Borland C++, Rhide's appearance is very familiar to me, and easy to navigate. Then again, Dev-CPP is quickly catching up in terms of ease of use. Quote: So right now I think I'll just get DJGPP, then when I go back to school I'll download MinGW and port my code over from DJGPP to Windows. Will that be hard? Not at all. If you stick to ANSI/Posix commands, you shouldn't have to worry about changing any of the code. Just remember your END_OF_MAIN() tag Quote: if you do this from pure DOS, you will have better chances of catching invalid memory access than you do under Windows Unfortunately, this is very true. An invalid pointer call or out of bounds array access will kill your program instantly under DOS. As inconvenient as this sounds from a end-user standpoint, it's valuable to us dev'rs. --> |
Carrus85
Member #2,633
August 2002
|
Dev-CPP is catching up, but it still has a long way to go before it is complete. Personally, I'm still all-for writting my own ide, perhaps using some of the scintilla code to make life a little easier. Dev-cpp has too many bugs for my taste, I prefer just using scite instead.
|
Bob
Free Market Evangelist
September 2000
|
If you've read the Allegro documentation, you'd have known that it provides you a direct link to the downloads, and even includes installation instructions. allegro/docs/build/mingw32.txt -- |
Sirocco
Member #88
April 2000
|
Quote: Dev-cpp has too many bugs for my taste, I prefer just using scite instead. Indeed... I have noticed that the last two builds I've used (including the latest) crashed way too often. Version 3.9somethingorother crashed every time I saved a file, which was rather... er... inconvenient. Regardless, it's nice to know that thanks to cross-platform libs you can do your dev'ing in the IDE of your choice, then move to the other compilers for quick ports. I love that --> |
Korval
Member #1,538
September 2001
|
Quote: if you do this from pure DOS, you will have better chances of catching invalid memory access than you do under Windows That's not true. Well, not the last part. Windows is quite good at catching invalid memory accesses (what do you think a GPF is?). As good as an OS can be. |
amarillion
Member #940
January 2001
|
For a long time, I had both DJGPP and MinGW installed. I used DJGPP + RHIDE for development, and compiled binaries both for dos and windows. That setup worked pretty well. Nowadays I'm developing under linux though -- |
gillius
Member #119
April 2000
|
I have to agree with Korval. I would have made a point earlier because people say this so often, but I very very rarely see a memory error go unnoticed. I mostly reserved my statement for three reasons. The first being I have Windows XP, a real operating system, instead of Win98, a fancy shell over DOS. The second is that I use MSVC in debug mode, its debugging DLL does a lot of checking for you and adds "memory fences" around every allocation you make, checking them for modification. The third being that I use MSVC and not mingw, which are different compilers generating different code. Gillius |
Sirocco
Member #88
April 2000
|
Quote: I mostly reserved my statement for three reasons. The first being I have Windows XP, a real operating system, instead of Win98, a fancy shell over DOS. Unfortunately, under Win2k (sp3) there are many times when I find an illegal memory access glossed over by the OS, when it should have generated a GPF. This behavior, as you seemed to imply, happens far more often in the 9x/me family. --> |
Bob
Free Market Evangelist
September 2000
|
Quote: Unfortunately, under Win2k (sp3) there are many times when I find an illegal memory access glossed over by the OS, when it should have generated a GPF.
Are you sure? Not all illegal memory accesses trigger GPFs. -- |
Sirocco
Member #88
April 2000
|
Quote: Are you sure? Not all illegal memory accesses trigger GPFs. Yep. Although you're correct in that a GPF won't always be triggered, a line such as: blah = foo[21]; where foo[] only has 20 indices, will crash a program (under DOS) instantly. That is not always the case under the various flavors of Windows; indeed, under both 98 and 2K that particular situation will only cause a crash around 15% of the time. Of course, given your CPU and OS, YMMV. My whole point being, it's entirely possible to have a serious (albeit simple to fix) memory access bug that will always make its presence known under DOS, but not necessarily under Windows with 100% frequency; although I cannot vouch for XP since I don't use it. From above post: Quote: f you do this from pure DOS, you will have better chances of catching invalid memory access than you do under Windows In all honestly, it should probably read "...better chances of noticing invalid memory access...". Catching implies preventive measures, which Windows certainly possesses. --> |
gillius
Member #119
April 2000
|
No but in MSVC it will always cause an error in the debugging DLL. I don't see how it can possibly cause a GPF in DOS. No operating system can possibly tell you that's a bug. The memory at the "21st" element can be perfectly fine to write to, no matter what OS you are using. Even if your OS was some ultra-uber OS, it still probably couldn't do anything unless that access crossed the memory boundary of a page, because exceptions will only be thrown with access to invalid pages or pages with readonly bit set in the page table. We just saw a case with an array in a class, where accessing 1 element out of bounds was fiddling with a BITMAP* member. Gillius |
Bob
Free Market Evangelist
September 2000
|
Quote: No but in MSVC it will always cause an error in the debugging DLL. It won't either. You'll need to insert bounds checking code to catch invalid reads, which (unfortunately) isn't really possible to make work for the general case of C/C++ programs. -- |
gillius
Member #119
April 2000
|
err yes that's right. It will detect writes though. But I usually don't get memory errors anymore. Good use of STL and safer RAII-type methods. Pointers and arrays are evil. Gillius |
Sirocco
Member #88
April 2000
|
Crap... browser ate my reply, and I didn't catch it. Yay. Quote: No operating system can possibly tell you that's a bug. That's my whole point. If the bug's presence is blatantly obvious due to how the OS handles memory access, that's a plus. Quote: We just saw a case with an array in a class, where accessing 1 element out of bounds was fiddling with a BITMAP* member. I've run into this as well, on several occasions. Fun stuff. --> |
Derezo
Member #1,666
April 2001
|
Quote: We just saw a case with an array in a class, where accessing 1 element out of bounds was fiddling with a BITMAP* member.
That was happening to me all the time with strings. "He who controls the stuffing controls the Universe" |
|