Skip to content

text-based horror game using a directed graph data structure and DFS node traversal

Notifications You must be signed in to change notification settings

j-derrico/blackwood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blackwood

text-based horror game using a directed graph data structure and DFS node traversal

Expands on basic directed graph implementation from CU Boulder's 2270 Data Structures course. Includes Node.h, Edge.h, Graph.h, Node.cpp, Edge.cpp, and Graph.cpp along with two executables, test.cpp and Main.cpp. Compiled using clang (clang++ -Wall -Wextra -g Node.cpp Edge.cpp Graph.cpp test.cpp)

test.cpp is an executable designed to showcase how the functions work on a smaller scale, without needing to traverse through the whole game. The structure of the testGraph before adding test nodes is:

testGraph:

   a
  / \
 b   c
/ \   \ 

d e f

After testing the addNode function:

testGraph:

   a
  / \
 b   c
/ \   \ 

d e f \ / g /
h i

The outcome options of h and i depends on whether the user selected node d or e previously.

Main.cpp is the text game itself, with 32 story and location nodes and 4 possible endings. In order to uncover the full story behind the secret of Blackwood Farm, the user must play through all 4 endings.

To add:

-Streamline creation of nodes/story -Smaller graphs that function more like finite state machines (can use this to introduce in-game object interactions) -Save option in playthrough: warn user of ending decision ahead with option to save location. If user decides to play through all 4 endings, they can go back to the save location and choose differently rather than needing to go through the whole beginning again (this isn't as urgent in such a short story as this one, but would be essential in anything longer) -An api would probably be nice

About

text-based horror game using a directed graph data structure and DFS node traversal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages