well, i want to learn some very basic game programming starting from C ,then C++.. How to include that header file <graphics.h> in my IDE like Turbo C or andy other IDE. please help!

regards,
Techy23.

Recommended Answers

All 10 Replies

Member Avatar for I_m_rude

TC already have graphics. h. You have to just set the path for the drivers in it. google it for the precedure. check it in your bin folder for confirmation of graphics.h. in case, it is not there, then download it from any site as it is very easily available. after downlaoding , paste it in specifed folder where your all .h files are.

thanks.

If you're not using Turbo C, you can't use graphics.h. If you're new to game programming I'd recommend writing a few text-based games first, then look for a more modern graphics library. SDL and Allegro are two names that pop up regularly for starting out.

If your using Turbo C, you're pretty much stuck in DOS. But you can run programs inside that magical wonder called DOSBox.

I recommend learning graphics using the old Denthor VGA trainers as translated into C by Chris Mann.
ftp://ftp.scene.org/mirrors/hornet/code/tutors/denthor/

Then, once you understand all that, then you're ready for the good stuff.
Get an Orwell Dev-C++ install and download libSDL. You'll love it.
(Orwell Dev-C++ and libSDL are both easily googled.)

Member Avatar for I_m_rude

one thing, see procedure on google.com. You will find how to include graphics.h on dev C++. I have worked alot on graphics.h after including it in dev C++. in Dos Box your program will crash(without undefined reason) again and again(it is my personal experience).

I have worked alot on graphics.h after including it in dev C++. in Dos Box your program will crash(without undefined reason) again and again(it is my personal experience).

My brain hurts! 8(

Member Avatar for I_m_rude

@waltP any problem ? What happen with your brain ? :-O Actually, this is not medical forum.

What happen with your brain ?

Your post -- thinking you can use graphics.h in Dev-C and were surprised you program blew up...

Member Avatar for I_m_rude

hmm... I am still using graphics.h in DEV C. why are so shocked after listening this ? You can include it in code blocks also. Ans program blew up when you use TC. You run it , after one or twice, your program will crash.

GTK libraries are good for graphics.

Member Avatar for I_m_rude

try SDK library. It is damn awesome to use.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.