How to make a C++ game??

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

Join Date: Jan 2007
Posts: 44
Reputation: lotsofsloths is an unknown quantity at this point 
Solved Threads: 0
lotsofsloths lotsofsloths is offline Offline
Light Poster

How to make a C++ game??

 
0
  #1
Jan 1st, 2007
Ok, im not that much of a geeky smart guy in C++,
but i've got some skillz..
so im trying to make a very simple game that will randomize
1 number for the computer and 1 number for the person using the program and whomever(person or computer) gets the highest number(lets say 1-10) wins, and keeps score also...
If anyone can just post here, or help me make this program in anyway that would be awsome!!!
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 486
Reputation: Bench has a spectacular aura about Bench has a spectacular aura about Bench has a spectacular aura about 
Solved Threads: 48
Bench's Avatar
Bench Bench is offline Offline
Posting Pro in Training

Re: How to make a C++ game??

 
0
  #2
Jan 1st, 2007
First of all, I suggest taking a look at the short tutorial on random numbers here - http://www.daniweb.com/tutorials/tutorial1769.html
¿umop apisdn upside down?
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: How to make a C++ game??

 
0
  #3
Jan 3rd, 2007
As for keeping score, you could have two variables.
  1. int games_won_by_computer;
  2. int games_won_by_player;

Once you're done that game, you could try a guessing game where the user guesses a random number in as few tries as possible.
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 45
Reputation: apurv is an unknown quantity at this point 
Solved Threads: 3
apurv apurv is offline Offline
Light Poster

Re: How to make a C++ game??

 
0
  #4
Jan 7th, 2007
Originally Posted by lotsofsloths View Post
Ok, im not that much of a geeky smart guy in C++,
but i've got some skillz..
so im trying to make a very simple game that will randomize
1 number for the computer and 1 number for the person using the program and whomever(person or computer) gets the highest number(lets say 1-10) wins, and keeps score also...
If anyone can just post here, or help me make this program in anyway that would be awsome!!!
its very simple
wat exactly u want ?
source code ??
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: hylex is an unknown quantity at this point 
Solved Threads: 0
hylex hylex is offline Offline
Newbie Poster
 
-1
  #5
19 Days Ago
i want to know how in c++
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC