Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
This is a place to post ur problems related graphics programmin in Turbo C/C++.
Turbo C/C++ is the compiler used in almost all colleges for C, and any one having any problem can post here, and surely some one will solve ur problem. It is better to have many heads thinking.
Reply With Quote
  #2  
Old 20-02-2004
Member
 
Join Date: Dec 2003
Location: 18.55 N and 72.54 E
Posts: 61
Hi aadipa,
yes i agree with u. Turbo C/C++ is mostly used in all colleges. aadi if u r on broadband can u upload this compiler in the download section. I wud done it myself but i am on dial-up. If possible plz
I have asked sandy to sub divide this programming section for different languages so all C/C++, VB etc related stuff will not mix up. Lets see.
Reply With Quote
  #3  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
sorry, i am on dial up too
Reply With Quote
  #4  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Posts: 11
Turbo C++ 3.0 is not free Ferrari, but TC++ 1.0 is and is available on the Borland site. So is TC 2.0 They're antique s/w now and Borland is giving them away for free. Turbo Pascal 7.0 is also free. I'll try to find the links on the Borland site
Reply With Quote
  #5  
Old 20-02-2004
Member
 
Join Date: Dec 2003
Location: 18.55 N and 72.54 E
Posts: 61
hi sumeet, the reason i asked to upload turbo is coz on borland they ask u to fill a form and then email u the download link. I think TechArena should have a copy of Turbo C instead of submitting a direct link.
Reply With Quote
  #6  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Posts: 11
Is TC++ 3.0 free? Anyway, I just added TC 2.01 and TC++ 1.01 to the downloads section. But it's not showing that it was added by me! Hehe. If v3.0 is free, then please gimme the link and more info

Last edited by Sumeet : 20-02-2004 at 05:46 PM.
Reply With Quote
  #7  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
here is a link to 256 colors VGA Programming in TC++
http://www.brackeen.com/home/vga/index.html
Reply With Quote
  #8  
Old 20-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
TC++ 3.0 uses the same VGA programming as that of TC, so u can use material in above link in your procedural C programs too. No need of Object Oriented Language C++
Reply With Quote
  #9  
Old 20-02-2004
Member
 
Join Date: Dec 2003
Location: 18.55 N and 72.54 E
Posts: 61
hi aadi thnx for that link

sumeet if u want Turbo C/C++ 3.0 then i shall upload it for you and every1else from a cyber. It's around 3 MB file(rar).
Reply With Quote
  #10  
Old 21-02-2004
Banned Users
 
Join Date: Feb 2004
Posts: 4
hey. ihave a problem with my C++ graphics. i am trying out a simple pacman program with turbo c++. the problem is that everytime the circle (pacman) moves.. it leaves a trail. i had earlier solved this problem by using cleardevice within the for loop, but then i had to print all the obstacles again.

so i then started to print a black ellipse over my previous circle. this cleaned up the screen quite a bit and i dint have to reprint the obstacles. now.. theres a fresh problem. everyime the value of x or y exceeds the maximum value or minimum value depending on the position of pacman.. i reset their values to keep the game goin on one screen. the problem is that then a circle is printed at the edge of the sceen everytime i transport myself from one side to the other. i am unable to remove that one solid circle. as a result the game screen gets cluttered with several circles around the edges alone.

Is there any way atl all to solve this problem?? is there no way to print an ellipse continuously moving without having a trail..

id appreciate your help
Reply With Quote
  #11  
Old 21-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
1. Keep current x, y in temp variables x_old, y_old
2. Check direction, and calculate next position and store values in x, y
3. Check for bounding rectangle/monstor collision, reset values of x, y accordingly
4. Now if x!=x_old && y!=y_old, erase pacman/monstor at x_old, Y_old, and draw at x, y

For better effects, use getimage() and putimage().

Last edited by aadipa : 21-02-2004 at 08:31 PM.
Reply With Quote
  #12  
Old 21-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
i have uploaded a packman developed by my friend. its only the exe and if u want the source for the reference, pls contact him at the e-mail address given in the comment of the zip file

[Do not hotlink. Freewebs doesn't support hotlinking. Link won't work. Use a '_' before the link so to copy paste link in browser address bar]

_http://www.freewebs.com/adpinfo/PACMAN.zip about 75kb

Last edited by ferrari : 21-02-2004 at 11:58 PM.
Reply With Quote
  #13  
Old 21-02-2004
Member
 
Join Date: Dec 2003
Location: 18.55 N and 72.54 E
Posts: 61
LETHAL U CAN REFER THIS SOURCE CODE.THE PROBLEM IS THE CODE COMPILES WITHOUT ERROR BUT WHEN I RUN IT I GET A BLANK SCREEN. CAN SOME1 HELP ME. I THINK THE ERROR IS IN THE GRAPHICS.HPP HEADER FILE. THE COMPILED EXE IS INCLUDED.

-http://ferrari.TechArena.in/c_c++_codes/pacman.zip
Reply With Quote
  #14  
Old 22-02-2004
Member
 
Join Date: Dec 2003
Location: Goa
Posts: 5
Ferrari Whats ur age ?Ur a great programmer .I would love to learn from u.
Reply With Quote
  #15  
Old 22-02-2004
Member
 
Join Date: Feb 2004
Location: In front of my VDU
Posts: 17
i checked the code and found following problems

1. #include contains a static path.
2. the path contains '\' as separator like c:\tc\pacman\xxx.h
it should be either
a. c:\\tc\\pacman\\xxx.h ----- or
b. c:/tc/pacman/xxx.h

also all .lvl and .wal files are expected to be in the folder from where u run the .exe

Basically #include or any part of program shold never contain full path of the reference file. so it should be #include "xxx.h" in each file and the directory while compiling should be set to pacman folder.

With above changes done, the code compiles, and now shows the start screen with a level drawn and hangs there. This must be some unhandled exception. I am going through code and post the solution if found.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Graphics & other programming in Turbo C/C++"
Thread Thread Starter Forum Replies Last Post
Graphics with C programming for Different shapes Adriana_andros Software Development 4 12-01-2010 11:26 AM
Graphics program required in C programming Language ramsun Software Development 3 19-11-2009 12:17 PM
Socket programming: Is any new Programming Language? Kushan Software Development 3 14-11-2009 11:13 AM
JetBrains Introduces a New Programming Paradigm With its Meta Programming System JoeFrat Software Development 3 13-12-2008 01:49 PM


All times are GMT +5.5. The time now is 07:33 PM.