Cipher Madness: Can you guess the output? is a text based adventure game that tests your knowledge of encryption functions.
It is written in Haskell.
- Install Docker Desktop or a similar Docker environment
- Run the docker daemon (by starting the installed Docker Desktop application)
- Open a command line terminal (cmd, powershell, bash, etc.)
- Run
docker pull ghcr.io/dennis960/haskell-project:latest - Run
docker run -it ghcr.io/dennis960/haskell-project:latest - (For more information see https://docs.docker.com/docker-hub/quickstart/)
- Clone the repository
- Install the devcontainer extension for Visual Studio Code
- Open the project in the devcontainer (F1 -Dev Containers: Open Folder in Container) (Might take a while the first time)
- Run the "build and run" task (F1 -Tasks: Run Task -build and run)
- Clone the repository
- Install the Haskell Tool Stack
- Open the project in Visual Studio Code
- Run the build and run task or
- Run
mkdir -p dist;ghc -o dist/main -isrc src/Main.hs -outputdir build;cp -r src/rooms dist/.;cd dist;./mainin the project root directory - Run
./dist/main - If that does not work:
chmod +x dist/main;./dist/main
- Install the Haskell Tool Stack
- Open the project in Visual Studio Code
- Run the "build and run" task (F1 -Tasks: Run Task -build and run)
-
Install Docker Desktop or a similar Docker environment
-
Run the docker daemon by starting the installed Docker Desktop application
-
Install the devcontainer extension for Visual Studio Code
-
Open the project in the devcontainer (F1 -Dev Containers: Open Folder in Container) (Might take a while the first time)
-
Run the "build and run" task (F1 -Tasks: Run Task -build and run)
- The README can be converted to a pdf using the yzane.markdown-pdf extension for Visual Studio Code
- Create new rooms in the src/rooms directory. Rooms are loaded by name, room_passage, room_other_name, etc.
- New Room-Cells can be added inside src/Room.hs. The Room-Cells need to correspond to the symbols used in the room files.
- Add new encryption functions in src/Cipher.hs
- Add new story elements in src/Story.hs inside the gameLoopElements array. The gameLoopElements array defines the order in which stories, terminals and rooms are shown.
- StorySecretItem needs a secret key. The secret key is the String that the user needs to input to progress.
- The secret key can be used inside the storyText by writing
$SECRET. It gets encrypted with the specified encryption function.
- Specify GameLoop Element types here, as well as useful functions for printing and managing the elements.
- Add new key events in src/KeyEvents.hs. Currently contains the key events for moving the player and fast forwarding the story-telling.
- Used for printing out text to the console at the specified typing speed.
- Contains a helper function for replacing substrings. Used for replacing
$SECRETin the story.
- Contains the main function. Loads the rooms, the story and the key events and starts the game.
- Runs the main game loop.
- Contains functions for printing out and letting the user select options.
- Contains functions for printing special effects.
- Contains functions for printing out the computer terminal.
- Can flash in different colors. (Green, Red)
- Contains the loading sequence at the start of the game.
- /.devcontainer: Contains the devcontainer configuration for Visual Studio Code
- /.Visual Studio Code: Contains the task for building and running the game
- .git*: Git configuration
- README.md: This file
- /build: Contains build files produced by the build task
- /dist: Contains the compiled game executable and the rooms directory