Thank you for visiting Blazing Games

Trivial Concepts

Some people seem to think that creating a trivia game is a trivial process. They are actually not that far off. From a programming perspective, a trivia game is a very simple database manipulation program. The programming, however, is not the only part to a trivia game. Coming up with the questions is the hard part. This is not the only game where developing the content for the game is harder than creating the game engine but is probably one of the more extreme cases.

The easiest way of thinking about a trivia game is that it is a database of questions and answers. Each question is a record that contains the question, the correct answer, a number of incorrect answers, and an explanation as to why the answer is correct. This data can be kept in a database, but that would be overkill for my needs. All that is needed is an array of objects that hold the question information.

To make the game a bit harder, the order of the questions and the order of the potential answers within the questions are randomized. If this was not done, then players could simply memorize the numbers instead of learning the answers.

While it is possible to select the questions by random, the problem with this approach is that it is possible for questions to be repeated. My solution is to shuffle the questions and the answers within that question. While the shuffling is done at the start of each game so some questions will be repeated from game session to game session, none of the questions within the game will be duplicated. I could have gone a little bit further with this approach and instead only re-shuffled after all the questions have been shown. The reason I did not do this was simply that I had not though to do so.

Previous page
Chapter 40 Page 4

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2011 Blazing Games Inc. All Rights Reserved