Coder Social home page Coder Social logo

rpg-quest's Introduction

AI RPG Quest Creator

Proof of concept project showcasing how AI can create real-time video game quests with contextual uniqueness, avoiding the cookie-cutter phenomena.

How it Works

The Quest Creator utilizes the following process:

sequenceDiagram
    participant User
    participant Frontend
    participant Backend
    participant Database
    participant OpenAI

    User->>Frontend: Clicks "Create Quest" button
    Frontend->>Backend: API Call /quest with JWT token and 'map'

    activate Backend
    Backend->>Backend: Extracts 'username' from JWT token
    Backend->>Database: Query user's character class using 'username'
    Database-->>Backend: Returns user's character class ('class_')

    Backend->>OpenAI: Request for quest generation
    OpenAI-->>Backend: Generates quest in JSON format
    deactivate Backend

    Backend->>Database: Save generated quest to the database
    Database-->>Backend: Confirmation of successful save

    activate Backend
    Backend-->>Frontend: Returns generated quest JSON
    deactivate Backend

    Frontend->>User: Displays generated quest to the user
Loading

Prompt used:

prompt

PostgreSQL database ERD:

erDiagram
    CHARACTER {
        int CharacterID PK
        string Name
        string Password
        string Class
        datetime Created_at
    }
    QUEST {
        int QuestID PK
        string Title
        string Description
        json Rewards
        int Experience
        float Cost
    }

    CHARACTER ||--o{ QUEST : has
Loading

rpg-quest's People

Contributors

rodrq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.