Thread: rpg ?'s

  1. #16
    email for MystWind avatar MystWind's Avatar
    Join Date
    Feb 2005
    Location
    Holland , The Hague
    Posts
    88
    MUD stands for Multi-User Display, but I think everyone pretty much uses as a name for a console RPG or role playing game. - cerin
    PLay MystWind beta , within two years

  2. #17
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176
    Umm...
    Just call rand() every time you need a random number...
    Also, a common problem is not seeding the generator.
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

  3. #18
    Linux Forever
    Join Date
    Oct 2002
    Posts
    373
    Heres what I do:

    Code:
    while(1)
    {
      srand(time(NULL));
      var = rand() % LIMIT;
      cout << var;
    }
    You can have a random character by doing this:

    Code:
    char string[5] = "abcde";
    
    cout << string[rand() % 5];
    Just make an array of string sthat the shopkeeper would say and call msg[rand() % NUMMESSAGES];

    That should make it a bit easier for you. Hope it helps.

    -Blizz
    This war, like the next war, is a war to end war.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem
    By ExDHaos in forum C++ Programming
    Replies: 12
    Last Post: 05-22-2009, 04:50 AM
  2. (dev) C++ Ascii Rpg
    By kevinawad in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 08-10-2008, 11:10 AM
  3. Need Help With an RPG Style Game
    By JayDog in forum Game Programming
    Replies: 6
    Last Post: 03-30-2003, 08:43 PM
  4. Char Variable Probelm
    By Krak in forum C++ Programming
    Replies: 1
    Last Post: 01-26-2003, 12:34 PM
  5. Try out my newest RPG game called DOOM LORD
    By Leeman_s in forum Game Programming
    Replies: 16
    Last Post: 09-13-2002, 01:31 PM