RPG Character Generator

This is a discussion on RPG Character Generator within the C++ Programming forums, part of the General Programming Boards category; Ok I have always been interesting in helping out my friends with a character generator program. Collecting the information will ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    15

    Post RPG Character Generator

    Ok I have always been interesting in helping out my friends with a character generator program. Collecting the information will not be a problem as one of them can sit down with me and tell me point costs etc.

    My question and problem is how would I do the following?

    - How would one print out the character sheet with all the stat's, equipment, etc with a nice looking graphic character sheet?
    - What would be best to store skills and equipment (plus there cost) as you don't want to hard code this in case if the point cost changes or new skills come into the game.
    - Lastly how would you save a character? I don't want a silly answer of to a text file cause I know that but more information of like sequencially or random.

    Any other hints or ideas that you can think of if you have attempted this type of project would be appriciated!

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    u could make a class for the characters stuff
    here is an example:


    class player
    {
    private:

    char name[30];
    int life;
    // and other things u need..

    public:
    //maybe a constructor

    void showitems();
    //here u can show the items etc.
    };

    easy!

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    15

    quation here

    PODE u think that games like UT2003 or Unreal 2 are made on c++?

  4. #4
    Registered User The Junglist's Avatar
    Join Date
    Nov 2002
    Posts
    42

    Re: quation here

    Originally posted by DAIALOS
    PODE u think that games like UT2003 or Unreal 2 are made on c++?
    I ain't pode but anyway, i'm not sure 'bout Unreal sequels, but Quake 3 was written in "C".

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    160
    It was made in C instead of C++... that amaze me man!
    Well english isn't my first language, (it's instead a useless language called danish which only 5 milion people speak!!) so if you think my grammar SUCKS (it does by the way) than you're more then welcome to correct me.
    Hell I might even learn something

  6. #6
    Registered User
    Join Date
    Dec 2002
    Posts
    15
    I am not talking about making a computer game here...more of an application for the pen and paper type of game. Any other ideas?

  7. #7
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220

    Re: quation here

    Originally posted by DAIALOS
    PODE u think that games like UT2003 or Unreal 2 are made on c++?
    They were...

  8. #8
    Registered User
    Join Date
    Dec 2001
    Posts
    479

    PODE u think that games like UT2003 or Unreal 2 are made on c++?
    i dont know if they are written in c++ but i'm pretty sure that they
    are what u think java ???


    I am not talking about making a computer game here...more of an application for the pen and paper type of game. Any other ideas?
    lol then maybe u should ask your teacher about this

  9. #9
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640

    Re: quation here

    Originally posted by DAIALOS
    PODE u think that games like UT2003 or Unreal 2 are made on c++?
    [pretending that my name is pode]

    They could have been, theres no crucial advantage that
    prevents Unreal2003 or Unreal2 to be written in C.
    But just in HUGE games, OOP comes in handy.
    (therefor Doom3 is being written in C++).

    [/pretending that my name is pode]

  10. #10
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by EnforcerGIS
    I am not talking about making a computer game here...more of an application for the pen and paper type of game. Any other ideas?
    There are always other ideas. Although I really like OOP and think classes are great, I'm not sure that classes is the way you want to go with this. From what you've said, it sounds like you want to make this program so that you can use it practically for your friends. If that is the case, I'd suggest using structs. Something like:
    Code:
    struct player
    {
    	int health, special, strength, level, etc;
    	string name;
    	// and if any of the following matters . . .
    	char gender;
    	int height, weight, age, etc;
    };
    The disadvantages to using structs IMO are the following: there's no constructors, and you can't have any functions that express relations between stats. For example, if the stats of a player are a function of his level, you should construct a class to do that. Otherwise, use structs because they're easier.

    Really, if you're only going to do this one player at a time and if all you're doing is generating the stats, you could get away with forsaking structs or classes all together and just bang out a solution that works. I have a friend in my computer programming class that is finishing up a character generator for Dungeons and Dragons. Because that class hasn't covered structs or classes yet, he was unable to use them. His program still works, it's just not the 'best' or most elegant solution to the problem. The most important thing about coding out any program is first that it works. That's one thing my teacher keeps telling me as I and some others in my class prepare for a programming competition.

    If you're just doing this for personal use, no one's going to see your code, so you can be as easy on yourself as you want. Choose the paradigm that's right for you.

    Oh, and about graphics, although they look impressive for folks that know nothing about programming, they're probably not worth it for this program. A console program will suffice for this.

    Well, this post sure was long enough. I hope I helped after all I said. Best of luck to ya!
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  11. #11
    Registered User
    Join Date
    Dec 2002
    Posts
    15
    Originally posted by pode
    lol then maybe u should ask your teacher about this [/B]
    Who says that this is a school project or that I am even in school still? I think that was a bad assumption Pode.

  12. #12
    Registered User
    Join Date
    Dec 2002
    Posts
    15
    Originally posted by joshdick
    There are always other ideas. Although I really like OOP and think classes are great, I'm not sure that classes is the way you want to go with this. From what you've said, it sounds like you want to make this program so that you can use it practically for your friends. If that is the case, I'd suggest using structs. Something like:
    Code:
    struct player
    {
    	int health, special, strength, level, etc;
    	string name;
    	// and if any of the following matters . . .
    	char gender;
    	int height, weight, age, etc;
    };
    The disadvantages to using structs IMO are the following: there's no constructors, and you can't have any functions that express relations between stats. For example, if the stats of a player are a function of his level, you should construct a class to do that. Otherwise, use structs because they're easier.

    Really, if you're only going to do this one player at a time and if all you're doing is generating the stats, you could get away with forsaking structs or classes all together and just bang out a solution that works. I have a friend in my computer programming class that is finishing up a character generator for Dungeons and Dragons. Because that class hasn't covered structs or classes yet, he was unable to use them. His program still works, it's just not the 'best' or most elegant solution to the problem. The most important thing about coding out any program is first that it works. That's one thing my teacher keeps telling me as I and some others in my class prepare for a programming competition.

    If you're just doing this for personal use, no one's going to see your code, so you can be as easy on yourself as you want. Choose the paradigm that's right for you.

    Oh, and about graphics, although they look impressive for folks that know nothing about programming, they're probably not worth it for this program. A console program will suffice for this.

    Well, this post sure was long enough. I hope I helped after all I said. Best of luck to ya!
    Thanks Joshdick for the input....now I just have to wonder how I am going to print out the character sheet (yes this program is similar to your friends D&D character maker).

  13. #13
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Originally posted by EnforcerGIS
    Thanks Joshdick for the input....now I just have to wonder how I am going to print out the character sheet (yes this program is similar to your friends D&D character maker).
    Your welcome. Golly, it's nice to feel appreciated *warm, fuzzy feeling*.

    I'd suggest what my friend did which is just cout a list of the stats in a console program. But, hey, if you wanna do gfx, knock yourself out, man.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  14. #14
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330

    ~

    "The disadvantages to using structs IMO are the following: there's no constructors, and you can't have any functions that express relations between stats. For example, if the stats of a player are a function of his level, you should construct a class to do that. Otherwise, use structs because they're easier."

    There are constructors
    You can have functions
    Structs are no easier than classes

    ... we are talking C++ here, right?

  15. #15
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146

    Re: ~

    Originally posted by rmullen3
    There are constructors
    You can have functions
    Structs are no easier than classes

    ... we are talking C++ here, right?
    Um, I must be missing something. How can structs have constructors and functions? Could you please show me an example of such a thing?
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 10-07-2008, 07:19 PM
  2. about wide character and multiple byte character
    By George2 in forum C Programming
    Replies: 3
    Last Post: 05-22-2006, 09:11 PM
  3. pipe
    By smart girl in forum C Programming
    Replies: 4
    Last Post: 04-30-2006, 10:17 AM
  4. LoadFromFile() from a txt
    By Snoopy104 in forum C++ Programming
    Replies: 6
    Last Post: 03-14-2006, 10:05 AM
  5. Any help would be appreciated.....
    By SprinterSteve in forum C Programming
    Replies: 6
    Last Post: 05-01-2003, 10:25 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21