jwvhewitt / gearhead-1

GearHead: Arena, the first game in this roguelike mecha RPG series.
Other
88 stars 18 forks source link

Don't randomly-generate characters with similar names near each other #65

Open o11c opened 7 years ago

o11c commented 7 years ago

Am I looking for/at Ubulor or Ubuly? And which of the 6 names that start with R on this map is that character?

Note, the set of collisions should also consider any characters with fixed names.

Thundercraft commented 7 years ago

Wouldn't this be difficult to code? I suppose it would be straightforward enough to have it look at the first letter of every name on the map before choosing the name for a new random NPC, rejecting any that begin with a letter that has been used 5 or more times already. But beyond looking at the first letter of names, I think things could get complicated pretty fast.

Do you suggest that the game look 2 characters deep, rejected a new name if the first 2 characters are already used in names already on the map, say, 3 times? And should it look 3 characters deep, rejecting any if the first 3 characters are already used in any names already on the map? 4 characters deep? Where does it stop?

Does GearHead pull from a list of names? Or, does it combine prefixes and suffixes to make names? If it pulls from a list, then wouldn't it be easier to exclude names from the list that are too similar, like Ubulor and Ubuly?