Program Description

Assumptions: 

  • Player has access to a working, charged Proteus and stylus.
  • Proteus is standard FEH proteus with a screen of 320 x 240 pixels.
  • Player knows what a button, menu, and other common technology terms mean.
  • Player can read and is not color blind.
  • Player can follow directions and make in-game decisions.

Important Variables:

  • grassHealth: Used to track and measure the health of the grass as it changes throughout the game.
  • grassHeight: Determines the height of the grass drawn on the screen.
  • demerit: Tracks how many times the player has failed a city council visit.
  • compliments: Records how many times the player has passed a city council visit and been complimented as a result.
  • dogpoopcounter: Counts how many times the dog has pooped on the yard and not been cleaned up after.
  • watercnt: Saves the number of time the player has watered the lawn. Increments by one each time the action is done.
  • weedcnt: Saves the number of time the player has weeded the lawn. Increments by one each time the action is done.
  • fertcnt: Saves the number of time the player has fertilized the lawn. Increments by one each time the action is done.
  • mowcnt: Saves the number of time the player has mowed the lawn. Increments by one each time the action is done.
  • maxday: Used to save the maximum number of days the player has lasted in a single run.
  • daycnt: Used to increment the days as the game progresses.
    • day: Holder variable that saves the current day, used to go to the next day if next day is chosen or end the game if quit is chosen during a run.
  • eventcnt: Used to save the number of events that the player has encountered.
  • diff: Used to save the the difficulty chosen in the options menu. diff is a number 1-3 that determines the number of turns per day, the chance of random events happening, and maximum number of demerits needed to lose.
  • kids: Used to determine if the kids running through the yard event is available. It is initially set to one and if the “Call the school” option is chosen, the kids event can no longer happen.
  • turns: Used to determine the number of actions the player can do in the game menu per day.
  • random: Used to save the random number 1-100 that the random number generated created.
  • x: Saves the x-position where the player touched the screen. x is used for deciding which option the player has chosen.
  • y: Saves the y-position where the player touched the screen.   y is used for deciding which option the player has chosen.

Functions Used:

  • void mow():
    • Parameters: none
    • “Mows” the grass by lowering the grass height with a short animation and a reset of the grassheight variable.
  • void fertilize():
    • Parameters: none
    • “Fertilizes” the grass by displaying a short animation of a bag emptying on the grass and adding to the grasshealth.
  • void water():
    • Parameters: none
    • “Waters” the grass by displaying a short animation of water running through the grass and adding to the grasshealth.
  • void dogpoop():
    • Parameters: none
    • Creates a poop visual on screen and adds one to the dogpoopcounter.
  • void citycouncil(int diff):
    • Parameters: difficulty setting of the game
    • Checks if the grass height is too high and if any dog poop present. If so, the player gets a demerit and is given a criticizing text comment. If not, they get a compliment and a complimentary text comment.
  • void healthbar():
    • Parameters: none
    • Displays a 100 pixel long health bar in the upper left hand corner of the screen. The percentage of the bar that is green represents how much health your grass has left. Also makes sure the health is never greater than 100.
  • void defaultscreen();
    • Parameters: none
    • This function prints the general screen with the background, sun, cloud, and grass. The grass height adjusts when the grassHealth variable is changed.

Program Performance and Limitations:

  • Performance: The program performs similar to Oregon Trail, with simple animations and visuals working with text and menus to demonstrate what is happening in the game and what the user’s options are. Random events are told to the player through text and animation and the user selects their responses and choices using the stylus for menus. Grass Simulator 2018 differs from Oregon Trail by using a stylus and touch screen for player input rather than a keyboard and mouse.
  • Limitations:
    • Screen often needs a full wipe in order to do certain animations.
    • Player can accidentally skip or stop animations.
    • The random number generator uses the TimeNow() function as a seed. This sometimes allows events to chain together multiple time if the user plays at specific rates.