A customizable multiplayer game based on the Flood-It algorithm with real-time synchronization and cloud deployment
- ๐ฎ Single-Player Mode: Practice and perfect your flood-fill strategy but also get featured in the leaderboard
- ๐ฅ Custom-Player Rooms: Create or join real-time rooms with friends and get featured in global and local leaderboards
- โ๏ธ 342+ Configurations: Mix and match board sizes, color palettes, and round limits
- ๐จ Dynamic Visuals: Smooth animations and responsive design- Play with the comfort of your phone or PC!!!
- ๐ Advanced Scoring: Custom formula considering:
- Average moves taken - Given the most importance
- Average Time Taken - Given importance when moves are same
- Colors Factor - The more the colors you select the more lineancy you get
- ๐ Leaderboard Tracking: Persistent player statistics and rankings
- ๐ Performance Analytics: Detailed gameplay metrics
- โก Live Synchronization: Powered by Socket.IO for seamless multiplayer
- ๐ Room Events: Real-time updates for all players
- ๐ก Instant Updates: Live leaderboard and game state changes
- ๐ Secure Deployment: HTTPS with SSL certificates
- ๐ Custom Domain: Professional domain routing
- ๐ฆ Scalable Storage: AWS DynamoDB for player data
- ๐ High Availability: EC2 deployment with NGINX reverse proxy
- Objective: Fill the entire board with a single color
- Mechanics: Click a color to flood-fill from the top-left corner
- Strategy: Choose colors that are present in the boundary initially
- Victory: Complete the board with the least num of moves and time
- ๐ฏ Single Player: Play with customizable difficulty
- ๐ฅ Multiplayer: Compete with friends in real-time rooms
- ๐ Ranked: Climb the leaderboard with your best scores
- Node.js (v20 or higher)
- npm or yarn
- AWS Account (for DynamoDB)
- GitHub OAuth App (for authentication)
-
Clone the repository
git clone https://github.com/yourusername/flood-fill-game.git cd flood-fill-game -
Install dependencies
npm install
-
Environment Setup
cp .env.example .env.local
Configure your environment variables:
# Authentication NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key GITHUB_CLIENT_ID=your-github-client-id GITHUB_CLIENT_SECRET=your-github-client-secret # AWS Configuration AWS_ACCESS_KEY_ID=your-aws-access-key AWS_SECRET_ACCESS_KEY=your-aws-secret-key AWS_REGION=your-aws-region DYNAMODB_TABLE_NAME=flood-fill-leaderboard #change other env variables as required by going through the app
-
Start Development Server
# Make frontend point to localhost port of backend # Start both frontend and backend using concurrently npm run dev:fullstack # Or start individually npm run dev # Frontend only npm run server # Backend only
-
Open your browser Navigate to
http://localhost:3000
flood-fill-game/
โโโ ๐ public/ # Static assets
โโโ ๐ server/ # Express server and Socket.IO logic-This is for testing purposes and not a real server
โโโ ๐ screenshots/ # Game screenshots for documentation
โโโ ๐ src/ # Contains source code ( app, components etc... )
โโโ ๐ package.json # Dependencies and scripts
โโโ ๐ next.config.js # Next.js configuration
โโโ ๐ tailwind.config.js # Tailwind CSS configuration
โโโ ๐ README.md # This file
- 10x10 grid
- 11x11 grid
- 12x12 grid
- 13x13 grid
- 14x14 grid
- 15x15 grid
- 16x16 grid
- Classic: 5 colors (Easy)
- Standard: 6 colors (Medium)
- Challenge: 7 colors (Hard)
- Expert: 8 colors (Expert)
- 5 - 24
Total Configurations: 560+ unique combinations
The game uses a sophisticated scoring algorithm that considers:
Score = (AverageMoves ร 1,000,000 + AverageTime) / ColorFactor
Where:
- AverageMoves = TotalMoves / TotalRounds
- AverageTime = TotalTime / TotalRounds (in milliseconds)
- ColorFactor = 1 + (ColorCount โ 5) ร 0.15
(Each extra color increases difficulty by 15% and reduces final score)- ๐ฏ Move Efficiency: Fewer moves = higher score
- โฑ๏ธ Time Performance: Faster completion = bonus points
- ๐ฎ Difficulty Level: More colors = score multiplier
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Write meaningful commit messages
- Add tests for new features
- Ensure responsive design compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
Having issues? We're here to help!
- ๐ Bug Reports: Open an issue
- ๐ก Feature Requests: Start a discussion
- ๐ง Email: philip200.john@gmail.com
โญ Star this repository if you found it helpful!
Made with โค๏ธ by Philip



