Skip to content

mscrnt/TextAdventure

Repository files navigation


Text Adventure Game - Project README

Introduction

Warning!!!

This project is in early alpha. Quests have not been implemented. Player can move around and interact with environment in limited ways.

Welcome to my Text-Based Adventure Game, an engaging and interactive experience where your choices shape the narrative. Enhanced with AI, this game offers a unique journey through a world of mystery and challenges, featuring exploration, interaction with objects and NPCs, and solving puzzles or completing quests.

Features

  • AI-Enhanced Gameplay: Dynamic storylines and reactive game environments powered by OpenAI's GPT model, allowing for natural language understanding and creative storytelling.
  • Customizable Worlds: Explore a variety of worlds, each with its unique set of challenges and story elements.
  • Dynamic Characters: Interact with a cast of evolving characters and engage with NPCs within the game world.

Technologies Used

  • Programming Language: Python
  • User Interface: PySide
  • Data Handling: JSON for efficient game data management
  • AI Integration: Advanced AI algorithms for an adaptive game experience

Installation

  1. Clone the repository and ensure Python 3.7+ is installed.
  2. Create a virtual environment using python -m venv venv.
  3. Install PySide and other dependencies using pip install -r requirements.txt.
  4. Run the game using python main.py.
  5. To use the AI assistant, you will need to create an OpenAI account and set the OPENAI_API_KEY environment variable to your API key.
    • You can use the flag --use-ai to enable the AI assistant.

How to Play

Begin by creating your character, select a world to start in, and navigate the game using intuitive text commands. Engage with the game using text commands, with the AI assistant interpreting your inputs for immersive interactions.

Game Components

data/docs/

  • Contains documentation for the game's data files, including JSON references and AI Assist class reference.

main.py

  • Entry point of the application, initializing the game and managing the main loop.

game_ui.py

  • Manages the game's user interface, handling game output, user inputs, and UI updates.

main_window.py

  • Creates the main application window, integrating UI components and managing events.

game_manager.py

  • Core game logic controller, managing game states, player interactions, and progression.

player_sheet.py

  • Manages player data, tracking inventory, stats, and characteristics.

quest_tracker.py

  • Quest management system for monitoring progress, triggers, and completions.

world_builder.py

  • Constructs and manages the game world, generating locations, NPCs, events, and handling interactions.

ai_assist.py

  • Integrates AI for enhanced interaction, processing player commands and providing dynamic responses.

utilities.py

  • Provides utility functions, including JSON file handling for loading and saving game data.

Game Mechanics

  • Exploration: Travel through various locations within the game world.
  • Inventory Management: Collect, use, and manage items.
  • Quests: Complete quests for rewards and story progression.
  • Interactions: Engage with NPCs and objects within the game world.

Data Structure

  • The game's world and player data are stored in JSON format, facilitating easy modification and expansion.

Contribution

  • Adding Content: Modify JSON files to add new items, locations, or quests.
  • Customization: Adjust game mechanics or AI responses in the Python files as needed.

Support

For any issues or suggestions, please open an issue on the project's GitHub page.

Acknowledgements


About

A texted based gaming using PySide and OpenAI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages