Skip to content

Instantly share code, notes, and snippets.

@tullyhansen

tullyhansen/@MelbGameCo

Last active Dec 24, 2015
Embed
What would you like to do?
The code behind @MelbGameCo. Name parts from actual Melbourne developers/studios at http://www.tsumea.com/developers and http://www.gamedevmap.com; suburbs from https://zen10.com.au/melbourne-suburb-list/; output Twitterfied using http://twittbot.net.
on chooseItem(listToChooseFrom)
set littleRandomNumber to random number from 1 to (count items in listToChooseFrom)
return item littleRandomNumber of listToChooseFrom
end chooseItem
on videoGameNameMe()
-- 16 chars: attribution (RT @MelbGameCo: )
-- 43 chars: gamename (max: Walk Through The Unbelievable Entertainment)
-- 81 chars: extra matter
set columnX to ["3 ", "Angry ", "Barrel of ", "Bomba", "Braw", "Comicorp ", "Current ", "Fire", "Fraktal", "Gamers ", "Klick", "League of ", "Ludo ", "Lycette ", "Mesmer ", "Milli", "Ninth ", "Pixel ", "Play", "Play", "Red ", "Robot ", "Space ", "Straight ", "Synthetic ", "Touch My ", "True ", "Two ", "Walk Through The ", "Wicked ", "Wizzle ", "Big ", "Blup Blup ", "Electric ", "Iron", "Kingdom ", "Screw", "Space ", "Dancing ", "Drop ", "Cup", "Fool", "Grapple ", "Pixel", "Sector", "Third ", "Tin ", "Three ", "Twisted ", "Play", "Good ", "Many ", "Mind ", "Shadow ", "The ", "League of ", "Fire"]
set columnXSpecialCases to ["Bomba", "Braw", "Fire", "Fraktal", "Klick", "Milli", "Play", "Play", "Iron", "Screw", "Cup", "Fool", "Pixel", "Sector", "Play", "Fire"]
set littleOfColumnX to chooseItem(columnX)
set matchOnX to false
if littleOfColumnX is in columnXSpecialCases then
set matchOnX to true
end if
set columnY to ["Sprockets", "Pumpkin", "Donkeys", "jam", "some", "Worlds", "Circus", "mint", "void", "Heart", "Tock", "Geeks", "Digital", "Bros", "Mobile", "pede", "Ninja", "Elephant", "corp", "Side", "Tribe", "Circus", "Gum", "Right", "Nest", "Pixel", "Axis", "Bulls", "Clock", "Witch", "Wazzle", "Dime", "Endgame", "Fiasco", "Ignition", "Oceanic", "Silhouette", "TOME", "Impromptu", "Pub", "Raptus", "Torus", "Trickstar", "Unbelievable", "Anomalous", "Creature", "Infinite", "Jumbuck", "Loveshack", "Nocturnal", "Ahasai", "Camshaft", "Ant", "Game", "Mammoth", "Monkey", "Fruit", "fly", "Dust", "Dinosaur", "Spider", "co", "hardy", "Gun", "pickle", "3", "Wave", "Man", "Phase", "Shield", "Bit", "Game", "Monkeys", "Splat", "Field", "Voxel", "Monkeys", "monkeys"]
set columnYSpecialCases to ["jam", "some", "mint", "void", "pede", "corp", "fly", "co", "hardy", "pickle", "monkeys"]
set columnYSpecialCasesCapitalised to ["Jam", "Some", "Mint", "Void", "Pede", "Corp", "Fly", "Co", "Hardy", "Pickle", "Monkeys"]
set littleOfColumnY to "" & chooseItem(columnY)
-- display dialog littleOfColumnY
set matchOnY to false
if littleOfColumnY is in columnYSpecialCases then
set matchOnY to true
if matchOnX is false then
repeat with i from 1 to (count items in columnYSpecialCases)
if item i of columnYSpecialCasesCapitalised = littleOfColumnY then
set littleOfColumnY to item i of columnYSpecialCasesCapitalised
end if
end repeat
end if
end if
set columnZ to [" Studios", " Studios", " Studios", " Studios", " Studios", " Studios", " Studios", " Games", " Games", " Games", " Games", " Games", " Games", " Interactive", " Interactive", " Interactive", " Entertainment", " Entertainment", " Entertainment", " Designs", " Software", " Studios", " Studio", " Studios", " Studios", " Studios", " Studios", " Studios", " Games", " Games", " Games", " Games", " Games", " Games", " Games", " Games", " Games", " Interactive", " Interactive", " Entertainment", " Productions", " Development", " Design", " Team", " Agents"]
set littleOfColumnZ to chooseItem(columnZ)
set companyStructure to random number from 1 to 78 -- This reflects structural distribution in original sampled list
if companyStructure ≥ 1 and companyStructure ≤ 33 then -- X/Y
set mySweetVariable to littleOfColumnX & littleOfColumnY
else
if companyStructure ≥ 34 and companyStructure ≤ 54 then -- Y/Z
set mySweetVariable to littleOfColumnY & littleOfColumnZ
else
if companyStructure ≥ 55 and companyStructure ≤ 78 then -- X/Y/Z
set mySweetVariable to littleOfColumnX & littleOfColumnY & littleOfColumnZ
end if
end if
end if
return mySweetVariable
end videoGameNameMe
on phraseMe()
set howAbout to ["Why not go with", "How about", "What about", "Can we go with", "Do you like"] -- max 15 chars
set chosenHow to chooseItem(howAbout) & " "
set selfAssuring to ["It’s a great name for", "Not a bad name for", "The perfect name for", "Just right for", "It totally suits", "I reckon that suits", "That works for", "A great name for"] -- max 21 chars
set chosenAssurance to "? " & chooseItem(selfAssuring)
set typesOfTeam to ["our three-person team", "our four-person team", "our five-person team", "a bunch of hackers", "two developers", "two Unity developers", "a couple of coders", "a couple of OUYA devs", "a pair of Flash devs", "a bunch of OUYA devs", "a trio of iOS devs", "a pair of Android devs", "a pair of iOS devs", "a couple of iOS devs"] -- max 22 chars
set chosenTeam to " " & chooseItem(typesOfTeam)
set synonymsForFrom to ["from", "from", "from", "from", "from", "from", "outta"] -- max 5 chars
set chosenFrom to " " & chooseItem(synonymsForFrom)
set suburbList to ["Kew", "Upwey", "Albion", "Altona", "Ardeer", "Balwyn", "Coburg", "Eltham", "Elwood", "Epping", "Seddon", "Toorak", "Berwick", "Burnley", "Burwood", "Carlton", "Clayton", "Croydon", "Fitzroy", "Ivanhoe", "Kooyong", "Malvern", "Newport", "Niddrie", "Prahran", "Preston", "Rosanna", "Sunbury", "Tarneit", "Upfield", "Windsor", "Armadale", "Belgrave", "Bonbeach", "Box Hill", "Bundoora", "Essendon", "Hawthorn", "Laverton", "Lilydale", "Oakleigh", "Pakenham", "Richmond", "Ringwood", "St Kilda", "Sunshine", "Sydenham", "Watsonia", "Werribee", "Balaclava", "Braybrook", "Brunswick", "Caulfield", "Chadstone", "Dandenong", "Deer Park", "Docklands", "Doncaster", "Eaglemont", "Fairfield", "Footscray", "Frankston", "Glen Iris", "Moorabbin", "Northcote", "Parkville", "Reservoir", "Ripponlea", "Southbank", "Spotswood", "Thornbury", "Westgarth", "Abbotsford", "Ascot Vale", "Camberwell", "Cranbourne", "Flemington", "Heidelberg", "Kensington", "Mordialloc", "Mornington", "Noble Park", "Nunawading", "Warrandyte", "Wonga Park", "Yarraville", "Albert Park", "Collingwood", "Craigieburn", "Elsternwick", "Ferny Creek", "Glen Huntly", "Hurstbridge", "Keilor East", "Maribyrnong", "Middle Park", "Mont Albert", "Mooroolbark", "Pascoe Vale", "Sandringham", "South Yarra", "Templestowe", "Tullamarine"] -- max 11 chars
set chosenSuburb to " " & chooseItem(suburbList)
set puncList to [".", ".", ".", "!"]
set chosenPunc to chooseItem(puncList)
set mySweetPhrase to chosenHow & videoGameNameMe() & chosenAssurance & chosenTeam & chosenFrom & chosenSuburb & chosenPunc
return mySweetPhrase
end phraseMe
display dialog phraseMe()
set the clipboard to phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe() & return & phraseMe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment