Sign in to follow this  

about dos games...

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey. im wondering , what libraries(C/C++) did DOS games rely on??? graphics & sound?. i mean if i want to make a dos game, what libraries do i need?(C/C++) thanks.

Share this post


Link to post
Share on other sites
DOS games didn't nessecarily use any libraries, they used interrupts to make calls to the sound and graphics hardware, which would be done in assembly.
You really don't want to make a DOS game, and even if you did I don't know where you could get a compiler that could create a DOS game.

If you just want to make a low-res game or a text-based one that runs under Windows, that's a lot simpler.

Share this post


Link to post
Share on other sites
Back when everything was done by the CPU and CPUs were a lot slower, programmers tended to code those things by hand.

Some notable exceptions were
- the fabulous "Miles Sound System" which most commercial DOS games used for audio playback (not cheap!)
- DOS4GW, the DOS extender from Watcom C++ (the most-used compiler for commercial DOS games) allowing games to escape from Intel's Segment/Offset madness into protected mode
- VESA, more of a graphics card standard than a library, but before DirectX and graphics drivers, this was the only safe way to enter graphics modes beyond 320x200x8bpp

For hobbyist development, nothing beats DJGPP with Rhide and Allegro. DJGPP is an Open Source DOS compiler which also generates protected mode executables (if I remember right), Rhide is an excellent text mode IDE working perfectly with DJGPP and Allegro is a very convenient, fast and well-designed library for graphics and sound playback.

Instead of Allegro, you could also check out the "WordUp graphics toolkit" which is now free I believe.

-Markus-

Share this post


Link to post
Share on other sites
Quote:
Original post by Wajde
graphics


/* initialise the graphics system */
initgraph ( &gd, &gm, "D:\\TC\\BGI" ) ;
/* get the maximum x and y screen coordinates */
maxx = getmaxx() ;
maxy = getmaxy() ;

/* calculate center of screen */
midx = maxx / 2 ;
midy = maxy / 2 ;
...






floodfill ( midx, maxy - 1 - 12, 1 ) ;
circle ( midx, maxy - 13 - 12, 12 ) ;
floodfill ( midx, maxy - 10 - 12, 1 ) ;...



Quote:
Original post by Wajde
sound?.



for ( i = 0 ; i < 7 ; i++ )
{
sound ( octave[i] * 8 ) ;
delay ( 30 ) ;
}
nosound() ;
break ;
...




are you sure you are interested in this? Maybe you can try : Alex Russell's Dos Game Programming in C for Beginners

Share this post


Link to post
Share on other sites
Its not that much, but I developed a graphical Pong game for DOS if you want to see how its done. It does not use Borlands old BGI library. Instead, it does everything by hand, as Evil Steve pointed out, which is how most DOS games were developed.

Clicky

It uses TCC (Part of Turbo C 2.1 - a very good DOS compiler package) and TASM (Comes with Turbo C), and runs in a real mode DOS envirement. It includes source code.

From the source code you can see how its done.

Hope this helps!

Share this post


Link to post
Share on other sites
I used Turbo C back in my early teens, experimenting with pixels and lines and such. I never did anything serious with it, and jumped straight into DirectX when I could finally afford Windows 95.

DJGPP with Allegro seemed to be the norm back then.

Hell, I'd love to take some time off and make a good old 13H mode game. It's difficult, VERY difficult, but the end result puts such a big smile on your face.

Take a look at the original Wipeout for DOS, it was a masterpiece.

Share this post


Link to post
Share on other sites
There were libraries available for DOS too. I remember using DirectQB (for 320x200 8bit, sound, etc) and UGL (for high resolution and more advanced suff). I don't (need to) know how these would compare in speed to custom assembly though.

I think UGL can be used from C if you please, but I have no idea why you'd want to make a game that almost nobody can play without DOSBox...

Share this post


Link to post
Share on other sites

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this