Question Modes, Freebase Question Generator

Don't pick math dude

Don’t pick math dude

Made two buttons that go after the title screen to choose Trivia Mode or Math Mode; basically it decides whether to give the Freebase generated trivia questions or the math questions I’ve been putting together all this time.

SPACESHIP

Well gee I wonder what it is

‘Finished’ the question generator in that it’ll function with some oversight.  At first, the idea was to use the MediaWiki API to get a list of random topics, then map those to freebase, then use the freebase API to get related words and the summary text.  Today I decided it would be best to just manually compile a list of topics that are available on Freebase by name, and generate the questions from the hand made list of topics.  I figured this way, I’d avoid including things I didn’t want to include; the number of articles on Freebase is far far higher than the number of topics I need for this game.  I think I want a few hundred, and I’ll probably stop there.  I just finished implementation so right now there’s only 24:

questions.add(ft.buildQuestion(“Electron”));
questions.add(ft.buildQuestion(“Derivative”));
questions.add(ft.buildQuestion(“Sputnik”));
questions.add(ft.buildQuestion(“ISS”));
questions.add(ft.buildQuestion(“Buckminsterfullerene”));
questions.add(ft.buildQuestion(“Hadron”));
questions.add(ft.buildQuestion(“Mount Everest”));
questions.add(ft.buildQuestion(“Mount McKinley”));
questions.add(ft.buildQuestion(“Mongolia”));
questions.add(ft.buildQuestion(“Io”));
questions.add(ft.buildQuestion(“Ares”));
questions.add(ft.buildQuestion(“Archimedes”));
questions.add(ft.buildQuestion(“Galapagos Islands”));
questions.add(ft.buildQuestion(“Horseshoe Crab”));
questions.add(ft.buildQuestion(“London Heathrow Airport”));
questions.add(ft.buildQuestion(“Pegasus”));
questions.add(ft.buildQuestion(“Florence”));
questions.add(ft.buildQuestion(“Kremlin”));
questions.add(ft.buildQuestion(“Pyongyang”));
questions.add(ft.buildQuestion(“Eiffel Tower”));
questions.add(ft.buildQuestion(“Phobos”));
questions.add(ft.buildQuestion(“Christopher Columbus”));
questions.add(ft.buildQuestion(“Zinc”));
questions.add(ft.buildQuestion(“Zirconium”));
SPAECESHIP

SPAECESHIP

The source for the generator is in Java-
but it’s very specific to my needs.  The question object contains question text, 4 answers (one of which is correct) in an array, and the index in the array that contains the correct answer as an int.
It creates a C# class file for use with the game.
Screenshot_2014-07-01-00-52-07
Pretty glad I got something usable out of all that digging into the MediaWiki and Freebase APIs.  I still need to finish unfortunately… Today was my planned release date but it’ll have to wait AT LEAST until I polish the cut-in art and complete the trivia topic list.  At least up to 200 topics.
Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s