Where a struggle between humanity and its creations quietly persists, can you possess free will, or are you part of a greater design?
Blade of Valor is a 2D game that combines the power of Phaser 3, Next.js, and a Flask backend to deliver a unique gameplay experience. The game explores themes of free will and the consequences of actions through a storyline inspired by Grimes' 'Player of Games' and aspects of Legend(1985). The protagonist, Elara, navigates a world filled with ghouls, using her skills in sword combat.
Blade of Valor is a 2D action-adventure game built using Phaser 3 for the game engine and Next.js for the front-end framework. The game leverages a Flask backend integrated with TensorFlow and Keras to provide AI-driven gameplay mechanics.
This project includes:
- Clone the repository:
git clone https://github.com/yourusername/blade-of-valor.git
cd blade-of-valor
- Install Node.js dependencies:
npm install
- Install Python dependencies:
pip install -r requirements.txt
- Start the Flask backend:
cd api
export FLASK_APP=app.py
flask run
The Flask server will run on http://localhost:5000
by default.
- Start the Next.js development server:
npm run dev
The development server runs on http://localhost:8080
by default.
src/
- Contains the Next.js source code.public/
- Static assets for the game.api/
- Flask backend code.game/
- Phaser game code.
The PhaserGame.tsx
component serves as the bridge between React and Phaser. It initializes the Phaser game and manages events between the two.
The backend API is built with Flask, TensorFlow, and Keras. It provides AI-driven features for the game, enhancing the overall gameplay experience. The API endpoints are defined in app.py
.
Coming soon