| | |
Some Easy help needed please.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2008
Posts: 3
Reputation:
Solved Threads: 0
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 !
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 !
•
•
•
•
so here the thing im practicing c++ just started all this is in cmdand 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?
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 !
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!
![]() |
Similar Threads
- Delphi Timer with Pertol Pump (easy) Help needed (Pascal and Delphi)
- svchost.exe - Windows Update - 100% CPU Utilization fix (EASY) (Windows NT / 2000 / XP)
- How to install slackware (Not as easy as MEPIS) (Getting Started and Choosing a Distro)
- Need very important advice from professionals (Computer Science)
- how to make an evaluation version? (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: convert string to int array
- Next Thread: Constructor Problem
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings struct temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





