react-native-games 0.8.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +474 -176
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +9 -14
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +24 -17
- package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +47 -47
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrush.js +16 -6
- package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +4 -6
- package/lib/module/games/candy-crush/CandyCrushStore.js.map +1 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +32 -65
- package/lib/module/games/candy-crush/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/{color-sort/ColorSort.js → colors-sort/ColorsSort.js} +37 -24
- package/lib/module/games/colors-sort/ColorsSort.js.map +1 -0
- package/lib/module/games/{color-sort/ColorSortConstants.js → colors-sort/ColorsSortConstants.js} +11 -7
- package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -0
- package/lib/module/games/{color-sort/ColorSortService.js → colors-sort/ColorsSortService.js} +1 -1
- package/lib/module/games/colors-sort/ColorsSortService.js.map +1 -0
- package/lib/module/games/{color-sort/ColorSortStore.js → colors-sort/ColorsSortStore.js} +20 -21
- package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -0
- package/lib/module/games/{color-sort → colors-sort}/components/ColorContainer.js +4 -4
- package/lib/module/games/colors-sort/components/ColorContainer.js.map +1 -0
- package/lib/module/games/{color-sort → colors-sort}/components/GameBackground.js +1 -1
- package/lib/module/games/colors-sort/components/GameBackground.js.map +1 -0
- package/lib/module/games/{color-sort → colors-sort}/components/ScoreBoard.js +14 -22
- package/lib/module/games/colors-sort/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/colors-sort/components/index.js.map +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +23 -23
- package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +16 -6
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +14 -12
- package/lib/module/games/dino-jump/DinoJumpService.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +14 -20
- package/lib/module/games/dino-jump/DinoJumpStore.js.map +1 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +15 -6
- package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +65 -42
- package/lib/module/games/dino-jump/components/GameBackground.js.map +1 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +48 -50
- package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBird.js +9 -14
- package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +53 -29
- package/lib/module/games/flappy-bird/FlappyBirdStore.js.map +1 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +3 -2
- package/lib/module/games/flappy-bird/components/GameArea.js.map +1 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +10 -43
- package/lib/module/games/flappy-bird/components/GameBackground.js.map +1 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +65 -68
- package/lib/module/games/flappy-bird/components/Pipes.js.map +1 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +23 -22
- package/lib/module/games/flappy-bird/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMerger.js +13 -5
- package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +4 -4
- package/lib/module/games/fruit-merger/FruitMergerStore.js +5 -8
- package/lib/module/games/fruit-merger/FruitMergerStore.js.map +1 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +5 -25
- package/lib/module/games/fruit-merger/components/GameArea.js.map +1 -1
- package/lib/module/games/fruit-merger/components/GameBackground.js +40 -19
- package/lib/module/games/fruit-merger/components/GameBackground.js.map +1 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +9 -17
- package/lib/module/games/fruit-merger/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinja.js +9 -14
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +1 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +70 -45
- package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +47 -46
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/game-2048/Game2048.js +81 -52
- package/lib/module/games/game-2048/Game2048.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +18 -18
- package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Store.js +10 -12
- package/lib/module/games/game-2048/Game2048Store.js.map +1 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +25 -43
- package/lib/module/games/game-2048/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunner.js +22 -14
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerService.js +19 -17
- package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +32 -42
- package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidget.js +27 -38
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +6 -44
- package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +31 -45
- package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +18 -20
- package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +4 -5
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js.map +1 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +26 -28
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/snake/Snake.js +23 -26
- package/lib/module/games/snake/Snake.js.map +1 -1
- package/lib/module/games/snake/SnakeConstants.js +2 -2
- package/lib/module/games/snake/SnakeStore.js +4 -6
- package/lib/module/games/snake/SnakeStore.js.map +1 -1
- package/lib/module/games/snake/components/ScoreBoard.js +10 -16
- package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighter.js +16 -17
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +7 -6
- package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +25 -11
- package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -1
- package/lib/module/games/space-fighter/components/GameArea.js +1 -7
- package/lib/module/games/space-fighter/components/GameArea.js.map +1 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +47 -48
- package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMole.js +12 -5
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +37 -30
- package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +32 -38
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/helpers/AnimationFrame.js.map +1 -0
- package/lib/module/helpers/AnimationTracker.js.map +1 -0
- package/lib/module/helpers/ErrorHandler.js.map +1 -0
- package/lib/module/helpers/GameControlButton.js.map +1 -0
- package/lib/module/helpers/GameOverModal.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/GameSettingsModal.js +2 -2
- package/lib/module/helpers/GameSettingsModal.js.map +1 -0
- package/lib/module/helpers/ParticleBlast.js.map +1 -0
- package/lib/module/helpers/ScoreBoardContainer.js +34 -0
- package/lib/module/helpers/ScoreBoardContainer.js.map +1 -0
- package/lib/module/{shared/helpers → helpers}/index.js +1 -1
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +49 -10
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +108 -82
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/SoundsService.js.map +1 -1
- package/lib/module/services/UtilsService.js +32 -0
- package/lib/module/services/UtilsService.js.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +4 -1
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +4 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -0
- package/lib/typescript/src/games/{color-sort/ColorSortConstants.d.ts → colors-sort/ColorsSortConstants.d.ts} +8 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/{color-sort/ColorSortService.d.ts → colors-sort/ColorsSortService.d.ts} +1 -1
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts.map +1 -0
- package/lib/typescript/src/games/{color-sort/ColorSortStore.d.ts → colors-sort/ColorsSortStore.d.ts} +6 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -0
- package/lib/typescript/src/games/{color-sort → colors-sort}/components/ColorContainer.d.ts +1 -1
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +7 -0
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/colors-sort/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +6 -4
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +4 -4
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +3 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +1 -1
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +1 -1
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +1 -0
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +1 -1
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/fruit-merger/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -1
- package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +3 -3
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +1 -0
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +2 -5
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +2 -2
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/Snake.d.ts +1 -1
- package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/SnakeConstants.d.ts +2 -2
- package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +2 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +5 -1
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/helpers/AnimationFrame.d.ts.map +1 -0
- package/lib/typescript/src/helpers/AnimationTracker.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ErrorHandler.d.ts.map +1 -0
- package/lib/typescript/src/helpers/GameControlButton.d.ts.map +1 -0
- package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/{shared/helpers → helpers}/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ParticleBlast.d.ts.map +1 -0
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +9 -0
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -0
- package/lib/typescript/src/{shared/helpers → helpers}/index.d.ts +2 -1
- package/lib/typescript/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +8 -2
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +3 -33
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/SoundsService.d.ts +1 -1
- package/lib/typescript/src/services/UtilsService.d.ts +38 -0
- package/lib/typescript/src/services/UtilsService.d.ts.map +1 -0
- package/package.json +1 -1
- package/lib/module/games/color-sort/ColorSort.js.map +0 -1
- package/lib/module/games/color-sort/ColorSortConstants.js.map +0 -1
- package/lib/module/games/color-sort/ColorSortService.js.map +0 -1
- package/lib/module/games/color-sort/ColorSortStore.js.map +0 -1
- package/lib/module/games/color-sort/components/ColorContainer.js.map +0 -1
- package/lib/module/games/color-sort/components/GameBackground.js.map +0 -1
- package/lib/module/games/color-sort/components/ScoreBoard.js.map +0 -1
- package/lib/module/games/color-sort/components/index.js.map +0 -1
- package/lib/module/shared/helpers/AnimationFrame.js.map +0 -1
- package/lib/module/shared/helpers/AnimationTracker.js.map +0 -1
- package/lib/module/shared/helpers/ErrorHandler.js.map +0 -1
- package/lib/module/shared/helpers/GameControlButton.js.map +0 -1
- package/lib/module/shared/helpers/GameOverModal.js.map +0 -1
- package/lib/module/shared/helpers/GameSettingsModal.js.map +0 -1
- package/lib/module/shared/helpers/ParticleBlast.js.map +0 -1
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js +0 -81
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +0 -1
- package/lib/module/shared/helpers/index.js.map +0 -1
- package/lib/typescript/src/games/color-sort/ColorSort.d.ts +0 -4
- package/lib/typescript/src/games/color-sort/ColorSort.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/ColorSortConstants.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/ColorSortService.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/ColorSortStore.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/components/ColorContainer.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/components/GameBackground.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts +0 -3
- package/lib/typescript/src/games/color-sort/components/ScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/games/color-sort/components/index.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +0 -42
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/shared/helpers/index.d.ts.map +0 -1
- /package/lib/module/games/{color-sort → colors-sort}/components/index.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/AnimationFrame.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/AnimationTracker.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/ErrorHandler.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/GameControlButton.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/GameOverModal.js +0 -0
- /package/lib/module/{shared/helpers → helpers}/ParticleBlast.js +0 -0
- /package/lib/typescript/src/games/{color-sort → colors-sort}/components/GameBackground.d.ts +0 -0
- /package/lib/typescript/src/games/{color-sort → colors-sort}/components/index.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/AnimationFrame.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/AnimationTracker.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/ErrorHandler.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/GameControlButton.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/GameOverModal.d.ts +0 -0
- /package/lib/typescript/src/{shared/helpers → helpers}/ParticleBlast.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,25 +1,369 @@
|
|
|
1
1
|
# 🎮 react-native-games
|
|
2
2
|
|
|
3
|
-
**react-native-games** is a collection of
|
|
3
|
+
**react-native-games** is a collection of 14 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, Android, and Web platforms.
|
|
4
|
+
|
|
5
|
+
<table style="border: none;">
|
|
6
|
+
<tr style="border: none;">
|
|
7
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
8
|
+
|
|
9
|
+
### 🚀 High Performance
|
|
10
|
+
- 60fps gameplay with React Native Skia
|
|
11
|
+
- Optimized animations using Reanimated 3
|
|
12
|
+
- Delta time physics loops
|
|
13
|
+
- React.memo optimizations
|
|
14
|
+
- Minimal re-renders with direct store subscriptions
|
|
15
|
+
|
|
16
|
+
</td>
|
|
17
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
18
|
+
|
|
19
|
+
### 📱 Cross-Platform
|
|
20
|
+
- iOS, Android, and Web support
|
|
21
|
+
- Consistent performance across platforms
|
|
22
|
+
- Responsive design for all screen sizes
|
|
23
|
+
- Dynamic offset handling for notches
|
|
24
|
+
- Adaptive UI components
|
|
25
|
+
|
|
26
|
+
</td>
|
|
27
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
28
|
+
|
|
29
|
+
### 🎵 Rich Audio & Haptics
|
|
30
|
+
- Sound effects and speech synthesis
|
|
31
|
+
- Haptic feedback for immersive experience
|
|
32
|
+
- Configurable audio settings
|
|
33
|
+
- Per-game sound customization
|
|
34
|
+
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr style="border: none;">
|
|
38
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
39
|
+
|
|
40
|
+
### 🎯 Customizable
|
|
41
|
+
- Multiple difficulty levels
|
|
42
|
+
- Adjustable game parameters
|
|
43
|
+
- Persistent settings storage
|
|
44
|
+
- Unified settings interface
|
|
45
|
+
|
|
46
|
+
</td>
|
|
47
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
48
|
+
|
|
49
|
+
### 🎮 Game Features
|
|
50
|
+
- Physics simulation and collisions
|
|
51
|
+
- Particle systems and visual effects
|
|
52
|
+
- Procedural generation (mazes, obstacles)
|
|
53
|
+
- Score systems and achievements
|
|
54
|
+
- Progressive difficulty scaling
|
|
55
|
+
|
|
56
|
+
</td>
|
|
57
|
+
<td width="33%" style="border: none; vertical-align: top;">
|
|
58
|
+
|
|
59
|
+
### 🛠️ Developer Friendly
|
|
60
|
+
- TypeScript support throughout
|
|
61
|
+
- Shared components (GameControlButton, ScoreBoard)
|
|
62
|
+
- Consistent API across all games
|
|
63
|
+
- Easy integration and customization
|
|
64
|
+
- Comprehensive documentation
|
|
65
|
+
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
</table>
|
|
4
69
|
|
|
5
70
|
## 🎯 Available Games
|
|
6
71
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
72
|
+
<table>
|
|
73
|
+
<tr>
|
|
74
|
+
<td width="50%" style="vertical-align: top;">
|
|
75
|
+
<table style="border: none;">
|
|
76
|
+
<tr style="border: none;">
|
|
77
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
78
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/fruit-ninja.png" alt="Fruit Ninja" width="100"/>
|
|
79
|
+
</td>
|
|
80
|
+
<td style="vertical-align: top; border: none;">
|
|
81
|
+
|
|
82
|
+
**🍎 Fruit Ninja**
|
|
83
|
+
Slice flying fruits with finger swipes - avoid the bombs!
|
|
84
|
+
|
|
85
|
+
• Fixed 60-second gameplay sessions
|
|
86
|
+
• Physics-based slicing with particle effects and combo system
|
|
87
|
+
• Difficulty affects fruit spawn rate and bomb frequency
|
|
88
|
+
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
</table>
|
|
92
|
+
</td>
|
|
93
|
+
<td width="50%" style="vertical-align: top;">
|
|
94
|
+
<table style="border: none;">
|
|
95
|
+
<tr style="border: none;">
|
|
96
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
97
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/candy-crush.png" alt="Candy Crush" width="100"/>
|
|
98
|
+
</td>
|
|
99
|
+
<td style="vertical-align: top; border: none;">
|
|
100
|
+
|
|
101
|
+
**🍬 Candy Crush**
|
|
102
|
+
Match colorful candies in this puzzle game
|
|
103
|
+
|
|
104
|
+
• Match-3 puzzle with colorful candies
|
|
105
|
+
• Create special candies with 4+ matches
|
|
106
|
+
• Cascading combos and satisfying animations
|
|
107
|
+
• Difficulty affects level objectives and move limits
|
|
108
|
+
|
|
109
|
+
</td>
|
|
110
|
+
</tr>
|
|
111
|
+
</table>
|
|
112
|
+
</td>
|
|
113
|
+
</tr>
|
|
114
|
+
<tr>
|
|
115
|
+
<td width="50%" style="vertical-align: top;">
|
|
116
|
+
<table style="border: none;">
|
|
117
|
+
<tr style="border: none;">
|
|
118
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
119
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/flappy-bird.png" alt="Flappy Bird" width="100"/>
|
|
120
|
+
</td>
|
|
121
|
+
<td style="vertical-align: top; border: none;">
|
|
122
|
+
|
|
123
|
+
**🐦 Flappy Bird**
|
|
124
|
+
Navigate bird through pipes with precise timing
|
|
125
|
+
|
|
126
|
+
• Classic tap-to-flap mechanics with gravity physics
|
|
127
|
+
• Navigate through pipes with pixel-perfect collision
|
|
128
|
+
• Progressive difficulty with increasing pipe speed
|
|
129
|
+
• Difficulty affects pipe gap size and spawn frequency
|
|
130
|
+
|
|
131
|
+
</td>
|
|
132
|
+
</tr>
|
|
133
|
+
</table>
|
|
134
|
+
</td>
|
|
135
|
+
<td width="50%" style="vertical-align: top;">
|
|
136
|
+
<table style="border: none;">
|
|
137
|
+
<tr style="border: none;">
|
|
138
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
139
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/colors-sort.png" alt="Colors Sort" width="100"/>
|
|
140
|
+
</td>
|
|
141
|
+
<td style="vertical-align: top; border: none;">
|
|
142
|
+
|
|
143
|
+
**🎨 Colors Sort**
|
|
144
|
+
Sort colored liquids into matching tubes
|
|
145
|
+
|
|
146
|
+
• Sort colored liquids into matching tubes
|
|
147
|
+
• Logic puzzle with increasing complexity
|
|
148
|
+
• Satisfying pour animations and sound effects
|
|
149
|
+
• Difficulty affects number of tubes and colors
|
|
150
|
+
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</table>
|
|
154
|
+
</td>
|
|
155
|
+
</tr>
|
|
156
|
+
<tr>
|
|
157
|
+
<td width="50%" style="vertical-align: top;">
|
|
158
|
+
<table style="border: none;">
|
|
159
|
+
<tr style="border: none;">
|
|
160
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
161
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/dino-jump.png" alt="Dino Jump" width="100"/>
|
|
162
|
+
</td>
|
|
163
|
+
<td style="vertical-align: top; border: none;">
|
|
164
|
+
|
|
165
|
+
**🦖 Dino Jump**
|
|
166
|
+
Chrome offline dino game - jump to avoid obstacles!
|
|
167
|
+
|
|
168
|
+
• Endless runner with tap-to-jump mechanics
|
|
169
|
+
• Collect stars for extra lives (max 3 lives)
|
|
170
|
+
• Game durations: easy 2 mins, medium 3 mins, hard 5 mins
|
|
171
|
+
• Dynamic ground height based on device offset (150px or 250px)
|
|
172
|
+
• Difficulty affects obstacle spawn rate and game speed
|
|
173
|
+
|
|
174
|
+
</td>
|
|
175
|
+
</tr>
|
|
176
|
+
</table>
|
|
177
|
+
</td>
|
|
178
|
+
<td width="50%" style="vertical-align: top;">
|
|
179
|
+
<table style="border: none;">
|
|
180
|
+
<tr style="border: none;">
|
|
181
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
182
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/popit-fidget.png" alt="Popit Fidget" width="100"/>
|
|
183
|
+
</td>
|
|
184
|
+
<td style="vertical-align: top; border: none;">
|
|
185
|
+
|
|
186
|
+
**🫧 Popit Fidget**
|
|
187
|
+
Pop satisfying bubbles in this relaxing fidget toy game
|
|
188
|
+
|
|
189
|
+
• Relaxing bubble popping with satisfying sound effects
|
|
190
|
+
• Different bubble shapes and colors for variety
|
|
191
|
+
• Difficulty affects bubble responsiveness and patterns
|
|
192
|
+
|
|
193
|
+
</td>
|
|
194
|
+
</tr>
|
|
195
|
+
</table>
|
|
196
|
+
</td>
|
|
197
|
+
</tr>
|
|
198
|
+
<tr>
|
|
199
|
+
<td width="50%" style="vertical-align: top;">
|
|
200
|
+
<table style="border: none;">
|
|
201
|
+
<tr style="border: none;">
|
|
202
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
203
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/whack-a-mole.png" alt="Whack A Mole" width="100"/>
|
|
204
|
+
</td>
|
|
205
|
+
<td style="vertical-align: top; border: none;">
|
|
206
|
+
|
|
207
|
+
**🐱 Whack A Mole**
|
|
208
|
+
Whack cute cats popping from holes - fast reflexes needed!
|
|
209
|
+
|
|
210
|
+
• Cat spawn intervals: easy 2000ms, medium 1500ms, hard 1000ms
|
|
211
|
+
• Cat visible duration: easy 2500ms, medium 2000ms, hard 1500ms
|
|
212
|
+
• Grid sizes: easy/medium 3x3, hard 4x4
|
|
213
|
+
|
|
214
|
+
</td>
|
|
215
|
+
</tr>
|
|
216
|
+
</table>
|
|
217
|
+
</td>
|
|
218
|
+
<td width="50%" style="vertical-align: top;">
|
|
219
|
+
<table style="border: none;">
|
|
220
|
+
<tr style="border: none;">
|
|
221
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
222
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/balloon-blaster.png" alt="Balloon Blaster" width="100"/>
|
|
223
|
+
</td>
|
|
224
|
+
<td style="vertical-align: top; border: none;">
|
|
225
|
+
|
|
226
|
+
**🎈 Balloon Blaster**
|
|
227
|
+
Pop rising balloons before they escape - quick taps win!
|
|
228
|
+
|
|
229
|
+
• Fixed 60-second gameplay sessions
|
|
230
|
+
• Balloon spawn interval: 1200ms, rise speed: 0.08
|
|
231
|
+
• Physics-based balloon movement with particle effects
|
|
232
|
+
|
|
233
|
+
</td>
|
|
234
|
+
</tr>
|
|
235
|
+
</table>
|
|
236
|
+
</td>
|
|
237
|
+
</tr>
|
|
238
|
+
<tr>
|
|
239
|
+
<td width="50%" style="vertical-align: top;">
|
|
240
|
+
<table style="border: none;">
|
|
241
|
+
<tr style="border: none;">
|
|
242
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
243
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/space-fighter.png" alt="Space Fighter" width="100"/>
|
|
244
|
+
</td>
|
|
245
|
+
<td style="vertical-align: top; border: none;">
|
|
246
|
+
|
|
247
|
+
**🚀 Space Fighter**
|
|
248
|
+
Pilot spaceship through asteroid fields in endless space
|
|
249
|
+
|
|
250
|
+
• Horizontal drag controls with smooth spacecraft movement
|
|
251
|
+
• Dynamic spacecraft positioning based on device offset
|
|
252
|
+
• Progressive difficulty with asteroid spawn intervals
|
|
253
|
+
• 1-second collision immunity after each hit
|
|
254
|
+
• Difficulty affects asteroid speed and spawn frequency
|
|
255
|
+
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
</table>
|
|
259
|
+
</td>
|
|
260
|
+
<td width="50%" style="vertical-align: top;">
|
|
261
|
+
<table style="border: none;">
|
|
262
|
+
<tr style="border: none;">
|
|
263
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
264
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/maze-runner.png" alt="Maze Runner" width="100"/>
|
|
265
|
+
</td>
|
|
266
|
+
<td style="vertical-align: top; border: none;">
|
|
267
|
+
|
|
268
|
+
**🧩 Maze Runner**
|
|
269
|
+
Navigate ball through mazes using tilt and physics controls
|
|
270
|
+
|
|
271
|
+
• Grid sizes: easy 8x8, medium 10x10, hard 12x12
|
|
272
|
+
• Procedurally generated mazes with intelligent pathfinding
|
|
273
|
+
• Game over modal only appears on maze completion (not on stop)
|
|
274
|
+
• White time display for better visibility
|
|
275
|
+
• Difficulty affects maze complexity and time limits
|
|
276
|
+
|
|
277
|
+
</td>
|
|
278
|
+
</tr>
|
|
279
|
+
</table>
|
|
280
|
+
</td>
|
|
281
|
+
</tr>
|
|
282
|
+
<tr>
|
|
283
|
+
<td width="50%" style="vertical-align: top;">
|
|
284
|
+
<table style="border: none;">
|
|
285
|
+
<tr style="border: none;">
|
|
286
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
287
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/sliding-numbers.png" alt="Sliding Numbers" width="100"/>
|
|
288
|
+
</td>
|
|
289
|
+
<td style="vertical-align: top; border: none;">
|
|
290
|
+
|
|
291
|
+
**🔢 Sliding Numbers**
|
|
292
|
+
Solve the classic 15-puzzle with numbers
|
|
293
|
+
|
|
294
|
+
• Classic 15-puzzle with numbered tiles
|
|
295
|
+
• Grid sizes: easy 3x3, medium 4x4, hard 5x5
|
|
296
|
+
• Timer challenge to solve as fast as possible
|
|
297
|
+
• Smooth tile sliding animations
|
|
298
|
+
|
|
299
|
+
</td>
|
|
300
|
+
</tr>
|
|
301
|
+
</table>
|
|
302
|
+
</td>
|
|
303
|
+
<td width="50%" style="vertical-align: top;">
|
|
304
|
+
<table style="border: none;">
|
|
305
|
+
<tr style="border: none;">
|
|
306
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
307
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/game-2048.png" alt="2048 Game" width="100"/>
|
|
308
|
+
</td>
|
|
309
|
+
<td style="vertical-align: top; border: none;">
|
|
310
|
+
|
|
311
|
+
**🎮 2048 Game**
|
|
312
|
+
Merge tiles to reach 2048 and beyond
|
|
313
|
+
|
|
314
|
+
• Swipe to merge tiles with same numbers
|
|
315
|
+
• Reach 2048 tile to win, continue for higher scores
|
|
316
|
+
• Undo moves feature for strategic gameplay
|
|
317
|
+
• Difficulty affects starting tile values and spawn rate
|
|
318
|
+
|
|
319
|
+
</td>
|
|
320
|
+
</tr>
|
|
321
|
+
</table>
|
|
322
|
+
</td>
|
|
323
|
+
</tr>
|
|
324
|
+
<tr>
|
|
325
|
+
<td width="50%" style="vertical-align: top;">
|
|
326
|
+
<table style="border: none;">
|
|
327
|
+
<tr style="border: none;">
|
|
328
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
329
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/fruit-merger.png" alt="Fruit Merger" width="100"/>
|
|
330
|
+
</td>
|
|
331
|
+
<td style="vertical-align: top; border: none;">
|
|
332
|
+
|
|
333
|
+
**🍉 Fruit Merger**
|
|
334
|
+
Merge fruits to create bigger ones
|
|
335
|
+
|
|
336
|
+
• Merge fruits to create bigger ones (watermelon evolution)
|
|
337
|
+
• Physics-based dropping and merging mechanics
|
|
338
|
+
• Combo system for multiple merges
|
|
339
|
+
• Difficulty affects merge requirements and spawn rate
|
|
340
|
+
|
|
341
|
+
</td>
|
|
342
|
+
</tr>
|
|
343
|
+
</table>
|
|
344
|
+
</td>
|
|
345
|
+
<td width="50%" style="vertical-align: top;">
|
|
346
|
+
<table style="border: none;">
|
|
347
|
+
<tr style="border: none;">
|
|
348
|
+
<td width="120" style="vertical-align: top; border: none;">
|
|
349
|
+
<img src="https://cdn.worklage.com/playtura/screenshots/snake.png" alt="Snake & Eggs" width="100"/>
|
|
350
|
+
</td>
|
|
351
|
+
<td style="vertical-align: top; border: none;">
|
|
352
|
+
|
|
353
|
+
**🐍 Snake & Eggs**
|
|
354
|
+
Classic snake game with modern touch controls
|
|
355
|
+
|
|
356
|
+
• Classic snake gameplay with modern touch controls
|
|
357
|
+
• Swipe or tap to change direction
|
|
358
|
+
• Grow by eating food, avoid walls and yourself
|
|
359
|
+
• Difficulty affects snake speed and grid size
|
|
360
|
+
|
|
361
|
+
</td>
|
|
362
|
+
</tr>
|
|
363
|
+
</table>
|
|
364
|
+
</td>
|
|
365
|
+
</tr>
|
|
366
|
+
</table>
|
|
23
367
|
|
|
24
368
|
## 📦 Installation
|
|
25
369
|
|
|
@@ -41,12 +385,11 @@ npm install @shopify/react-native-skia react-native-reanimated react-native-gest
|
|
|
41
385
|
|
|
42
386
|
Follow the installation guides for each peer dependency:
|
|
43
387
|
|
|
44
|
-
- **[@shopify/react-native-skia](https://shopify.github.io/react-native-skia/docs/getting-started/installation)** - Graphics
|
|
388
|
+
- **[@shopify/react-native-skia](https://shopify.github.io/react-native-skia/docs/getting-started/installation)** - Graphics
|
|
45
389
|
- **[react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started)** - Animations
|
|
46
390
|
- **[react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation)** - Gestures
|
|
47
|
-
- **[
|
|
48
|
-
- **[expo-
|
|
49
|
-
- **[expo-haptics](https://docs.expo.dev/versions/latest/sdk/haptics/)** - Haptic feedback
|
|
391
|
+
- **[expo-speech](https://docs.expo.dev/versions/latest/sdk/speech/)** - Sounds
|
|
392
|
+
- **[expo-haptics](https://docs.expo.dev/versions/latest/sdk/haptics/)** - Haptic
|
|
50
393
|
|
|
51
394
|
## 🚀 Usage
|
|
52
395
|
|
|
@@ -122,20 +465,20 @@ All games use the same props interface:
|
|
|
122
465
|
```tsx
|
|
123
466
|
// Import any game you want
|
|
124
467
|
import {
|
|
125
|
-
WhackAMole,
|
|
126
|
-
PopitFidget,
|
|
127
468
|
FruitNinja,
|
|
128
|
-
|
|
129
|
-
SpaceFighter,
|
|
130
|
-
BalloonBlaster,
|
|
131
|
-
DinoJump,
|
|
469
|
+
CandyCrush,
|
|
132
470
|
FlappyBird,
|
|
133
|
-
|
|
134
|
-
|
|
471
|
+
ColorsSort,
|
|
472
|
+
DinoJump,
|
|
473
|
+
PopitFidget,
|
|
474
|
+
WhackAMole,
|
|
475
|
+
BalloonBlaster,
|
|
476
|
+
SpaceFighter,
|
|
477
|
+
MazeRunner,
|
|
135
478
|
SlidingNumbers,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
479
|
+
Game2048,
|
|
480
|
+
FruitMerger,
|
|
481
|
+
Snake
|
|
139
482
|
} from 'react-native-games';
|
|
140
483
|
|
|
141
484
|
// All games accept the same props:
|
|
@@ -163,89 +506,10 @@ const DEFAULT_GAME_SETTINGS = {
|
|
|
163
506
|
difficulty: 'medium',
|
|
164
507
|
enableSounds: true,
|
|
165
508
|
enableHaptics: true,
|
|
509
|
+
offset: 0,
|
|
166
510
|
};
|
|
167
511
|
```
|
|
168
512
|
|
|
169
|
-
#### Game-Specific Behaviors
|
|
170
|
-
|
|
171
|
-
**Whack A Mole**
|
|
172
|
-
- Cat spawn intervals: easy 2000ms, medium 1500ms, hard 1000ms
|
|
173
|
-
- Cat visible duration: easy 2500ms, medium 2000ms, hard 1500ms
|
|
174
|
-
- Grid sizes: easy/medium 3x3, hard 4x4
|
|
175
|
-
|
|
176
|
-
**Popit Fidget**
|
|
177
|
-
- Relaxing bubble popping with satisfying sound effects
|
|
178
|
-
- Different bubble shapes and colors for variety
|
|
179
|
-
- Difficulty affects bubble responsiveness and patterns
|
|
180
|
-
|
|
181
|
-
**Fruit Ninja**
|
|
182
|
-
- Fixed 60-second gameplay sessions
|
|
183
|
-
- Physics-based slicing with particle effects and combo system
|
|
184
|
-
- Difficulty affects fruit spawn rate and bomb frequency
|
|
185
|
-
|
|
186
|
-
**Space Fighter**
|
|
187
|
-
- Progressive difficulty with asteroid spawn intervals
|
|
188
|
-
- Horizontal drag controls with collision immunity system
|
|
189
|
-
- Difficulty affects asteroid speed and spawn frequency
|
|
190
|
-
|
|
191
|
-
**Maze Runner**
|
|
192
|
-
- Grid sizes: easy 8x8, medium 10x10, hard 12x12
|
|
193
|
-
- Procedurally generated mazes with intelligent pathfinding
|
|
194
|
-
- Difficulty affects maze complexity and time limits
|
|
195
|
-
|
|
196
|
-
**Balloon Blaster**
|
|
197
|
-
- Fixed 60-second gameplay sessions
|
|
198
|
-
- Balloon spawn interval: 1200ms, rise speed: 0.08
|
|
199
|
-
- Physics-based balloon movement with particle effects
|
|
200
|
-
|
|
201
|
-
**Dino Jump**
|
|
202
|
-
- Endless runner with tap-to-jump mechanics
|
|
203
|
-
- Collect stars for extra lives (max 3 lives)
|
|
204
|
-
- Progressive difficulty with increasing speed
|
|
205
|
-
- Difficulty affects obstacle spawn rate and game speed
|
|
206
|
-
|
|
207
|
-
**Flappy Bird**
|
|
208
|
-
- Classic tap-to-flap mechanics with gravity physics
|
|
209
|
-
- Navigate through pipes with pixel-perfect collision
|
|
210
|
-
- Progressive difficulty with increasing pipe speed
|
|
211
|
-
- Difficulty affects pipe gap size and spawn frequency
|
|
212
|
-
|
|
213
|
-
**Snake**
|
|
214
|
-
- Classic snake gameplay with modern touch controls
|
|
215
|
-
- Swipe or tap to change direction
|
|
216
|
-
- Grow by eating food, avoid walls and yourself
|
|
217
|
-
- Difficulty affects snake speed and grid size
|
|
218
|
-
|
|
219
|
-
**Game 2048**
|
|
220
|
-
- Swipe to merge tiles with same numbers
|
|
221
|
-
- Reach 2048 tile to win, continue for higher scores
|
|
222
|
-
- Undo moves feature for strategic gameplay
|
|
223
|
-
- Difficulty affects starting tile values and spawn rate
|
|
224
|
-
|
|
225
|
-
**Sliding Numbers**
|
|
226
|
-
- Classic 15-puzzle with numbered tiles
|
|
227
|
-
- Grid sizes: easy 3x3, medium 4x4, hard 5x5
|
|
228
|
-
- Timer challenge to solve as fast as possible
|
|
229
|
-
- Smooth tile sliding animations
|
|
230
|
-
|
|
231
|
-
**Candy Crush**
|
|
232
|
-
- Match-3 puzzle with colorful candies
|
|
233
|
-
- Create special candies with 4+ matches
|
|
234
|
-
- Cascading combos and satisfying animations
|
|
235
|
-
- Difficulty affects level objectives and move limits
|
|
236
|
-
|
|
237
|
-
**Color Sort**
|
|
238
|
-
- Sort colored liquids into matching tubes
|
|
239
|
-
- Logic puzzle with increasing complexity
|
|
240
|
-
- Satisfying pour animations and sound effects
|
|
241
|
-
- Difficulty affects number of tubes and colors
|
|
242
|
-
|
|
243
|
-
**Fruit Merger**
|
|
244
|
-
- Merge fruits to create bigger ones (watermelon evolution)
|
|
245
|
-
- Physics-based dropping and merging mechanics
|
|
246
|
-
- Combo system for multiple merges
|
|
247
|
-
- Difficulty affects merge requirements and spawn rate
|
|
248
|
-
|
|
249
513
|
### Game Settings
|
|
250
514
|
|
|
251
515
|
Each game includes built-in settings screens with a unified, simplified interface:
|
|
@@ -258,48 +522,112 @@ All games use a centralized settings system for consistency and ease of maintena
|
|
|
258
522
|
|
|
259
523
|
## 📚 API Reference
|
|
260
524
|
|
|
261
|
-
###
|
|
262
|
-
|
|
263
|
-
Core game configuration and settings management.
|
|
525
|
+
### Exported Constants & Types
|
|
264
526
|
|
|
265
527
|
```tsx
|
|
266
528
|
import {
|
|
529
|
+
// Game IDs Enum
|
|
267
530
|
GAME_IDS,
|
|
531
|
+
|
|
532
|
+
// Default Settings
|
|
268
533
|
DEFAULT_GAME_SETTINGS,
|
|
269
|
-
|
|
534
|
+
|
|
535
|
+
// Games List & Mapping
|
|
536
|
+
GAMES_LIST,
|
|
537
|
+
GAMES_MAPPING,
|
|
538
|
+
|
|
539
|
+
// TypeScript Types
|
|
270
540
|
type GameSettings,
|
|
271
|
-
type GameProps
|
|
541
|
+
type GameProps,
|
|
542
|
+
type GameDefinition,
|
|
543
|
+
type GameComponent,
|
|
544
|
+
|
|
545
|
+
// All Game Components
|
|
546
|
+
FruitNinja,
|
|
547
|
+
CandyCrush,
|
|
548
|
+
FlappyBird,
|
|
549
|
+
ColorsSort,
|
|
550
|
+
DinoJump,
|
|
551
|
+
PopitFidget,
|
|
552
|
+
WhackAMole,
|
|
553
|
+
BalloonBlaster,
|
|
554
|
+
SpaceFighter,
|
|
555
|
+
MazeRunner,
|
|
556
|
+
SlidingNumbers,
|
|
557
|
+
Game2048,
|
|
558
|
+
FruitMerger,
|
|
559
|
+
Snake
|
|
272
560
|
} from 'react-native-games';
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### GAME_IDS Enum
|
|
564
|
+
|
|
565
|
+
All available game identifiers:
|
|
566
|
+
|
|
567
|
+
```tsx
|
|
568
|
+
GAME_IDS.FRUIT_NINJA // 'fruit-ninja'
|
|
569
|
+
GAME_IDS.CANDY_CRUSH // 'candy-crush'
|
|
570
|
+
GAME_IDS.FLAPPY_BIRD // 'flappy-bird'
|
|
571
|
+
GAME_IDS.COLORS_SORT // 'colors-sort'
|
|
572
|
+
GAME_IDS.DINO_JUMP // 'dino-jump'
|
|
573
|
+
GAME_IDS.POPIT_FIDGET // 'popit-fidget'
|
|
574
|
+
GAME_IDS.WHACK_A_MOLE // 'whack-a-mole'
|
|
575
|
+
GAME_IDS.BALLOON_BLASTER // 'balloon-blaster'
|
|
576
|
+
GAME_IDS.SPACE_FIGHTER // 'space-fighter'
|
|
577
|
+
GAME_IDS.MAZE_RUNNER // 'maze-runner'
|
|
578
|
+
GAME_IDS.SLIDING_NUMBERS // 'sliding-numbers'
|
|
579
|
+
GAME_IDS.GAME_2048 // 'game-2048'
|
|
580
|
+
GAME_IDS.FRUIT_MERGER // 'fruit-merger'
|
|
581
|
+
GAME_IDS.SNAKE // 'snake'
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### DEFAULT_GAME_SETTINGS
|
|
585
|
+
|
|
586
|
+
Default configuration for all games:
|
|
587
|
+
|
|
588
|
+
```tsx
|
|
589
|
+
const DEFAULT_GAME_SETTINGS = {
|
|
590
|
+
isVisible: false, // Settings modal visibility
|
|
591
|
+
difficulty: 'medium', // Game difficulty level
|
|
592
|
+
enableSounds: true, // Audio feedback enabled
|
|
593
|
+
enableHaptics: true, // Haptic feedback enabled
|
|
594
|
+
offset: 0, // Top offset for notch/status bar
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
// Example: Custom settings with offset
|
|
598
|
+
const customSettings = {
|
|
599
|
+
...DEFAULT_GAME_SETTINGS,
|
|
600
|
+
offset: 50, // Moves game elements 50px down from top
|
|
601
|
+
};
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### GAMES_LIST
|
|
273
605
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
GAME_IDS
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
GAME_IDS.DINO_JUMP
|
|
284
|
-
GAME_IDS.COLOR_SORT
|
|
285
|
-
GAME_IDS.FRUIT_MERGER
|
|
286
|
-
GAME_IDS.FLAPPY_BIRD
|
|
287
|
-
GAME_IDS.CANDY_CRUSH
|
|
288
|
-
GAME_IDS.SNAKE
|
|
289
|
-
|
|
290
|
-
// Default game settings
|
|
291
|
-
const settings = DEFAULT_GAME_SETTINGS;
|
|
292
|
-
// {
|
|
293
|
-
// isVisible: false,
|
|
294
|
-
// difficulty: 'medium',
|
|
295
|
-
// enableSounds: true,
|
|
296
|
-
// enableHaptics: true
|
|
297
|
-
// }
|
|
298
|
-
|
|
299
|
-
// Games list with metadata
|
|
300
|
-
gamesList.forEach(game => {
|
|
301
|
-
console.log(game.id, game.title, game.description);
|
|
606
|
+
Array of all game definitions with metadata:
|
|
607
|
+
|
|
608
|
+
```tsx
|
|
609
|
+
// GAMES_LIST is an array of GameDefinition objects
|
|
610
|
+
GAMES_LIST.forEach(game => {
|
|
611
|
+
console.log(game.id); // GAME_IDS enum value
|
|
612
|
+
console.log(game.title); // Display title
|
|
613
|
+
console.log(game.description); // Game description
|
|
614
|
+
console.log(game.component); // React component
|
|
302
615
|
});
|
|
616
|
+
|
|
617
|
+
// Example: Find a specific game
|
|
618
|
+
const fruitNinja = GAMES_LIST.find(g => g.id === GAME_IDS.FRUIT_NINJA);
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### GAMES_MAPPING
|
|
622
|
+
|
|
623
|
+
Object mapping game IDs to their components:
|
|
624
|
+
|
|
625
|
+
```tsx
|
|
626
|
+
// Access game component by ID
|
|
627
|
+
const GameComponent = GAMES_MAPPING[GAME_IDS.FRUIT_NINJA];
|
|
628
|
+
|
|
629
|
+
// Render dynamically
|
|
630
|
+
<GameComponent settings={settings} onSettingsChange={handleChange} />
|
|
303
631
|
```
|
|
304
632
|
|
|
305
633
|
### TypeScript Types
|
|
@@ -311,6 +639,7 @@ interface GameSettings {
|
|
|
311
639
|
difficulty: 'easy' | 'medium' | 'hard';
|
|
312
640
|
enableSounds: boolean; // Audio feedback
|
|
313
641
|
enableHaptics: boolean; // Haptic feedback
|
|
642
|
+
offset?: number; // Optional padding from top (default: 0)
|
|
314
643
|
}
|
|
315
644
|
|
|
316
645
|
// Game component props
|
|
@@ -320,37 +649,6 @@ interface GameProps {
|
|
|
320
649
|
}
|
|
321
650
|
```
|
|
322
651
|
|
|
323
|
-
## 🎨 Features
|
|
324
|
-
|
|
325
|
-
### 🚀 **High Performance**
|
|
326
|
-
- Built with React Native Skia for 60fps gameplay
|
|
327
|
-
- Optimized animations using Reanimated 3 with worklets
|
|
328
|
-
- Delta time physics loops for consistent performance
|
|
329
|
-
- React.memo optimizations and efficient state management
|
|
330
|
-
- Minimal re-renders with direct store subscriptions
|
|
331
|
-
|
|
332
|
-
### 🎵 **Rich Audio & Haptics**
|
|
333
|
-
- Sound effects and speech synthesis
|
|
334
|
-
- Haptic feedback for immersive experience
|
|
335
|
-
- Configurable audio settings
|
|
336
|
-
|
|
337
|
-
### 🎯 **Customizable**
|
|
338
|
-
- Multiple difficulty levels
|
|
339
|
-
- Adjustable game parameters
|
|
340
|
-
- Persistent settings storage
|
|
341
|
-
|
|
342
|
-
### 📱 **Cross-Platform**
|
|
343
|
-
- iOS and Android support
|
|
344
|
-
- Consistent performance across devices
|
|
345
|
-
- Responsive design for different screen sizes
|
|
346
|
-
|
|
347
|
-
### 🎮 **Game Features**
|
|
348
|
-
- **Physics Simulation**: Realistic movement and collisions
|
|
349
|
-
- **Particle Systems**: Visual effects and animations
|
|
350
|
-
- **Procedural Generation**: Dynamic content (mazes, obstacles)
|
|
351
|
-
- **Score Systems**: Leaderboards and achievements
|
|
352
|
-
- **Progressive Difficulty**: Adaptive challenge levels
|
|
353
|
-
|
|
354
652
|
## 📄 License
|
|
355
653
|
|
|
356
654
|
This library is available under a **dual licensing model**:
|