I've had a go at changing the character arrays and name algorithm a bit to lean more towards hero/female/insect-esque names.
First off, in order to generate better name ends, I figured to add two more tables, both only used for the end of a name. One where otherwise consonants would be placed, and one where otherwise vowels need to be placed. Using these tables in the code is, of course, trivial:
Code:
if(i == name_len - 1) {
if(i & 1) part = name_end_consonants[randN % (sizeof(name_end_consonants)/sizeof(name_end_consonants[0]))];
else part = name_end_vowels[randN % (sizeof(name_end_vowels)/sizeof(name_end_vowels[0]))];
} else if (i & 1) {
part = name_consonants[randN % (sizeof(name_consonants)/sizeof(name_consonants[0]))];
} else {
part = name_vowels[randN % (sizeof(name_vowels)/sizeof(name_vowels[0]))];
}
These are the tables I came up with:
Creatures
Code:
const char *name_starts[] = {
"B", "C", "D", "F",
"G", "H", "J", "K",
"L", "M", "N", "P",
"R", "S", "T", "V",
"Y", "Z", "Ch",
"Sh", "Al", "Th",
};
const char *name_vowels[] = {
"a", "e", "i", "o",
"u", "ee", "oo",
"oa", "ai", "ea",
};
const char *name_consonants[] = {
"b", "c", "d", "f",
"g", "h", "j", "k",
"l", "m", "n", "p",
"r", "s", "t", "v",
"y", "z", "ch", "sh"
};
const char *name_end_consonants[] = {
"b", "c", "d", "f",
"g", "h", "j", "k",
"l", "m", "n", "p",
"r", "s", "t", "v",
"y", "z", "ch", "sh"
};
const char *name_end_vowels[] = {
"a", "e", "i", "o",
"u", "ee", "oo",
"oa", "ai", "ea",
};
Unchanged from the current KeeperFX source. The end tables are also identical to the regular consonant/vowel tables.
Heroes
Code:
const char *name_starts[] = {
"B", "C", "D", "F",
"K", "L", "M", "N",
"P", "R", "S", "T",
"V", "X", "Z", "Ch",
"Al", "Th",
};
const char *name_vowels[] = {
"a", "e", "i", "o",
"u", "ia", "ea"
};
const char *name_consonants[] = {
"b", "c", "d", "f",
"k", "l", "m", "n",
"p", "r", "s", "t",
"v", "z"
};
const char *name_end_consonants[] = {
"s", "n", "c", "x", "ck"
};
const char *name_end_vowels[] = {
"us", "os", "as", "on"
};
I used more Latin/Greek-ish inspired names for the Heroes, which makes them sound a bit more classy than the creatures. I think it works well enough here.
Insects
Code:
const char *name_starts[] = {
"B", "C", "D", "F",
"G", "H", "J", "K",
"L", "M", "N", "P",
"R", "S", "T", "V",
"W", "Y", "Z", "Ch",
"Sh", "Al", "Th", "B"
};
const char *name_vowels[] = {
"a", "e", "i", "o",
"u", "o", "u", "e",
"y"
};
const char *name_consonants[] = {
"b", "c", "d", "f",
"g", "h", "j", "k",
"l", "m", "n", "p",
"r", "s", "t", "v",
"z", "ch", "ck", "s",
"zz", "zs", "sz", "z",
"b", "th",
};
const char *name_end_consonants[] = {
"z", "zz", "t", "s",
"z", "l", "ll", "m"
};
const char *name_end_vowels[] = {
"e", "er", "i", "uz", "on",
"os", "oz", "us"
};
This is a bit weird. "Buzzing" names is also a bit weirdly defined. It's somewhat similar to creatures, but with greater emphasis on s's and z's, and different suffixes. I didn't exclude a lot of possibilities for other letters, though, so sometimes names can be much like regular creature names. Still not too bad I think.
By the way, if you notice I have some duplicate letters in the table, it's just a simple attempt to steer randomness a bit more towards that direction.
Also, for the insects, you may want to reduce the maximum name length (to e.g. 4 or 5). Long insect names sound weird.
Females
Code:
const char *name_starts[] = {
"B", "C", "D", "F",
"G", "H", "J", "K",
"L", "M", "N", "P",
"R", "S", "V", "Y",
"Z", "Ch", "An",
"Sh", "Al", "Th",
};
const char *name_vowels[] = {
"a", "e", "i", "o", "a",
"u", "oa", "ia", "ea",
};
const char *name_consonants[] = {
"b", "c", "d", "f",
"g", "h", "k", "l",
"m", "n", "p", "r",
"s", "t", "v", "x",
"z", "ch", "sh", "th",
};
const char *name_end_consonants[] = {
"sa", "na", "s", "n", "x", "tha"
};
const char *name_end_vowels[] = {
"as", "a", "i", "is", "ia"
};
A bit in between the creature and hero names, a bit more pronounced on 'feminine' vowels like a and i, and appropriate suffixes. Still does not quite go too far from creature names I think.
I generated 1000 random names with each set of tables:
Creatures
Heroes
Insects (max length reduced to 4)
Females
If it's not different enough, I guess we could just go further with the same concept.