| Chapman, Jonathan | |
|
BattleQuest ? an Object Oriented Computer Role-playing Game Jonathan Chapman 12/2002 Supervisor: Susan Reiser
BattleQuest is a role-playing game where everything is randomly generated.? Role-playing is a genre of gaming where you put yourself in the position of a fictional character, often in a fantasy story.? In BattleQuest there is no story other than that of an explorer who must constantly fight to survive.? The character is generated using a MFC (Microsoft Foundation Class) based menu, which generates a text file.? Upon execution of the main executable, the character is introduced to a randomly generated environment.? The description of the area, the inhabitants, and the items both on the creatures and in the setting are all randomly decided.? The player has skills which he/she must use to survive.? This is achieved, again, with a random number generator balanced by modifiers of both the player?s ability and the player?s skill level.? There are seven different settings, each with separate description scripts, pictures, and music.? Most of the pictures are jpg files.? These are displayed using pre-made OpenGL classes.? The music consists of midi files (due to small file size for distribution) and is played using the Microsoft Sound System.? Text overlays are created using a separate OpenGL class, which also uses font files.? The game works like a complicated state machine in which the actions of the player drive the game.? Creatures react to a player?s entrance of an attack.? The game is effectively paused until the player?s next action.? Almost every command results in a reaction from the environment.? For example, attacking a creature will result in that creature and any others in the setting attacking the player.? If the player attempts to run each creature will have a chance to apprehend the character.? If the player hides the creatures will have a chance to detect the character.? All of the programs that make up the project are created using C++.? C++ allows the use of inheritance in classes.? In the game a player node is a child of the creature node (which means they share similar data structure and class functions).? Both the player and the creatures are linked to a particular room node.? Item nodes belong to setting, player, and creature nodes.? When a creature is killed any applicable items are linked to the setting node and the creature node is erased from the setting.? Likewise, if a player drops an item it also is linked to the setting node.? As a player leaves a room node the old node is connected to the newly created node.? A recursive algorithm checks to see if rooms are connected when a player would normally link to an already existing room node on the map.? The map is displayed on the top window.? There are six other windows present: Last Action (visually displaying the last game action), Situation (hostile or peaceful), Scene (randomly selected picture), Inventory (pertaining to the characters items), Character Status, and the main console (where commands are issued and results are displayed).? The console window also displays status information in the title bar.? All the windows and title bar change as the game is played and new information arises.? The map displays a current position in X and Y position.? Since rooms are not erased from computer memory until the program is closed, it is possible to run out of memory.? This also means that a player can always backtrack his movements back to the original room.? All rooms, creatures, and other objects are of course erased when the game is closed (using the quit command). |
|