Text Generator (Security Management Simulator - Post 1)
I’m making a game where you play as a security guard monitoring employees in a high rise, trying to sus out and catch corporate spies. This game takes place in the 80s, so I’m planning on taking visual cues from pc gui/cui from the era. But the visuals are for later. I’m currently working on generating the buildings. I’ve already made a system that makes a crude building (read: box) and fills a 3d array with tile information for each square that makes up the building.
Today I worked on a text generator script that pulls words (keys) from a selection of dictionaries like “Surnames“, “Cardinal Directions” “Street Words”, and uses it to generate addresses for my procedurally generated buildings.
Result examples:
Ryan Building
259 North Harkness Road
Rosenwald Tower
974 Stillman Place
Morgan Center
710 West James Avenue
Guggenheim Center I
650 Schiff Place
Frick Building
689 North Eastman Boulevard
I have odds coded in for certain address features (cardinal directions only appear 25% of the time), but this needs to be expanded.
TODO:
Control for excessively long address names. Currently an address like “895 East Guggenheim Highland Boulevard“ can appear in the right conditions, so I need a better logic system that isn’t just calculated in print().
Use the dictionary values to weight the chances of a word coming up. “Tower” should be far more likely to appear in a building name than plaza. I already used a rarity system in my first pass at the building generator, so I can probably repurpose that here.