Museum Heist

From UBC Wiki


Authors: Daphne Chiu, Melody Lan

What is the problem?

You are a guard at an art museum. You plan to steal the most expensive painting at midnight. You can turn off the security camera for an hour, and must escape before the alarm goes off.

In this game, the player will be the guard. The player can win by obtaining different objects and navigating through the museum by using available commands until they are able to steal the painting successfully. There is only one way to succeed in this game.

What is the something extra?

We will implement a timed component to the game, by setting a countdown timer.

What did we learn from doing this?

In Prolog, by declaring rules and relations in code, we can represent a part of a real world system relatively well. In our game, we rely highly on states to determine the outcome of the game. In order to dynamically change the state in a program, we have to retract the old state and assert the new state. With this information, we learned that we can simulate an adventure game with different rooms and objects by defining different states and defining the constraints needed to win the game.

One thing that we found challenging was trying to implement a real-time timer by using multi-threading. In the end, we implemented an in-game timer that is not real-time, but rather counts down with each new state you enter.

Links to code etc

Source code from: