Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #11 (permalink)  
Old November 20th, 2006, 08:16 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

That could work but . . .

I would primarily create another class called character where you would store all of the stats

becouse there is an issue with storing that variable in the room

when you move to another room that room will have a different number of kills

technically you could just add all of the values using a for statement but it would be better practice

and easier to access and program along with organize the save feature that you add later =P

You could throw in stuff like skills into the character that can be obtained by entering a certain room

or store attributes at the start of a new game

also I would give rooms the flyable/swimmable/walkable vars to make it interesting

also before you get to far in programming i would take the code in your main function and

put it in another function so the main function will be neater and easy to understand the program flow

and then add a menu to the begining when you are done

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote
  #12 (permalink)  
Old November 20th, 2006, 10:31 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

another good idea is to add a riddle to each room and a clue to each room

make it like a dungeon where they are trapped trying to escape

there are clues everywhere that are related to the riddles

doing a certain action might cause you to discover a clue

the clue can help you find weapons and new skills and also help solve the riddle

there will be like 20 small riddles that when solved get you a skill or weapon

the answers to like 5 will create a clue to a major riddle and there re 4 major riddles

the 4 major riddles will give you a clue on how to get out

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote
  #13 (permalink)  
Old November 20th, 2006, 10:33 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

give it a cool story like you were doing research at work then the building like got possessed or something

then out of nowhere everyone turned into monsters

You must get out alive and then like shut down

pretty much a resident evil mock up

only more rpg related

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote
  #14 (permalink)  
Old November 20th, 2006, 11:48 AM
Authorized User
 
Join Date: Sep 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks geo, you have been really helpful. I will take those ideas into consideration, and you are definitely right, I will move much more code into other functions.

"Judge a man by his questions, not by his answers."
-Voltaire
\
Reply With Quote
  #15 (permalink)  
Old November 20th, 2006, 08:12 PM
Authorized User
 
Join Date: Sep 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just have a question. Say I create another class that carries the killcount and points integers, how do I add to those in the function containing the if statements telling what to do when an action comes up?

"Judge a man by his questions, not by his answers."
-Voltaire
\
Reply With Quote
  #16 (permalink)  
Old November 21st, 2006, 08:23 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Well . . .

To follow those exact steps you would create the class

declare a pointer of it in the main function

send it's variables into the function and then when the function modifies the value of the pointer

it actually modifies the number globally

NOW ON THE OTHER HAND

this does work but is very sloppy

what I would do is add the function to the class

then you can access all of the variables in your class through that function

so you could make a function that increments each variable

and a function that outputs each variable

and everytime you want to add to that variable just call the function

=P

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote
  #17 (permalink)  
Old November 21st, 2006, 08:27 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Thank You for your respect

I was once a beginning C plus plusser myself =P

I could never find any help that was useful

then I found this forum

I've always had a knack for programming but as you have discovered as I did

No one knows everything

So you're gonna need some help along the way

The only thing I can say is keep up the good questions

You sound exceptionally good for a beginner

Remember Pointers are the most confusing things to use

especially before the namespace std and string types came out

Keep up the good work!

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote
  #18 (permalink)  
Old November 21st, 2006, 11:39 PM
Authorized User
 
Join Date: Sep 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just chose the sloppy way because I was not quite clear on the other way. The only reason I might seem good for a beginner is because I have my dad to help me, and he is a big C programming, so he can help me a lot on C++.

"Judge a man by his questions, not by his answers."
-Voltaire
\
Reply With Quote
  #19 (permalink)  
Old December 15th, 2006, 09:12 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 103
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Geo121
Default

Hey How are you coming along on this game?

~ Geo

 ~ You are unique, just like everyone else
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Game programming. Magxtopher BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 3 September 11th, 2008 09:49 AM
Pong Game Help -XM- BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 4 June 20th, 2007 02:23 PM
Old game review guti Need help with your homework? 0 March 20th, 2007 11:28 AM
How to Open the Game Mamatha Classic ASP Basics 0 May 17th, 2004 02:09 AM
STRATEGIE - GAME! WarKrife C++ Programming 1 August 21st, 2003 08:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.