Some Easy help needed please.

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

Join Date: Aug 2008
Posts: 3
Reputation: thenewbie is an unknown quantity at this point 
Solved Threads: 0
thenewbie thenewbie is offline Offline
Newbie Poster

Some Easy help needed please.

 
0
  #1
Sep 7th, 2009
so here the thing im practicing c++ just started all this is in cmd and im making combat simulator as of a project on another forum that i guesed good practice so im doing it but i decided to make 3 classes :archer , mage , barb and i got mini intro now i need to figure out a way to chose wich class the player wants...and im stuck there you guys got tips for me? do i have to make 3 stories ? ore is there a way to juste do if ( i chose archer then im archer ) and forget about barb and mage im sorry if im not very clear im trying tho got ANY ideas? let me know?

Sawm <3

anything could help im going to try until i achieve !
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 1
Reputation: 3Dwannabe is an unknown quantity at this point 
Solved Threads: 0
3Dwannabe 3Dwannabe is offline Offline
Newbie Poster

Re: Some Easy help needed please.

 
0
  #2
Sep 7th, 2009
You might be able to do it as a class array
Last edited by 3Dwannabe; Sep 7th, 2009 at 6:37 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 21
Reputation: namehere05 is an unknown quantity at this point 
Solved Threads: 1
namehere05 namehere05 is offline Offline
Newbie Poster

Re: Some Easy help needed please.

 
0
  #3
Sep 11th, 2009
I dont understand what you trying to do
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 38
Reputation: DarthPJB is on a distinguished road 
Solved Threads: 4
DarthPJB's Avatar
DarthPJB DarthPJB is offline Offline
Light Poster

Re: Some Easy help needed please.

 
0
  #4
Sep 12th, 2009
Originally Posted by thenewbie View Post
so here the thing im practicing c++ just started all this is in cmd and im making combat simulator as of a project on another forum that i guesed good practice so im doing it but i decided to make 3 classes :archer , mage , barb and i got mini intro now i need to figure out a way to chose wich class the player wants...and im stuck there you guys got tips for me? do i have to make 3 stories ? ore is there a way to juste do if ( i chose archer then im archer ) and forget about barb and mage im sorry if im not very clear im trying tho got ANY ideas? let me know?
I'm not exactly sure what your trying to do either, however it would seem your aiming for a 'pick a class' kind of option after your 'intro' and are unsure how to continue.
Obviously without knowing some specifics it's hard to recommend a specific strategy but i'll outline your general options as I see them.
If your using a command line style program (text games are so last century!) then you'll want to ask the user what character type they desire and parse the string input to see if it contains any keywords or identifiers (IE: strcmp(InputString, "Barbarian")).
If your using some kind of window system interface a good old three buttons will do fine. For anything more advanced your looking at a graphics API and a discussion of GUI and HCI that you'll want team input on.
Once the player type is selected your further options depend somewhat on the use of that data. If they simply pick a class, have some kind of battle and quit then you may simply wish to have a basic 'PlayerType' (C++)class with barbarian, mage, etc inherited from it. You could then store a base pointer in the player information (strut?) and set it dependant on what kind of character the player chooses.
If your going to need any kind of permanent storage of the users character (saving the game, MMO, etc) then you'll want to have a player class with support for all classes that is parsed differently depending on an Enumerated value or alike. That way you can simply write the players information to a file and load it later without needing to worry about where things are stored or pointers.

anything could help im going to try until i achieve !
That's a great attitude to have! your sure to succeed, however the invaluable aid the oracle of us many internet people can only be summoned with detailed information.
Simply saying 'I'm making something what do I do' won't really cut it, we need to know what your doing, how your doing it, with what, when and what you have so far. Then we can comment on the many paths that lie before you.
code tags, there to give us line numbers and colours! [code] is bad, [code=C++] is good!
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC