Cipher is an interactive chatbot application built using Python and Kivy. It features a text-based adventure game where users solve riddles and navigate through challenges. The app includes background music, sound effects, and a typewriter effect for immersive storytelling.
- Interactive Gameplay: Solve riddles and make choices to progress through the game.
- Dynamic Background Music: Background music changes based on the current challenge.
- Trap Sounds: Special sounds play during critical moments, such as traps or jumpscares.
- Typewriter Effect: Text is displayed with a typewriter animation for better user experience.
- Game Reset: Restart the game anytime by typing "start".
- Python 3.x
- Kivy Framework
- Buildozer (for building Android APKs)
- Clone the repository:
git clone https://github.com/DIttoSensei/Cipher.git cd cipher-chatbot - Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
-
Add New Challenges: Edit the dialogue_tree in dataset.py to add new challenges, riddles, or traps.
-
Change Background Music: Replace or add music files in the assets/ directory and update the bg_music key in dataset.py.
Now you need to pay absolute attention here, to build for APK i used linux, to be more specific i used kali linux as my development environment (Vm ware), cause for some reason i can't get it to build on windows.
Regardless of which distro you use i'm pretty sure it still the same:
-
Create a folder in your document directory or whatever location you please.
-
Add the main.py, dataset.py, chatbot.kv and buildozer.spec ( i assume you have edited the .spec file to suit your apk needs )
-
Create a virtual environment and activate it
python3.10 -m venv venv source venv/bin/activate -
Make sure your virtual environment is running python 10 that is if you encounter build error later on but python 10 was the version i used along with java sdk 17
-
Install buildozer
pip install buildozer
-
Run:
buildozer andriod debug
-
The build process should begin. Now if you encounter errors of pakages not installing properly for the build process, go to the target folder prompting the error and install it manually, either by zip of by git, make sure the paths are the same. After all that you should be good, most errors you should encounter are: Python version, SDK version, files not found in path ( Install manually )
-
Run step 6 again, and do not by all means should you run:
buildozer andriod clean
This is basically clearing all your hard work. Another ALternative is using goggle collab, install buildozer and run build.
A quick rundown on how the code works, the main.py and chatbot.kv handles the main code process and interface, .kv is more in charge of the interface which are then called in main to correspond with specific functions and input.
So not much should be change except from the interface if ypou want, or how input are being processed. In dataset.py, you have a dialogue tree that structures how input and cpu responses should interact including music and branches. refer to 1.png in the assets folder.

If you are going to edit datasets, use template.txt and follow how they are being arranges and edit away. All you need is to structure your dialogue accordingly, the system wil process the rest as it should.
- Developer: Andrew Richard (Dittosensei)
- Framwork: Kivy
- Build Tools: Buildozer
- Audio: Gory Explosion FX" By Lux Aeterna, All artist on pixabay.com (sorry couldn't trace their names lost the credit file i once wrote)