A collection of fun and engaging mobile games built with Flutter for iOS and Android.
NGames is a personal project created by Kailash for Neely, featuring classic games with modern UI and social features like high scores and messaging.
- Wordle - Guess the 5-letter word in 6 attempts
- Hangman - Classic word-guessing game with categories
- Snake - Navigate the snake to eat food and grow
- Confetti celebrations when you win
- Global high scores leaderboard
- Auto-save game progress (resume anytime!)
- Material Design 3 UI
- Dark/Light theme support
- Firebase authentication
- Cross-platform (iOS & Android)
- Flutter SDK (>= 3.7.2)
- Dart SDK (>= 3.7.2)
- iOS: Xcode 15+, CocoaPods, iOS 16.0+
- Android: Android Studio, Android SDK
-
Clone and install dependencies:
git clone https://github.com/KingLizard1020/Ngames.git cd Ngames flutter pub get cd ios && pod install && cd ..
-
Run the app:
flutter run
lib/
├── core/ # Core utilities and architecture
│ ├── constants/ # App-wide constants
│ ├── errors/ # Custom exceptions
│ ├── game/ # Base game classes and interfaces
│ └── utils/ # Utilities (logger, etc.)
├── games/ # Game implementations
│ ├── wordle/
│ ├── hangman/
│ └── snake/
├── models/ # Data models
├── routing/ # Navigation (GoRouter)
├── screens/ # UI screens
├── services/ # Business logic services
├── shared/ # Shared resources
│ ├── services/ # Shared services (GameStateService)
│ └── widgets/ # Shared widgets (GameOverDialog)
└── widgets/ # Reusable widgets
NGames uses a modular architecture with base classes and shared services to ensure consistency and reduce code duplication across games.
- BaseGame: Abstract interface that all games implement
- BaseGameState: Base class providing automatic state persistence and high score tracking
- GameStateService: Unified game state management using SharedPreferences
- Mixins: HighScoreGame, TimedGame, LivesGame, DifficultyLevelGame
For detailed architecture documentation, see GAME_ARCHITECTURE.md.
# Run tests
flutter test
# Generate mocks
dart run build_runner build --delete-conflicting-outputs
# Deploy Firebase rules
firebase deploy --only firestore:rules
# Run in release mode
flutter run --release
# Build for iOS
flutter build ios --release
# Build for Android
flutter build apk --release- Create game screen extending
BaseHighScoreGameState - Implement required methods (getGameStateData, restoreGameStateData)
- Add game route in
app_router.dart - Add navigation button in home screen
- Add game constants in
game_constants.dart
See GAME_ARCHITECTURE.md for detailed guide.
- Refactored code for better maintainability
See REFACTORING_SUMMARY.md for complete details.
Created with ❤️ by Kailash for Neely