Skip to content

jackmcdade/synthwave-generator

Repository files navigation

Synthwave Name Generator

How it works

All the magic happens in app/NameGenerator.php. Additional nouns can be added to the $nouns array. You can add some modifiers to a noun to ensure it's first, last, doesn't end up next to existing names (like "Arcade High", for example), has a specific separator, and so on.

Explanation of all the possible modifiers on a noun:

$nouns = [
    [
        'word' => 'Streets of', // The noun
        'prefix' => true, // True to ensure it's the first word in the name
        'suffix' => false, // True to ensure it's the last word in the name
        'not' => 'Rage', // Add other nouns you want to ensure is *not* next to. Can be an array or string.
        'plural' => false, // False to prevent the word from being pluralized
        'seperator' => ' ', // Force a specific seperator between words
    ],
]

The name is generated by a series of dice rolls:

  1. There is always at least one noun, but if the roll succeeds there may be a second word.
  2. If there are two words, they may be mashed together as a portmanteau or separated with a space or string provided by the first noun.
  3. The whole word might be pluralized.
  4. And finally there may be a year slapped on the end.