Build mobile games and game-like interactive experiences in React Native and Expo. Use when Codex is creating or refactoring arcade, puzzle, casual, action, physics-based, or animation-heavy gameplay, including Expo game setup with the with-reanimated template, sprite-sheet generation and extraction, frame-based animation, touch controls, simple collision and physics loops, score and game-state systems, and cross-platform verification on web plus iOS and Android.
./references/setup-and-loop.md -- Expo bootstrap, worklets setup, engine selection, game loop order, physics rules, packages, and performance checks./references/assets-and-animation.md -- sprite-sheet prompt templates, extraction workflow, naming, animation state mapping, and validation checklist./scripts/extract_sprites.py -- connected-component sprite extractor with background removal and optional frame normalization./scripts/normalize_animation_frames.py -- shared-scale frame normalizer with optional anchor frame locking for existing charactersFor any new mobile game task, read both reference files before planning implementation or calling project tools:
./references/setup-and-loop.md first../references/assets-and-animation.md second.Do not stop after reading only . The asset reference is also mandatory for almost every real game because it covers sprite-sheet prompting, extraction, and normalization.
setup-and-loop.mdThe only acceptable exception is a deliberately art-free prototype that uses simple geometric placeholder shapes and no image generation. When in doubt, read both references anyway.
./references/setup-and-loop.md, then read ./references/assets-and-animation.md.mobile_app_init(..., example="with-reanimated", with_tailwind=False) for animation-heavy or gesture-heavy game projects.[email protected] and put "react-native-worklets/plugin" last in babel.config.js. Never add "react-native-reanimated/plugin".react-native-game-engine for most 2D arcade or puzzle loops@shopify/react-native-skia for custom 2D drawing and effectsexpo-gl plus three for 3D or GL scenesmatter-js only when the game truly needs richer physicsgenerate_image for one whole animation strip at once, not one frame at a time, so character identity and proportions stay consistent../scripts/extract_sprites.py, then standardize them with ./scripts/normalize_animation_frames.py when the game needs fixed frame sizes or an exact existing idle anchor.assets/images/.generate_image for sprite sheets and explicitly ask for multiple states, transparent background, and large spacing between poses or items. Do not accept a single hero illustration when the game needs animation frames.building-ui as well.data-fetching for the network layer.use-dom.react-native-worklets/plugin correctly.generate_image, split cleanly, backgrounds are transparent, and per-entity frames share one canvas size with one global scale.