-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|647|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Text and GUI's


 
HoboBen
Created : 13 June 2010
Edited : 13 June 2010

Generate english place names



A set of rules for programatically generating English-sounding place names.





Method:

1: Choose a term from "river", "sea", "forest", "hill", "valley", "flat", "north", "south", "east", "west" or "prefixes".
2: If you picked a prefix, choose a term from "town", "castle" or "suffixes", otherwise choose a term from "prefixes"
3: If in step two you picked a suffix from "town" of three letters in length or less, optionally pick an additional suffix from "town" or "castle".
4: If in step two you picked a prefix from "prefixes", optionally pick an additional suffix from "town" or "castle".
5: Concatenate the terms
6: For each modifier, where modifier is "a:b", search for "a", if found, replace with "b".

 

Comments


Sunday, 13 June 2010, 16:12
Jayenkai
Hmmm.. I wonder what you'll be using this for

Cool!
Sunday, 13 June 2010, 18:21
HoboBen
Got a welsh version done. Most welsh names also include a name, e.g. Abertawe means the "river Tawe"... And you can also have fun repeatedly adding words, e.g. "Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch" is a real place.

I can't remember any welsh mutation rules, but I doubt many people would notice anyway.



(A couple left out because they can't actually be represented in extended ascii - the w with a roof and the y with a roof were left out!)

For my game, I still need to do the same for Norse, Egypt and Greek places.
Wednesday, 23 June 2010, 08:55
Erebel55
Interesting snippet, Hobo