An interactive brain training application featuring multiple games designed to improve cognitive skills, memory, spatial thinking, and mathematical abilities. Features both single-player and multiplayer modes with real-time synchronization.
- Description: Practice calculation skills with basic arithmetic operations
- Features:
- Customize number range (min/max)
- Select operations: +, -, ร, รท, or mixed
- Adjust number of operands (2-5)
- Set question count and time limits
- Track score and accuracy
- Multiplayer support
- Description: Stack pixel cards to create target digits
- Features:
- Single-player or multi-player buzzer mode
- Customize number of cards and targets
- Round time limits
- Detailed scoring system
- Results display and statistics
- Multiplayer support
- Description: Fill in numbers to make equations equal target values
- Features:
- 3 difficulty levels: Easy, Medium, Hard
- Customizable puzzle count
- Hint system when needed
- Difficulty rating and solve time tracking
- Multiplayer support
- Description: Train working memory by tracking positions and letters simultaneously
- Features:
- Adjustable N-back level (1-5)
- Position and audio/visual stimuli
- Progress tracking
- Multiplayer support
- Description: Remember and recall highlighted cells in a grid
- Features:
- Multiple difficulty levels
- Customizable grid size
- Progressive difficulty
- Score and accuracy tracking
- Multiplayer support
- Description: Train verbal memory by memorizing and recalling English words
- Features:
- Customizable word count
- Time-limited recall phase
- Score based on correct recalls
- Extensive word bank
- Multiplayer support
- Description: Navigate through mazes to train spatial thinking and problem-solving
- Features:
- Multiple difficulty levels
- Auto-generated mazes
- Time and move tracking
- Keyboard navigation
- Multiplayer support
- Description: Train attention to detail and number recognition by finding missing or extra numbers
- Features:
- Two game modes: Missing (find absent numbers) or Extra (find out-of-range numbers)
- Customizable number ranges (single or multiple ranges)
- Adjustable difficulty: missing/extra count (1-10)
- Round-based gameplay (1-20 rounds)
- Wrong attempt limit to increase challenge
- Scoring system with time bonus and wrong penalties
- Shuffle board option for increased difficulty
- Type-based answer input with submission validation
- Multiplayer support with synchronized rounds
- Detailed statistics and round-by-round results
- Clone the repository:
git clone https://github.com/CaoVietHoang/pratice_brain.git
cd pratice_brain- Open
index.htmlin your web browser or use Live Server
- ๐ฏ Brain Training Games: Math, Memory, Logic, Spatial reasoning, and more
- ๐ฅ Multiplayer Mode: Real-time multiplayer with Firebase Realtime Database
- โ๏ธ Customizable Settings: Persistent settings for each game using localStorage
- ๐ Progress Tracking: Score, accuracy, and performance analytics
- ๐ฑ Responsive Design: Works on desktop and mobile devices
- ๐ง Modular Architecture: Clean separation with adapters, settings schemas, and shared utilities
- HTML5: Web structure and semantic markup
- CSS3: Styling, animations, and responsive design
- JavaScript (Vanilla): Game logic and interactions
- Firebase:
- Realtime Database for multiplayer synchronization
- Authentication for user management
- Google Analytics: Usage tracking and analytics
- Google Fonts (Quicksand): Typography
- localStorage: Persistent settings storage
- Clone the repository:
git clone https://github.com/CaoVietHoang/pratice_brain.git
cd pratice_brain- Open
index.htmlin your web browser or use Live Server
-
Create a Firebase project at Firebase Console
-
Enable Realtime Database:
- Go to Realtime Database section
- Create a database
- Start in test mode (or configure security rules)
-
Enable Authentication:
- Go to Authentication section
- Enable Anonymous authentication
-
Update Firebase configuration in shared/firebase-config.js:
const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_AUTH_DOMAIN", databaseURL: "YOUR_DATABASE_URL", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_STORAGE_BUCKET", messagingSenderId: "YOUR_MESSAGING_SENDER_ID", appId: "YOUR_APP_ID" };
- Select a game from the homepage
- Configure game settings (difficulty, time limits, etc.)
- Click "Start Game"
- Complete the challenges and track your score
- Select a game and click "Multiplayer"
- Host: Create a room and share the room code
- Guest: Enter the room code to join
- Wait for all players to be ready
- Game starts automatically when all players are ready
- Compete in real-time and see live scores
- Schema-based validation for each game
- Persistent storage using localStorage
- Default values with override capabilities
- Easy integration for new games
- Adapter pattern for easy game integration
- Real-time synchronization via Firebase
- Room management with automatic cleanup
- Host-controlled game flow
- Live score updates and result modals
Each game implements a MultiplayerGameAdapter that handles:
- Game configuration synchronization
- Question/data generation (host only)
- Score tracking and updates
- Room lifecycle management
See games/adapters/README.md for adapter development guide.
- Create an engaging and effective brain training environment
- Develop cognitive skills: memory, logic, calculation, and spatial thinking
- Provide both solo practice and competitive multiplayer modes
- Maintain a clean, modular, and extensible codebase
- Deliver a user-friendly and intuitive interface
-
Create game files in
games/:game-name.html- Game interfacegame-name.js- Game logic
-
Create styles in
css/:game-name.css- Game-specific styles
-
Create settings schema in
settings/schemas/:game-name.schema.js- Define configurable options
-
(Optional) Create multiplayer adapter in
games/adapters/:game-name-adapter.js- Implement multiplayer support
-
Register game in
js/main.js:{ id: 'game-name', title: 'Game Title', description: 'Game description', icon: '๐ฎ', tag: 'Category', url: 'games/game-name.html' }
Cao Viet Hoang
- GitHub: @CaoVietHoang
Happy Brain Training! ๐ง โจ