Occluded Foresight - A Dungeon-Delving Python Terminal Game

Click here for a link to the game’s repository

Hi hi!

For this project I made a dungeon-delving terminal game called Occluded Foresight. This took me more than a week to make, but I very much had a fun experience making this. I’d be delighted to have your feedback on this :slight_smile:

In this game you navigate blindly through a crumbling crypt. Your objective is to collect all of the treasures inside it and find the portal to escape before the entire crypt collapses. Despite not being able to see anything, you will be guided by your character’s intuition to locate the treasures and escape (thus the name ‘Occluded Foresight’).

epic gaming montage 1 epic gaming montage 2 (winning)

The game’s code is subdivided into 6 parts:

  • Classes
  • Gridmaking
  • Obstacles and Treasure Generation
  • Character Presence & Movement Control
  • Game Initialization
  • Menu and Dialogs

This is where the Characters and Entities (Interactives) are created.

This section handles the creation of the crypt itself. The crypt starts off as list form.
It only contains one function, generate_gridlist, which generates and returns the grid in list form.

Obstacles and Treasure Generation
This section handles the position of which each Interactives/Entities such as Pillars and Portals will be located inside the grid. It contains 5 functions:


Character Presence & Movement Control
This section is responsible for the existence of the characters and its movement. It has five functions:

isinsideInteractive(x,y,generated_grid_list_, Interactive):

Game Initialization
This section is where all of the previous functions will be used. With the function initgl(), the crypt will be created and the game will start.

Main Menu and Dialog
With this last part of the code, all of the game’s dialogs are created.

So yeah, that’s pretty much a short summary behind the game’s code. Hopefully you enjoy it! Play with the code and whatever. Overall had fun making this.

Also credits to the website responsible for creating the ASCII Art of Occluded Foresight. Really epic.

1 Like