react-native-games
v1.13.0
Published
Free games for your react native projects.
Maintainers
Readme
🎮 react-native-games
react-native-games is a collection of 37 high-performance games for your React Native projects. Built with modern React Native technologies including Skia, Reanimated, Gesture Handler and TypeScript for smooth 60fps gameplay across iOS and Android platforms.
🎯 Available Games
| Screenshot | Game Details | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | 🧩 Block BlastPlace blocks on the grid to clear full lines - strategic puzzle challenge!• Tetris-style block placement puzzle• Clear lines horizontally or vertically• Strategic planning required for high scores• 3D block visuals with blast animations | | | 🔗 Connect Em AllConnect matching colored dots on the board to clear them and score points!• Connect dots of the same color• Draw paths without crossing lines• Fill the entire board for bonus points• 3D dot visuals with blast effects | | | 🎯 Bubble ShooterAim and shoot bubbles to match 3 or more of the same color and clear them!• Aim and shoot bubbles to match colors• Clear clusters of 3 or more bubbles• Physics-based bubble bouncing• 3D bubble visuals with blast effects | | | 🧱 Block BreakerBreak all the bricks with a bouncing ball and paddle - arcade action fun!• Classic brick-breaker arcade gameplay• Bounce the ball off your paddle• Break all bricks to win the level• Power-ups and special effects | | | 🀄 Tile HomeMatch 3 tiles of the same type to clear them - classic mahjong puzzle fun!• Mahjong-style tile matching• Match 3 identical tiles to clear them• Strategic tile selection• 3D tile visuals with blast animations | | | 🍎 Fruit NinjaSlice all flying fruits with finger swipes and combos - avoid the bombs!• Swipe-based fruit slicing mechanics• Physics-based particle effects and combos• Avoid bombs for survival• Reanimated blast particles | | | 🍉 Fruit MergerDrop and merge fruits to create bigger ones - reach the watermelon!• Physics-based fruit dropping• Merge fruits to evolve them• Reach watermelon for victory• Combo system for multiple merges | | | 🐦 Flappy BirdTap to flap and navigate through pipes - classic arcade challenge!• Classic tap-to-flap mechanics• Gravity physics and collision detection• Navigate through pipe gaps• Score tracking with best score | | | 🦖 Dino JumpJump over obstacles and collect stars for extra lives - endless runner fun!• Chrome dino-inspired endless runner• Tap to jump over obstacles• Collect stars for extra lives (max 3)• Progressive speed scaling | | | 🔲 Dots and BoxesConnect the dots to complete boxes and outscore the AI - strategy game!• Classic pen-and-paper strategy game• Play against smart AI opponent• Complete boxes by connecting dots• 3D metallic dots and beveled lines | | | 🍬 Candy CrushMatch colorful candies in rows to score points - sweet puzzle fun!• Match-3 puzzle mechanics• Create special candies with 4+ matches• Cascading combos and animations• Timed challenge mode | | | 🐱 Whack A MoleWhack cute cats popping from holes - test your lightning reflexes!• Fast-paced whacking action• Animated mole characters• Haptic feedback on whack• Score multiplier system | | | 👾 Pac-ManClassic arcade action - eat all dots, avoid ghosts, and clear the maze!• Classic Pac-Man maze gameplay• Eat dots and avoid ghost enemies• Power pellets to chase ghosts• Smart ghost AI with multiple modes | | | 🎨 Colors SortSort colored liquids into matching tubes - challenging logic puzzle!• Pour liquids between tubes• Match all colors in separate tubes• Satisfying pour animations• 3D gel-style piece visuals | | | 🫧 Popit FidgetPop satisfying bubbles in this relaxing fidget toy simulation game!• Relaxing bubble popping experience• Satisfying sound effects and haptics• 3D bubble visuals with silicone feel• 5×5 grid with vivid colors | | | 🎈 Balloon BlasterPop rising balloons before they escape - quick taps and swipes win!• Swipe or tap to pop balloons• Balloons rise from bottom to top• Particle effects on pop• Lives system with score tracking | | | 🚀 Space FighterPilot your spaceship through asteroid fields - endless space survival!• Drag controls for spacecraft movement• Dodge asteroids in endless space• 1-second collision immunity• Progressive speed increase | | | 📝 Word SearchFind all hidden words in the letter grid - swipe to select and score!• Classic word search puzzle• Swipe to find hidden words• Multiple word categories• 3D cell backgrounds with highlight animations | | | 🔢 Number SearchFind all hidden numbers in the digit grid - swipe to select and score!• Number-based word search variant• Swipe to find hidden number sequences• Timed challenge mode• 3D cell backgrounds with highlight animations | | | 🪖 Tank 1990Classic tank battle game - destroy enemy tanks and defend your base to win!• Retro-style tank combat• Destructible terrain and barriers• Defend your base from enemy waves• 3D tank visuals with muzzle flash effects | | | 🔩 Nuts and BoltsUnscrew bolts and remove wooden planks to solve tricky mechanical puzzles!• Physics-based bolt unscrewing puzzles• Remove planks in the correct order• Satisfying unscrewing mechanics• 3D bolt and plank visuals | | | 🏗️ Stack TowerStack sliding blocks perfectly to build the tallest tower you can reach!• Tap to place sliding blocks• Perfect placements for bonus points• 3D isometric block visuals• Blast effects on perfect placement | | | 🔧 Pipe ConnectRotate pipes to connect the water flow from source to sink in time!• Rotate pipe segments to connect flow• Connect source to sink before time runs out• Water flow animation on completion• 3D pipe visuals with metal finish | | | 💣 Mine SweeperReveal all safe cells on the grid without hitting a hidden mine below!• Classic minesweeper logic puzzle• Tap to reveal, long press to flag• Number clues show adjacent mines• 3D cell visuals with Skia rendering | | | 🔪 Knife HitThrow knives at the spinning log — don't hit another knife or apple!• Tap to throw knives at spinning target• Avoid hitting previously thrown knives• Hit apples for bonus points• Satisfying stick and break animations | | | 🌈 Color SwitchJump through matching color obstacles — time your taps to survive!• Tap to jump through rotating obstacles• Pass through matching color segments only• Collect stars to switch colors• Smooth shared-value animations | | | 🎲 Ludo KingClassic board game for all ages - roll dice and race your tokens back home!• Classic Ludo board game• Play against AI opponents• Roll dice and move tokens strategically• Animated token movement | | | 🕷️ Spider SolitaireClassic Spider Solitaire - build card sequences and clear the full tableau!• Classic Spider Solitaire card game• Build descending card sequences• Multiple suit levels• Undo and hint system | | | 🧩 Maze RunnerNavigate ball through procedural mazes - tilt and physics controls!• Procedurally generated mazes• Tilt-based physics controls• Multiple grid sizes• Smooth ball physics | | | ❌ Tic Tac ToeClassic X and O strategy game - play against a smart AI and try to win!• Classic tic-tac-toe gameplay• Play against AI with varying intelligence• 3D frosted glass board• Enhanced 3D X and O pieces with glow effects | | | 🏎️ Car RacingDodge oncoming traffic and race through busy lanes - test your reflexes!• Lane-based racing with traffic dodging• Swipe to change lanes quickly• Collect coins and power-ups• Progressive speed increase | | | 🏍️ Bike RacingRace on bikes through heavy traffic - faster speeds and bigger challenges!• High-speed bike racing• Lane-based traffic dodging• Faster than car racing• Lives system with score tracking | | | 🔢 Sliding NumbersSlide numbered tiles into the right order - classic sliding puzzle game!• Classic 15-puzzle mechanics• Multiple grid sizes• Timer challenge mode• Smooth tile sliding animations | | | 🎮 2048Merge matching number tiles to reach 2048 and beyond - addictive puzzle!• Swipe to merge matching tiles• Reach 2048 tile to win• Continue for higher scores• Smooth merge animations | | | 🔢 SudokuFill the 9x9 grid with numbers 1-9 with no repeats in rows or columns!• Classic Sudoku number puzzle• Pencil mark notes support• Error highlighting for invalid entries• Per-cell isolation for smooth performance | | | 🐍 Snake 3DEat eggs to grow longer and avoid hitting the walls - classic snake game!• Classic snake mechanics• Swipe or tap to change direction• Grow by eating eggs• 3D snake body rendering | | | ⭕ Perfect CircleDraw the most perfect circle you can on screen - test your hand precision!• Draw circles with your finger• Precision scoring system• Challenge your drawing skills• Visual feedback on accuracy |
📦 Installation
npm install react-native-games
# or
yarn add react-native-games🔧 Peer Dependencies
This library requires the following peer dependencies to be installed in your project:
npm install @shopify/react-native-skia react-native-reanimated react-native-gesture-handler react-native-worklets react-native-svg expo-speech expo-hapticsPlatform Setup
Follow the installation guides for each peer dependency:
- @shopify/react-native-skia - Graphics
- react-native-reanimated - Animations
- react-native-gesture-handler - Gestures
- expo-speech - Sounds
- expo-haptics - Haptics
🚀 Usage
Simple Implementation
For basic usage without settings persistence:
import React, { useState } from 'react';
import { View } from 'react-native';
import { DEFAULT_GAME_SETTINGS, FruitNinja } from 'react-native-games';
export default function GameScreen() {
const [settings, setSettings] = useState(DEFAULT_GAME_SETTINGS);
return (
<View style={{ flex: 1 }}>
<FruitNinja settings={settings} onSettingsChange={setSettings} />
</View>
);
}Advanced Implementation Example
All games use the same props pattern for consistency. Here's a complete example with settings persistence and navigation integration:
import { View, TouchableOpacity } from 'react-native';
import { useState, useLayoutEffect } from 'react';
import { useNavigation, useTheme } from '@react-navigation/native';
import { Ionicons } from '@expo/vector-icons';
import { DEFAULT_GAME_SETTINGS, GAME_IDS, type GameSettings, FruitNinja } from 'react-native-games';
import { StorageService } from '../services/StorageService';
export default function FruitNinjaScreen() {
const { colors } = useTheme();
const storedSettings = StorageService.get(GAME_IDS.FRUIT_NINJA);
const [settings, setSettings] = useState(storedSettings || DEFAULT_GAME_SETTINGS);
const navigation = useNavigation();
const handleSettingsChange = (newSettings: GameSettings) => {
setSettings(newSettings);
StorageService.set(GAME_IDS.FRUIT_NINJA, newSettings);
};
const handleToggleSettingsModal = () => {
setSettings({ ...settings, isVisible: !settings.isVisible });
};
useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<TouchableOpacity className="p-2" onPress={handleToggleSettingsModal}>
<Ionicons name="settings-outline" size={24} color={colors.text} />
</TouchableOpacity>
)
});
}, [navigation, handleToggleSettingsModal]);
return (
<View className="flex-1 bg-background">
<FruitNinja settings={settings} onSettingsChange={handleSettingsChange} />
</View>
);
}Available Games
All games use the same props interface:
// Import any game you want
import {
BlockBlast,
ConnectEmAll,
BubbleShooter,
BlockBreaker,
TileHome,
FruitNinja,
FruitMerger,
FlappyBird,
DinoJump,
DotsAndBoxes,
CandyCrush,
WhackAMole,
PacMan,
ColorsSort,
PopitFidget,
BalloonBlaster,
SpaceFighter,
WordSearch,
NumberSearch,
Tank1990,
NutsAndBolts,
StackTower,
PipeConnect,
MineSweeper,
KnifeHit,
ColorSwitch,
LudoKing,
SpiderSolitaire,
MazeRunner,
TicTacToe,
CarRacing,
BikeRacing,
SlidingNumbers,
Game2048,
Sudoku,
Snake3D,
PerfectCircle
} from 'react-native-games';
// All games accept the same props:
<GameComponent settings={settings} onSettingsChange={handleSettingsChange} />;Game Settings & Configuration
All games use the unified GameSettings interface:
interface GameSettings {
isVisible: boolean; // Settings modal visibility
enableSounds: boolean; // Sound effects toggle
enableHaptics: boolean; // Haptic feedback toggle
offset?: number; // Top offset for notch/status bar
}
// Default settings for all games
const DEFAULT_GAME_SETTINGS = {
isVisible: false,
enableSounds: true,
enableHaptics: true,
offset: 0
};Game Settings
Each game includes a built-in settings modal with a unified interface:
- Sound Effects: Toggle audio feedback on/off
- Haptic Feedback: Toggle vibration feedback on/off
- Offset: Adjust top padding for notch/status bar
All games use a centralized settings system for consistency and ease of maintenance.
📚 API Reference
Exported Constants & Types
import {
// Game IDs Enum
GAME_IDS,
// Default Settings
DEFAULT_GAME_SETTINGS,
// Games List & Mapping
GAMES_LIST,
GAMES_MAPPING,
// TypeScript Types
type GameSettings,
type GameProps,
type GameDefinition,
type GameComponent,
type GameCategory,
type GameCompletionMetrics,
// All Game Components (37 total)
BlockBlast,
ConnectEmAll,
BubbleShooter,
BlockBreaker,
TileHome,
FruitNinja,
FruitMerger,
FlappyBird,
DinoJump,
DotsAndBoxes,
CandyCrush,
WhackAMole,
PacMan,
ColorsSort,
PopitFidget,
BalloonBlaster,
SpaceFighter,
WordSearch,
NumberSearch,
Tank1990,
NutsAndBolts,
StackTower,
PipeConnect,
MineSweeper,
KnifeHit,
ColorSwitch,
LudoKing,
SpiderSolitaire,
MazeRunner,
TicTacToe,
CarRacing,
BikeRacing,
SlidingNumbers,
Game2048,
Sudoku,
Snake3D,
PerfectCircle
} from 'react-native-games';GAME_IDS Enum
All available game identifiers:
GAME_IDS.BLOCK_BLAST; // 'block-blast'
GAME_IDS.CONNECT_EM_ALL; // 'connect-em-all'
GAME_IDS.BUBBLE_SHOOTER; // 'bubble-shooter'
GAME_IDS.BLOCK_BREAKER; // 'block-breaker'
GAME_IDS.TILE_HOME; // 'tile-home'
GAME_IDS.FRUIT_NINJA; // 'fruit-ninja'
GAME_IDS.FRUIT_MERGER; // 'fruit-merger'
GAME_IDS.FLAPPY_BIRD; // 'flappy-bird'
GAME_IDS.DINO_JUMP; // 'dino-jump'
GAME_IDS.DOTS_AND_BOXES; // 'dots-and-boxes'
GAME_IDS.CANDY_CRUSH; // 'candy-crush'
GAME_IDS.WHACK_A_MOLE; // 'whack-a-mole'
GAME_IDS.PAC_MAN; // 'pac-man'
GAME_IDS.COLORS_SORT; // 'colors-sort'
GAME_IDS.POPIT_FIDGET; // 'popit-fidget'
GAME_IDS.BALLOON_BLASTER; // 'balloon-blaster'
GAME_IDS.SPACE_FIGHTER; // 'space-fighter'
GAME_IDS.WORD_SEARCH; // 'word-search'
GAME_IDS.NUMBER_SEARCH; // 'number-search'
GAME_IDS.TANK_1990; // 'tank-1990'
GAME_IDS.NUTS_AND_BOLTS; // 'nuts-and-bolts'
GAME_IDS.STACK_TOWER; // 'stack-tower'
GAME_IDS.PIPE_CONNECT; // 'pipe-connect'
GAME_IDS.MINE_SWEEPER; // 'mine-sweeper'
GAME_IDS.KNIFE_HIT; // 'knife-hit'
GAME_IDS.COLOR_SWITCH; // 'color-switch'
GAME_IDS.LUDO_KING; // 'ludo-king'
GAME_IDS.SPIDER_SOLITAIRE; // 'spider-solitaire'
GAME_IDS.MAZE_RUNNER; // 'maze-runner'
GAME_IDS.TIC_TAC_TOE; // 'tic-tac-toe'
GAME_IDS.CAR_RACING; // 'car-racing'
GAME_IDS.BIKE_RACING; // 'bike-racing'
GAME_IDS.SLIDING_NUMBERS; // 'sliding-numbers'
GAME_IDS.GAME_2048; // 'game-2048'
GAME_IDS.SUDOKU; // 'sudoku'
GAME_IDS.SNAKE_3D; // 'snake-3d'
GAME_IDS.PERFECT_CIRCLE; // 'perfect-circle'DEFAULT_GAME_SETTINGS
Default configuration for all games:
const DEFAULT_GAME_SETTINGS = {
isVisible: false, // Settings modal visibility
enableSounds: true, // Sound effects enabled
enableHaptics: true, // Haptic feedback enabled
offset: 0 // Top offset for notch/status bar
};
// Example: Custom settings with offset
const customSettings = {
...DEFAULT_GAME_SETTINGS,
offset: 50 // Moves game elements 50px down from top
};GAMES_LIST
Array of all game definitions with metadata:
// GAMES_LIST is an array of GameDefinition objects
GAMES_LIST.forEach(game => {
console.log(game.id); // GAME_IDS enum value
console.log(game.title); // Display title
console.log(game.description); // Game description
console.log(game.category); // 'puzzle' | 'brain' | 'arcade' | 'action' | 'casual' | 'racing' | 'board' | 'adventure'
console.log(game.component); // React component
});
// Example: Find a specific game
const fruitNinja = GAMES_LIST.find(g => g.id === GAME_IDS.FRUIT_NINJA);GAMES_MAPPING
Object mapping game IDs to their components:
// Access game component by ID
const GameComponent = GAMES_MAPPING[GAME_IDS.FRUIT_NINJA];
// Render dynamically
<GameComponent settings={settings} onSettingsChange={handleChange} />;TypeScript Types
// Game settings interface
interface GameSettings {
isVisible: boolean; // Settings modal visibility
enableSounds: boolean; // Sound effects toggle
enableHaptics: boolean; // Haptic feedback toggle
offset?: number; // Optional padding from top (default: 0)
}
// Game completion metrics
interface GameCompletionMetrics {
status: 'win' | 'lose' | 'cancel';
score: string;
additionalData?: Record<string, any>; // Optional game-specific data
}
// Game component props
interface GameProps {
settings: GameSettings;
onSettingsChange?: (settings: GameSettings) => void;
onEndGame?: (metrics: GameCompletionMetrics) => void;
onReplayGame?: () => void;
onShare?: () => void;
onShowLeaderboard?: () => void;
}📄 License
This library is available under a dual licensing model:
🆓 Non-Commercial License (Free)
- ✅ Personal projects and learning
- ✅ Educational use and research
- ✅ Open source projects (non-commercial)
- ✅ Portfolio and demonstration apps
💼 Commercial License (Paid)
Required for commercial use including:
- 🏢 Commercial applications and products
- 💰 Revenue-generating projects
- 🏪 App Store or Play Store apps with monetization
- 🏭 Enterprise and business applications
Commercial licensing includes:
- Full commercial usage rights
- Priority support and maintenance
- Custom feature development consideration
- Optional attribution removal
Get Commercial License: 📧 Email: [email protected]
See the complete LICENSE file for detailed terms and definitions.
🙏 Acknowledgments
- Built with React Native Skia for high-performance graphics
- Powered by React Native Reanimated for smooth animations
- Enhanced with React Native Worklets for high-performance JavaScript
- State management with Zustand and Immer
- Created with create-react-native-library
📞 Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 🌐 Website: https://www.playtura.in
Made with ❤️ by Niranjan Devasani
