maze game

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 4
Reputation: ALI SHER is an unknown quantity at this point 
Solved Threads: 0
ALI SHER ALI SHER is offline Offline
Newbie Poster

Re: how to make maze game using "gotoxy" & getch?

 
0
  #1
Dec 29th, 2007
can we make the maze game using header files of conio.h and iostream.h
Last edited by Ancient Dragon; Dec 29th, 2007 at 6:06 pm. Reason: removed quote from previous hijacked thread
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 4
Reputation: ALI SHER is an unknown quantity at this point 
Solved Threads: 0
ALI SHER ALI SHER is offline Offline
Newbie Poster

Re: how to make maze game using "gotoxy" & getch?

 
0
  #2
Dec 29th, 2007
plz give me some hints to make a maze game using header files of conio.h and iostream.h i m just able to draw the game plz...tel me how can i do it i m beginner in c++" i tried my best
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 464
Reputation: invisal is a jewel in the rough invisal is a jewel in the rough invisal is a jewel in the rough 
Solved Threads: 49
invisal's Avatar
invisal invisal is offline Offline
Posting Pro in Training

Re: how to make maze game using "gotoxy" & getch?

 
0
  #3
Dec 29th, 2007
Originally Posted by ALI SHER View Post
plz give me some hints to make a maze game using header files of conio.h and iostream.h i m just able to draw the game plz...tel me how can i do it i m beginner in c++" i tried my best
Are you using Turbo C/C++ or Borland C++? Because gotoxy() function is only available in those compiler. To make this kind of game, I would firstly make 2d of array for storing the map data.
Last edited by invisal; Dec 29th, 2007 at 4:57 pm.
Yesterday is a history, tomorrow is a mystery, today is a gift.
Behind every smile is a tear.
Visal .In
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 464
Reputation: invisal is a jewel in the rough invisal is a jewel in the rough invisal is a jewel in the rough 
Solved Threads: 49
invisal's Avatar
invisal invisal is offline Offline
Posting Pro in Training

Re: how to make maze game using "gotoxy" & getch?

 
0
  #4
Dec 29th, 2007
    0 1 2 3 4 5 6 7 8 9 A B
0 : 1 0 1 0 0 0 0 0 0 0 0 0
1 : 1 0 1 1 1 1 1 1 1 1 1 1
2 : 1 0 0 0 0 0 0 0 0 0 0 0
3 : 1 1 1 0 1 1 1 1 1 0 1 0
4 : 0 0 0 0 0 0 0 0 1 1 1 0
5 : 1 1 1 1 1 1 1 0 1 1 1 1
6 : 0 0 0 0 0 0 0 0 0 0 0 0
7 : 1 1 1 1 1 1 1 1 1 1 1 1

The 2D array would be looking like this. The 0's represent the open space, and 1's represent the block. Using getch() to recieve the move that user has made. If the next move is blocked, then stay still and wait for another move.
Last edited by invisal; Dec 29th, 2007 at 5:15 pm.
Yesterday is a history, tomorrow is a mystery, today is a gift.
Behind every smile is a tear.
Visal .In
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 109
Reputation: rajatC is an unknown quantity at this point 
Solved Threads: 7
rajatC's Avatar
rajatC rajatC is offline Offline
Junior Poster

Re: maze game

 
0
  #5
Dec 30th, 2007
are u talking about RAT IN A MAZE problem...how will the user input the next move...cordinates at the console or click with the mouse..what's the objective actually..
Life is about being happy...
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 464
Reputation: invisal is a jewel in the rough invisal is a jewel in the rough invisal is a jewel in the rough 
Solved Threads: 49
invisal's Avatar
invisal invisal is offline Offline
Posting Pro in Training

Re: maze game

 
0
  #6
Dec 30th, 2007
Originally Posted by rajatC View Post
are u talking about RAT IN A MAZE problem...how will the user input the next move...cordinates at the console or click with the mouse..what's the objective actually..
In Turbo C++, there are clrscr(), getch(), and gotoxy() functions. With these functions, it enable us to write a mini-game with console. Using clrscr() to clear the whole screen, getch() to get input, and gotoxy() to change the coordinate.
Last edited by invisal; Dec 30th, 2007 at 2:09 pm.
Yesterday is a history, tomorrow is a mystery, today is a gift.
Behind every smile is a tear.
Visal .In
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 514
Reputation: Jishnu will become famous soon enough Jishnu will become famous soon enough 
Solved Threads: 26
Jishnu's Avatar
Jishnu Jishnu is offline Offline
Posting Pro

Re: maze game

 
0
  #7
Dec 31st, 2007
Hi invisal,
As rajatC pointed out the OP must mention the specifications and the rules before we can help him more. He's being too much general.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.

"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 4
Reputation: ALI SHER is an unknown quantity at this point 
Solved Threads: 0
ALI SHER ALI SHER is offline Offline
Newbie Poster

Re: how to make maze game using "gotoxy" & getch?

 
0
  #8
Dec 31st, 2007
Originally Posted by invisal View Post
Are you using Turbo C/C++ or Borland C++? Because gotoxy() function is only available in those compiler. To make this kind of game, I would firstly make 2d of array for storing the map data.
[code=language]i m using borland c and i hav just draw the game usng 2d arry
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 514
Reputation: Jishnu will become famous soon enough Jishnu will become famous soon enough 
Solved Threads: 26
Jishnu's Avatar
Jishnu Jishnu is offline Offline
Posting Pro

Re: maze game

 
0
  #9
Jan 1st, 2008
You're still not giving the details. Hi Ali Sher, you need to give us the rules and other specifications to help us in helping you. If you're not interested, so am I.
Last edited by Jishnu; Jan 1st, 2008 at 1:14 am.
"You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.

"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 4
Reputation: ALI SHER is an unknown quantity at this point 
Solved Threads: 0
ALI SHER ALI SHER is offline Offline
Newbie Poster

Re: maze game

 
0
  #10
Jan 2nd, 2008
Originally Posted by Jishnu View Post
You're still not giving the details. Hi Ali Sher, you need to give us the rules and other specifications to help us in helping you. If you're not interested, so am I.
we should take any special character like # for path finder .User can move this character by the help of arrow keys e.g. up, down, left and right.
Use ASCII characters for arrow keys’ handling.
After exit the character successfully your program should display a greeting message of success.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC