Exilian

Game Design and Project Resources: The Workshops Quarter => Computer Game Development - The Indie Alley => Non-game Programs - The Tinkers' Workshop => Topic started by: Flamekebab on November 30, 2015, 08:15:05 PM

Title: Mekboy Gibberish Generator
Post by: Flamekebab on November 30, 2015, 08:15:05 PM

Linky (http://gorkamorka.co.uk/mekboy-gibberish-generator/)
Ork Meks, much like many human mechanics, are not known for telling the absolute truth. Did they just make up that part to put something extra on the bill? I doubt even other mekboys are sure.


The wordy bits are from me, Craig Dolan, Dawn Patrick-Brown, and a few others from the Gorkamorka community.

The code for this isn't particularly difficult but it does several things I've not done before. It pulls files from Google Sheets where there's this document (https://docs.google.com/spreadsheets/d/1h7_H_e5zrXTQQTXR9dqPb_a7tdH7bsKp7hPs06WGdlU/). Three separate TSV files come from there although as they're each a single column they're literally a text file with an entry on each line and nothing more.


From there some PHP converts them to javascript arrays (and JSON) and the JavaScript works with them from there (brought in via PHP includes).


The general idea was to pull in the data as JSON because that's what one is apparently supposed to do. I couldn't find anything that didn't massively overcomplicate things though so I didn't bother. That said there is JSON for each of the three components should anyone want to have a play with them:
The script should refresh the cache up to once an hour and I think Google Sheets is on a ten minute rotation so additions to the sheet won't show up in the code immediately but eventually will. Dat'z da plan, anyway.

Title: Re: Mekboy Gibberish Generator
Post by: Jubal on November 30, 2015, 11:59:11 PM
Nice work! :)