How do I create a main menu for a text-based rpg written in C++?

This is a discussion on How do I create a main menu for a text-based rpg written in C++? within the C++ Programming forums, part of the General Programming Boards category; I have to build the framework for this project for a class. The first requirement is to develop a main ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    2

    How do I create a main menu for a text-based rpg written in C++?

    I have to build the framework for this project for a class. The first requirement is to develop a main menu for your game. This menu should display a title followed by three menu choices:
    1)StartNewGame, 2)LoadGame and 3)Quit. If the user selects to start a new game, the program should proceed as described in the next paragraph. If the user selects to load a game, a message should be printed on the screen letting the user know the feature is not yet implemented. If the user selects to quite a game the program should exit. Each of these options should be selectable by pressing the number that corresponds, i.e. 1, 2, or 3. How do I go about doing this?

    I have attached the project requirement sheet for those who can help. Any help would be great. Thanks.
    Attached Images Attached Images

  2. #2
    Not stupid, just stupider yaya's Avatar
    Join Date
    May 2007
    Location
    Earthland
    Posts
    204
    cout the list of options to the screen, then get the input by cin, then use a switch statement to check what the user chose.

  3. #3
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    We can help with finding code mistakes but you have to at least *try* to do the work. Show us what code you have and we can probably help...but we don't do homework.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  4. #4
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,673
    C Board is usually a bad place to ask for code.

    Check out some existing projects. Something like open source text based rpg - Google Search.
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  5. #5
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    C Board is usually a bad place to ask for code.
    C board is a place where you ask for help with your code which implies you have actually written some in the first place.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Text Based RPG & AI?
    By TylerMoyer in forum General AI Programming
    Replies: 4
    Last Post: 10-12-2007, 06:40 AM
  2. Disabling the main frame menu options
    By MPC_Engr in forum Windows Programming
    Replies: 2
    Last Post: 01-22-2003, 08:04 AM
  3. Text Based Game
    By drdroid in forum C++ Programming
    Replies: 2
    Last Post: 02-18-2002, 05:21 PM
  4. Going back to a main menu from anywhere
    By Gades in forum C Programming
    Replies: 5
    Last Post: 11-13-2001, 03:22 PM
  5. quick question about C Dos text menu pgm i was doing
    By Shadow in forum C Programming
    Replies: 2
    Last Post: 09-16-2001, 10:26 AM

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