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

  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.

  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
    2,158
    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.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    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, 09:04 AM
  3. Text Based Game
    By drdroid in forum C++ Programming
    Replies: 2
    Last Post: 02-18-2002, 06:21 PM
  4. Going back to a main menu from anywhere
    By Gades in forum C Programming
    Replies: 5
    Last Post: 11-13-2001, 04: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