Diary SiteMap RecentChanges About Contact 2009-09 Calendar

Search:

Matching Pages:

2009-09-11 Elite Names

I’m thinking of a system name generator for my upcoming Traveller UWP generator.

I was trying to write code in Perl, based on code in Python [1], based on code in C [2], reverse engineered from assembly code written for the BBC – the Elite random name generator. The fool that I was – I didn’t realize that just a a few posts later [3] somebody had done just that. X(

Then I started wondering: How the hell did this work? How much of the magic was just a pseudo random number generator? Clearly the algorithm was picking pairs of characters from the digraph string. There was an element controlling the length of the name, and that’s it? I tried it, but the names were less than stellar. Then I realized that the digraph string probably listed pairs that went together well. I should not be picking starting characters at random, I should be picking pairs at random. The result is this:

my $digraphs = "..lexegezacebisousesarmaindire.aeratenberalavetiedorquanteisrion";
my $max = length($digraphs);

sub name {
  my $length = 5 + rand(5); # 4-8
  my $name = '';
  while (length($name) < $length) {
    $name .= substr($digraphs, 2*int(rand($max/2)), 2);
  }
  $name =~ s/\.//g;
  return $name;
}

for my $n (0..100) {
  printf "%3d. %s\n", $n, name();
}

Random names:

  1. ertexebeis
  2. cetiisar
  3. marain
  4. atsocezaat
  5. biraza
  6. tezaordi
  7. beenes
  8. orxeesle
  9. quxeisis
 10. errabiat
 11. riquatis
 12. inisered
 13. diraanated
 14. orquisbiqu
 15. arvevein
 16. lebereza
 17. gemazaisen
 18. inzadius
 19. isbixebiti
 20. vemama

Sounds good to me! vee

And by changing the digraph, you can get different sounds, too.

my $digraphs = "fafemalunabararerixevivoine.n.q.pazizozutatetitotu..";

Results in this list:

  1. zuravo
  2. zobarati
  3. zireqti
  4. efare
  5. votuqbain
  6. vomafezo
  7. fantaetu
  8. xeinra
  9. ferati
 10. ribabata

I like it! ok

More variation in name length?

  my $length = 4 + rand(7); # 4-8

Tags:

Read Comments (4)

Show Google +1