May 15, 2016

New Names

Spacedust’s name generator has been the same for a long time. I didn’t like some things about it and I finally got a chance to write a new one.

Issues with the old version:

Originally, I read a lot about how syllables were formed. I compiled a list of consonants and vowels and constructed names out of a few syllables. What I ended up with was a lot of names that had valid letter combinations but were a mouthful to pronounce. And since there are more weird combinations than simple ones it meant a lot of names were mostly weird.

I decided on a more simplistic route this time, mainly alternating between one letter vowels and one letter consonants. This produced simpler, more pronounceable names.

These names were a little too simple, so I added interesting letter combinations that could only appear at the beginning or end of a name. There is also a very rare chance for a double vowel or consonant to appear in the middle of a name. This increased variety without messing with the overall pronounceability.

I also added some new enhancements for more variety:

The second issue with the old version was too many long names… because there just are more long names than short names to choose from. To solve this, I artificially increased the chances of short names and lowered the chances of long names. This increases the chance of duplicate names, but there are enough possible names for this to not be an issue for me.

An added benefit to more balanced name lengths is I was able to increase the maximum length without making the problem even worse.

I also added a minimal bad word filter, though names like Ba-Ba-Fuck did make me laugh.

So, without further ado, here are some example names:

You can check out my ruby name generator code on github.