Final Project: FRUPAL

For your final project, you will team up into randomly assigned group of five students and use Scrum project management practices to produce a text-based adventure game of moderate complexity: The Kingdom of Frupal. The following document describes your client's vision for the game that your team will develop over the next five weeks. Read it carefully, and refer to it often during the design stage of the project. Feel free to ask Bart or Jeremy for clarifications.

Product Vision for The Kingdom of Frupal

Shamelessly lifted from Warren's CS300 class

The Kingdom of Frupal consists of a perfectly square 128x128 grovnick island. A grovnick is a unit of measure used in Frupal. Roughly, a grovnick is the amount of space occupied by a person. If you take any old grovnick, a person is either in that grovnick or they aren’t, and a person can never be in more than one grovnick at a time.

The hero of this story – that’s you – can move one grovnick at a time in either the North, East, South or West direction. At the beginning of the story, the hero has 100 units of energy and a bank account containing 1,000 whiffles (the whiffle is the national currency of Frupal). Each one grovnick movement consumes one unit of energy (though grovniks containing a swamp consume two units). If the hero’s energy ever reaches zero or less, the hero dies and the game is over. The goal of the game is to find the royal diamonds which increases the hero’s bank account to one zillion zillion whiffles. And ends the game.

Now it turns out that there are a number of foods scattered randomly throughout the island (but each food is located in exactly one grovnick). If the hero happens to land on a grovnick that contains food, they may consume it and gain additional energy. Different foods cost different amounts of whiffles to pick up, and restore different amounts of energy. A Baked Ham may cost 5 whiffles and restore 20 energy, while a Tin of Caviar may cost 50 whiffles and restore 5 energy.

But a grovnick can contain lots other things besides food. A grovnick can contain various sorts of natural obstacles such as trees and boulders. Since a hero and an obstacle cannot simultaneously occupy the same grovnick, if our hero lands in a grovnick that contains an obstacle, the hero must remove it. Different obstacles require different amounts of energy to remove. For instance, it may require 10 units of energy to cut down an oak tree or 20 units of energy to break up a boulder. If a given obstacle requires x units of energy to remove and the hero possesses less than x units of energy, the hero dies and the game is over. If the hero possess at least x units of energy, the obstacle is removed (though the hero will expend x units of energy in the effort). But a grovnick can also contain tools. If the hero lands in a grovnick that contains a tool, the hero may purchase it (the price is in whiffles) and use it to later reduce the energy required to remove a related obstacle. For instance, if the tool is a Hi-Tech Tree-cuttin’ Axe with a rating of 2X, it will reduce the amount of energy necessary to remove a tree from x units to x/2 units. A tool with a rating of 3X, such as a Bargain Basement Chain Saw will reduce the amount of energy needed to remove a tree from x units to x/3 units. Each tool can only be used once, and if the hero has possession of many tools, they need to select which one to use when removing a given obstacle. Most tools only work on a single class of obstacle – for instance, an Axe works on a tree, but a Hammer can be used to help remove a boulder.

Ordinarily, the hero can only see one grovnick in each direction (N, W, S, E, NW, NE,SW,SE), so while they may know what occupies the grovnick immediately next to them, they have no clue what is in the grovnick three or four grovnicks over, unless they have already been to that grovnick. However, the hero may happen upon binoculars in a grovnick and purchase them. Possessing a pair of binoculars allows the hero to “see” two grovnick in each direction from that point on.

A number of grovnicks around Frupal, contain treasure chests containing various amounts of gold and jewels. If the hero lands in a grovnick that contains a treasure chest, the hero gets all the treasure, increasing their bank account, which is reported in whiffles.

Some grovnicks are generally impassable since they are contained within a river or lake (our hero doesn’t swim) or are part of a wall. If the hero tries to enter an impassable grovnick they consume a unit of energy, but remain where they are. Though expensive, if the hero encounters a grovnick containing a ship, it may be purchased and used to pass through a water-based grovnick with no expenditure of energy (indeed, the hero may sail their ship up a river without expending any energy) to get from Point A to Point B.

Some grovnicks contain clues about where the royal diamonds are located. The clues may be true or may not. If they are true, everything in the clue is true, but if they are false, everything in the clue is false. A clue has the general format of “You are w grovnicks from the western border, there is a swamp x grovniks to the north, and the royal diamonds are located y grovnicks to the east and z grovnicks to the South.”

Players should be able to load maps into the game from files. This allows for repeatable gameplay so the software can be tested. It also allows users to develop custom maps that may contain sophisticated layouts consisting of rivers, lakes, houses, shops, obstacles and items.

UI details

Here's a rough mockup of what the game should look like:

Frupal mockup

The Kingdom of Frupal should be implemented in ncurses, and in its main gameplay mode, the screen should be separated into two regions: the viewport and the in-game menu.

The Viewport

The viewport takes up the majority of the screen and displays a map of the kingdom of Frupal, with each grovnik occupying one character on the screen.

  • Undiscovered grovniks are black and empty.

  • As the hero moves around, grovniks adjacent to the player are discovered, revealing them for the rest of the game.

  • Each type of Grovnik has a different color:

    • The hero appears as a yellow @ on a red background.

    • Meadow grovniks, which take 1 energy to move through, are green.

    • Swamp grovniks, which take two energy to move through, are magenta.

    • Water is blue.

    • Walls are white.

    • The Royal Diamond is a white $ on a cyan background

  • Items appear as characters on top of these grovniks.

    • Food: F

    • Tools: T

    • Obstacles: !

    • Treasure chests: $

    • Clues: ?

    • Ship: S

    • Binoculars: B

The player can inspect grovniks in the viewport by moving the cursor around with the arrow keys. When the cursor is over a discovered grovnik, a description of that grovnik and its contents will appear in the in-game menu.

If the viewport is smaller than the Kingdom, (128x128 characters), then only a section of the total map can be displayed at once. It's up to you and your team to determine the best way to do this. The minimum terminal size at which your game is expected to function is 80x24.

The In-Game Menu

The in-game menu communicates everything else that the player needs to know to play the game. The menu shows:

  • The player's current energy and whiffle balance.

  • Which actions are currently available to the player, and which keys to hit to take those actions.

  • A description of the Grovnik that the cursor is on top of.

The player should also be able to navigate the menu to view the tools in their inventory.

Stretch Goals

  • Add a mode in which levels are randomly generated. Ideally, the randomly generated levels shouldn't look like total random noise. There should be some continuity and structure to the meadows, swamps, lakes, rivers and walls of Frupal, and the placement of obstacles and items should make the game challenging yet winnable.

  • The map loader should support custom obstacles, obstacle classes, and tools. For example, a user should be able to create a level with a Locked Door obstacle which can be easily removed with a key tool. Or perhaps a Fierce Dragon which the player must find a Magic Sword to vanquish.

  • Add a level editor mode to your program, which allows users to create levels directly inside the program. The user should be able to control the layout of the map, the player start location, the locations of items, and ideally should be able to add new custom tools and obstacles.

Last modified: Monday, 16 November 2020, 9:30 AM