Skip to content

kevinbuckley/choose-your-hero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


CHOOSE-YOUR-HERO

All heroes, the boss, attack powers, and health recreated daily using AI!

Check back every day to choose your hero!

HTML5 Vite OpenAI TypeScript tsnode JSON


📖 Table of Contents


📍 Overview

Daily, simple card game for everyone. The entire game changes daily! Not only the heroes, but their mechanics (health and attack power).

Check back every day to choose your hero! Please add an Issue with new theme ideas!


Generator

📂 Repository Structure

└── choose-your-hero/
    ├── generator/
    │   ├── main-simulator.ts

Used to generate the new game file and assets daily. Here's the process:

Step 1: Given a theme, use OpenAI to generate the game_file.json, including all heroes, health, and attack power

Step 2: Run a simulation of the game 100 times to determine if it's a fair and fun game for people to play. If not, go back to step 1.

Step 3: Use OpenAI to generate the card images for each hero.


Web

📂 Repository Structure

└── choose-your-hero/
    └── web/
    │   ├── mechanics
    │   ├── scenes

The generated game, including:

mechanics: The core game logic that can be simulated determine if it's fun.

scenes: The UI code using Phaser JS


🚀 Getting Started

🔧 Installation

  1. Clone the choose-your-hero repository:
git clone https://github.com/kevinbuckley/choose-your-hero
  1. Change to the project directory:
cd choose-your-hero
cd web
  1. Install the dependencies:
npm install

🤖 Running choose-your-hero

npm run start