Have you played this came before...
I have created this game in C++, Simple and sweet game.
Nice car game in C++ using Borland Turbo C++ Compiler.
Set BGI Graphics path in initgraph() function according to your pc's Trubo C BGI library.
Here mine is c:\\turboc3\\bgi.
Keyboard Controls to play the game ;
Controls
A - Move car left
D - Move car right
Enter/ESC to exit the game.
If your compiler's graphic library is not included then you will find many errors in this program.
To avoid this follow the steps:
1. Go to compiler's option menu (ALT+O)
2. Then select Linker option
3. Then select Libraries option
4. Then Mark X to Graphics Library option using space button
5. Then select OK
All done.
If you want to save this changes permanently then do this:
1. Go to Option menu
2. Select Save then select OK
Still having problem then ask me or comment below.
Enjoy the Game.
i compiled it in turbo c++ and it says that if and do are not expanded inline and that f is assigned a value that is never used. please check.
ReplyDeleteThese are just warnings, ignore them.
ReplyDeletei run this ion ms visual 6.0 c++ and got an error saying "fatal error: cannot open file: 'graphics.h': no such file or directory"
ReplyDeleteGraphic.h is not supported in visual studio, try Turbo C++ compiler.
Deleteno error but my turbo c++ cant run it!
Deleteim getitng "ctrl+break to quit" then freezes! >_<
Which OS you are using and which version of Turbo C++ ?
Deletewindows 7 32 bit and turbo c++ 3.0!
Deleteim a newbie on programming so i dont really know what im doing! >_<
i also have dosbox 0.74 coz' i read that it is needed by the turbo c but when i tried it, it gives me "link error"
https://drive.google.com/file/d/0BxIpGO4jy_1PMFROX2s5Z1hwMmM/edit?usp=sharing
DeleteTry this
On compling this error is showing
ReplyDeleteGraphics error: Device driver file not found (EGAVGA.BGI)
Press any key to halt:
Set BGI Graphics path according to your pc's Trubo C BGI library.
DeleteHere mine is c:\\turboc3\\bgi.
goods
ReplyDeleteerror BGI graphics not supported under Windows , what should i do
ReplyDeleteIn Turbo C++, it is supported. Check Initgraph method BGI library path first. If you are using any emulator like DosBox to run Turbo C++ then path may vary than the original.
DeleteFor Turbo C++ compiler goto to Options (ALT+O)
Then goto Directories
If path for Include Directories is C:\TURBOC3\INCLUDE
then your BGI path will be liek C:\\TURBOC3\\BGI
Perfect learning website
ReplyDelete