Public Group

# My First Text RPG [ C++ ]

This topic is 4349 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I m starting my first Text RPG called Wraith. Its a lame name, but Its just temp. My question is, does my plans look ok? I dont have any code because im planning the game first, but this is all i have so far. Please tell me what i need to work on, what i need, what i dont need, and anything else. Thanx for any help. Wraith
Wraith : By Brandon Wall

Class Player

Member Functions -

Player             - Initializes the players basic skills and data members
DisplaySkills      - Displays all the Players skills ( magic, speed, strength, logic )
DisplayInventory   - Displays all the Players weapons ( knife, axe, )
GetAttack          - Gets the attack the player wants to use
Attack             - depends on the players choice of an attack
DisplayHealth      - Displays the players health level
DisplayArmor       - Displays the players armor level
UpgradeSkills      - if users skill points reach the level, player can pgrade certain skills

Data Members -

m_Magic        - Magic level
m_Armor        - armor level
m_Health       - players health
m_Speed        - speed of dodging attacks
m_Strength     - players attack level
m_Logic        - ways to figure out problems
m_Weapon       - players current weapon
m_Inventory    - all of players weapons

Class Enemy : Base class

Member Functions -

Enemy        - Contructor to initialize the enemies attributes
Attack       - loweres the players health/armor points
Die          - announces the death of an enemy
Taunt        - prints a threat to the player
GetHealth    - displays the remaining health points of the enemy

Data Members -

m_Attack
m_Health

Class Boss : Derived from Enemy

Member Functions -

Boss             - constructor to initialize data members
Attack           - loweres the players health/arnor points
Die              - announces the death of the boss
Taunt            - Sends the threat to the player
GetHealth        - prints the remaining health points of the boss
SpecialAttack    - A super power for the boss

Data Members -

m_Health
m_Attack
m_SpecialAttack
m_Name



##### Share on other sites
There is a LOT more work to be done in terms of planning. While this does appear to be the beginnings of a rpg, there are still things like fighting, items, movement, quests, etc, that need to be done.

##### Share on other sites
Quote:
 Original post by NUCLEAR RABBITHello,I m starting my first Text RPG called Wraith. Its a lame name, but Its just temp. My question is, does my plans look ok? I dont have any code because im planning the game first, but this is all i have so far. Please tell me what i need to work on, what i need, what i dont need, and anything else.Thanx for any help.Wraith*** Source Snippet Removed ***

Player and enemy might as well be derived from the same base class, as ideally they would be used much the same other than NPC actions would be driven by AI and the player by input.

Try to avoid having your classes print anything directly (unless that's their only purpose) such as in your DisplayHealth, DisplayArmor, etc methods. It's better to return a string or stream.

I'd suggest another object to represent skills (like taunt, and SpecialAttack) and then your player/enemies can just keep a list of them. Otherwise, you're going to have a lot of work to do whenever you want to add a new skill.

##### Share on other sites
All the following advice depends on how much C++ experience you actually have, but I'm guessing you've made it through the better part of a book or class on the subject (based on your design).

First off you're missing data types from your design. Some of the things youve listed are most likely numbers (ints/floats/whatever you think makes sense), others however can't be (reasonably) represented as a number. Like say m_Inventory. Will this be another class? If so you should think it out too.

As wild_pointer mentioned, it would probably be a good idea to have a base Skill class or something that all player/enemy classes could keep a list of. That brings up another point. How familiar are you with data structures such as vectors/lists/stacks/queues/maps ?

If you don't have much experience atleast take a look at list/vector (maybe on about.com they have alot of tutorials). Lists/vectors will do 95% of the data structure work in your game programming for a while to come.

One last comment, whats your next step? You can continue to design this as long as you continue to see blanks to fill in. Eventually you will probably run out of problems in your design, at which point I'd say its time to start coding. Don't get to frustrated when everything you designed starts to not work right in reality. That is completely normal, especially when your new to program design.

Good luck.

1. 1
2. 2
3. 3
frob
15
4. 4
5. 5

• 20
• 12
• 13
• 14
• 83
• ### Forum Statistics

• Total Topics
632144
• Total Posts
3004412

×