New Feature: Complex Naming Algorithm

I’ve been doing quite a bit of research lately, spending much of my time focusing on procedural content, and what in a game can actually be generated entirely by code with as little manual input as possible. One of the things that quite a few games (though mostly featured in online widgets,)  is the procedural generation of names, mostly that of characters and towns.

I can remember several years back I programmed a random fantasy name generator by creating a database of syllables, then randomly picking 1 to 3 syllables for a name. This technique worked at the time, but more often then not, i would end up with the same names over and over again. Something like that would not cut it for this project, which has the potential to carry well over a 500 non-player characters. So clearly having a set of predetermined syllables to be selected from has ahuge drawback, and i needed something much more reliable, something that can give me many many more results.

It was just a matter of 3 days ago while browsing differetn methods of procedural name generation that I found something called a Letter Adjacency Grid. This is an array generated from a sample selection of words, or names of people or places or literally anything. A program will scan these samples and will keep track of what couples of letters appear next to eachother throughout, and will save an array of 26*26 based on what was learned. This array is then called back to when generating a new word. First a random first letter is chosen, then the a potential second letter is chosen, then checked against the list to determine how often this letter comes after the first in our samples, and if the chances are high enough, this letter is chosen to be next in the name. This process repeats itself over and over until the name has reached the length that you have specified, and you have your new random name, created based on a sample list.

This technique can be used for many things, it can be used to creat names that sound unique to each race, simply by having a sample selection of names that fit that race, it will generate a nearly endless list of names that fit. If you have town names as your samples, then you will generate a name that is suitable for a town, and so on and so forth.

Using what I was able to gather from the description of the technique, in 3 days time I had programmed my very own, albeit with some added rules to keep words pronouncable, like keeping the number of vowles or consonants in a row less than 3, so you dont get words like Fagrlxbik, or Frooaair popping up, which they will if you dont cater the code to your needs.

Sufficed to say, I am very much satisfied with what I’ve been able to learn, and write from this. The potential for different names is far higher than what I’ve done in the past, and thats exactly what I had been looking for.

Advertisements

About i4000

Video game designer, video game artist, story writer, poet, and traditional artist.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s