A next-generation text adventure game powered by Google Gemini. Aboard the Icarus creates infinite, dynamic storylines where your choices truly matter, accompanied by an adaptive atmosphere specifically generated to match your current situation.
- Infinite Storytelling: No pre-written paths. The AI Game Master improvises the story based on your actions, ensuring no two games are ever the same.
- Adaptive AI: Uses a robust fallback system (Gemini Flash, Pro, and Gemma models) to ensure fast and reliable responses.
- Dynamic Atmosphere: The game interface changes colors and ambient styles in real-time to reflect the mood and location of your adventure.
- Deep RPG Systems:
- Stats & Skills: Strength, Intelligence, Dexterity, and Charisma affect your success rates.
- Inventory & Equipment: manage your gear and equip items to boost your stats.
- Combat & Challenges: skill-check based conflict resolution.
- Character Creation: Start your journey by defining your hero's name, class, and backstory.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- AI Integration: Google Generative AI SDK
- Node.js 18+ installed
- A Google Cloud Project with the Gemini API enabled (Get an API key here)
-
Clone the repository
git clone https://github.com/yourusername/ai-dungeon-master.git cd ai-dungeon-master -
Install dependencies
npm install
-
Configure Environment Variables Create a
.env.localfile in the root directory:cp .env.example .env.local
Add your Gemini API Key:
GEMINI_API_KEY=your_actual_api_key_here
-
Run the development server
npm run dev
Open http://localhost:3000 to start your adventure.
This project is optimized for deployment on Vercel.
- Push your code to GitHub/GitLab/Bitbucket.
- Import the project in the Vercel Dashboard.
- Configure Environment Variables:
- In the "Environment Variables" section of the deployment setup, add:
Key:GEMINI_API_KEYValue:[Your Google AI Studio API Key]
- In the "Environment Variables" section of the deployment setup, add:
- Deploy: Click "Deploy" and wait for the build to finish.
Note: The API key is now securely handled on the server side and is NOT exposed to the client.
Contributions are welcome! Please feel free to submit a Pull Request.