SpriteForge
Generate professional game sprites from photos using OpenAI's GPT-Image-1 model
๐ฎ Overview
SpriteForge is a web application that transforms regular photos into game-ready character sprites using OpenAI's GPT-Image-1 model. Whether you're a game developer looking for quick character assets or just someone who wants to see themselves as a video game character, SpriteForge makes it easy to generate high-quality sprites in various popular game styles.
โจ Features
-
Multiple Game Styles: Generate sprites in various popular game styles:
- Stardew Valley (32ร32 pixelart)
- Breath of the Wild (256ร256 cel-shaded)
- Genshin Impact (192ร192 anime-styled)
- Hollow Knight (128ร128 hand-drawn gothic)
- Fall Guys (160ร160 bouncy cartoon)
- Original style based on your reference image
-
Animation Actions: Create multiple animation sequences for your character:
- Idle animation
- Walk cycle
- Jump animation
- Air attack
- Hurt animation
- Knockout animation
- Punch combinations
- Turn around animation
-
Real-time Preview: Watch animations come to life with our built-in animation player
-
Frame Editing: Edit and regenerate individual frames for perfect animations
-
Direct API Integration: Uses your own OpenAI API key for image generation
๐ผ๏ธ Example Output
Example sprite sheet generated with SpriteForge
๐ธ Screenshots
Upload your image and select style preferences
Choose from multiple generated game styles
Preview and customize your animated sprite frames
๐ Getting Started
Prerequisites
- Node.js (v16+)
- npm or yarn
- OpenAI API key with access to GPT-Image-1 model
Installation
-
Clone the repository:
git clone https://github.com/marcelontime/spriteforge.git cd spriteforge -
Install dependencies:
npm install -
Build the styles:
npm run build -
Start the development server:
npm run dev -
Open your browser to http://localhost:8080
Live Demo
Try out SpriteForge directly in your browser: SpriteForge Demo
๐ฎ How to Use
- Enter your OpenAI API key (required for image generation)
- Upload a reference photo (preferably a full-body image with a clear subject)
- Generate Style Previews to see your character in different game styles
- Select your preferred style from the generated options
- Choose an animation action from the dropdown menu
- Generate your sprite frames and watch them animate in real-time
- Edit individual frames if needed by clicking on them
- Download your completed sprite sheet for use in your games!
๐ ๏ธ Technical Details
Technology Stack
- Frontend: HTML5, CSS3, JavaScript, Tailwind CSS
- API Integration: OpenAI GPT-Image-1 model
- Build Tools: PostCSS, Nodemon, Concurrently
- Deployment: GitHub Pages
API Usage Notes
- This application uses OpenAI's GPT-Image-1 model which requires an API key
- API calls are made directly from your browser to OpenAI
- Your API key is stored in localStorage for convenience but never sent to our servers
- Image generation costs will be charged to your OpenAI account
๐ Privacy
- Your uploaded images are processed entirely in your browser
- No data is transmitted to any server except directly to OpenAI's API
- Your OpenAI API key is stored locally and only used to authenticate with OpenAI
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgements
- OpenAI for providing the image generation API
- All the game art styles that inspired this project
- Contributors who have helped improve this tool