Random Name Generator Algorithm


I spent the morning creating a random name generator which will be added to the ‘create character’ section of Caverns of Underkeep.

I’ll explain how it works in a minute. But for now, here is an example list of names:

  • Yivha
  • Ilhalo
  • Xagloh
  • Pojlo
  • Xifei
  • Coxfo
  • Cedtiz
  • Digja
  • Emrapo
  • Aygoh
  • Omgez

So not bad, sorta could be real-made-up fantasy character names maybe. This is how the algorithm works:

First of all, I did a little bit of research reading about syllables on wikipedia

I decided to create two different name types – Those that start with a vowel, and those that don’t. For the names that start with a vowel I use the form VCC-VCV

Where C = consonant and V = Vowel

For names that start with a consonant I use the form CVC-CVC

In each case I randomly determine if the name length is 5 or 6 characters long. If the length is 5 characters, then I just leave off the last letter in the string.

Thats it!

Obviously it’s very simple and I don’t do any weightings against uncommon letters like x or z or anything like that. But it gets the job done :)

If anyone is interested the java source code is avalible here

  1. #1 by Kristie on January 27, 2008 - 5:42 pm

    Where are the forums gone?

    Hey! Suber (Super Uber) awesome that my names on the front screen… but do you think you could possibly change it to…. “Kristie (of Doom) Addison”??????? :-D Hee hee That would be sooo awesome…. :-D

    And can you change Matt’s to “Matt (Daniels little brother) Radford”. ;-)

  2. #2 by Kristie on January 27, 2008 - 8:09 pm

    “Name Your Bundle of Joy – Find The Perfect Name for Your Baby with Josh’s Fantabulous Name generator of DOOM” ;-)

  3. #3 by admin on January 27, 2008 - 8:45 pm

    Haha, I can change your name no-problem,

    I removed the forums ’cause there were too many spambots! I think I’ll wait till I’ve got a few more games and some more traffic before putting forums back up.

    The funniest random name I’ve got so far is ‘sexyad’

  4. #4 by Stin on February 13, 2008 - 6:13 am

    Oh… I like Digja :)
    Also good online Company name generator

  5. #5 by J on May 13, 2008 - 4:54 pm

    Hi – I think the link to your java code is broken. Could you re-post it? I’d be interested in seeing it. Thanks!

  6. #6 by admin on May 13, 2008 - 5:00 pm

    Fixed the link :)

  7. #7 by Patrick on November 9, 2010 - 4:48 am

    found this article because I needed to do an assignment involving database population and needed a simple way to generate random names. Wanted to note that your java code prevents you from ever getting the letter ‘u’; to fix this, increase the domain of your random value by one.

(will not be published)