Escape Game

From UBC Wiki

Project Proposal: Escape Game

Overview

Authors:

Sukanya Sen, Aiden Seo, John Ahn

What is the problem?

The player to reach goal state from start state avoiding obstacles

Game Rules

The game is a survival game where a player explores a haunted house and attempts to escape. The player must navigate through areas of the house, hiding and avoiding a character named Granny. There are items and obstacles hidden that the player can use.

Granny 4 play demo: https://www.youtube.com/watch?v=wVyTiNicZnQ

Winning Condition

When the player reaches the goal state  

Detailed Game Description

Flow of Escape Game
  • Room 1:
    • Items Available: Flashlight, Shotgun
    • Note: You can only carry one item at a time.
  • Room 2:
    • Description: This room serves as a simple passage to the next challenge. There are no items or obstacles here.
  • Room 3:
    • Description: A dark room that requires the use of a flashlight to navigate.
    • Special Rule: You must have the flashlight from room1 to enter this room. Once you enter, you will drop the flashlight to keep the room lit for future adventurers.
  • Room 4:
    • Description: Another room with no special items or challenges, serving as a link to the next rooms.
  • Room 5:
    • Item Available: Crowbar
    • Note: If you already have an item from a previous room, you will drop it here to pick up the crowbar. You can only carry one item at a time.
  • Room 6:
    • Obstacle: Granny - Ghost
    • Description: This room is haunted by Granny blocking your path.
    • Solution: You must have the shotgun from room1 to enter this room and eliminate Granny. Once you shoot Granny, she will stay dead, allowing you to proceed.
  • Room 7:
    • Challenge: Locked Box containing the escape key
    • Special Rule: You will need the crowbar from room5 to open the locked box and retrieve the escape key.
  • Room 8:
    • Description: A room with no items or obstacles, connecting you to the final escape room.
  • Room 9:
    • Description: Another straightforward room with no special features
  • Room 10:
    • Objective: Escape!
    • Special Rule: Once you have the escape key from room7, make your way to room10 to unlock the door and finally escape from the building.

What is something extra?

We plan to add the following features:

  • Additional obstacle: to enter dark room, will need flashlight
  • Will need crowbar to access box with key
  • Specify granny patrol rooms (patrols rooms randomly, once killed in one room - revives in another)
  • Put charge for shotgun

What did we learn from doing this?

Learning Goals:

  • Idea of Knowledge Base: facts and rules are stored in the knowledge base in a simple and clear form
  • Pattern matching: it uses pattern matching to find queries in the knowledge base (similar to Haskell)
  • Dynamic predicates: possible to determine predicates that can change during execution

Work division

Sukanya

Basic Implementation:

  • Flashlight, Shotgun is available in room 1.
  • Can pickup either (not both).
  • Granny in room 6 - needs a shotgun to enter.
  • Escape Key in room 7. Can pick up and escape

Shotgun with ammo - kills granny only if ammo is present, else player gets killed

  • Put in recharge spots for shotgun (following the previous constraint)

Use of Knowledge Base

  • In room 2, the player has to choose either Foo/Bar - The program randomly assigns foo/bar as the enemy.
  • If the player chooses the foe, then the player has to restart, else the player can proceed with the game
  • The player only has to choose the first time he enters room 2, other time (if the player returns to room 2), then no choice necessary

John

Additional Implementation:

  • Ability to drop items into different rooms.
  • Create another obstacle: Dark Room (room 3) - will need flashlight to enter (once lit - set tru and remains lit)
  • Create an item for pickup - crowbar at position 5. Additional constraint - will need a crowbar to open box with the key at position 10

Aiden

Specify Granny patrol rooms:

  • Walks randomly
  • Once killed in one room, revived in another

Link to code

https://github.students.cs.ubc.ca/ssen04/PrologAdventure.git