قالب الألعاب
Roofrail Endless Runner Game App
An Expo / React Native endless runner: swipe across three lanes of a rail yard at dusk, jump barriers, slide under signals, collect coins for outfits, finish missions and climb a weekly board. Plays on sample data out of the box.
- 10 شاشات
- iOS وAndroid
- بيانات تجريبية
- حُدّث في 29 أكتوبر 2026
- إصدار موثّق
نسخ مجاني · الشيفرة كاملة · دون بطاقة ائتمان
الشاشات
6 شاشات من التطبيق الفعلي.
ما الذي يتضمنه
- Playable in the first second: the game is the home screen, and the first swipe starts the run
- A pure, tested engine: a seeded track with a free lane in every row, jumps, slides, side bumps, a 3-minute speed ramp
- The yard at dusk, freight cars, signals and eight runners, all drawn in code with react-native-svg
- Game feel: hit-stop, screen shake, a crash flash, particles, score pops and haptics, all calm under reduce motion
- Missions counted from real runs, a 7-day daily reward, and an outfit shop paid in coins
- A weekly board of rivals drawn in their outfits, and the phone's 10 longest runs; on Supabase the server times each run
عن هذا القالب
Overview
Roofrail is an endless runner built on Expo SDK 57 and React Native with the FluxNative kernel. The first screen is the game: a rail yard at dusk seen from behind the runner, three tracks running to the horizon, and the first swipe starts the run. Swipe left or right to change lane, up to jump a barrier, down to slide under a signal gantry; freight cars take a lane change. The yard speeds up from 9 to 18 m/s over three minutes.
With .env blank the game runs in sample mode: a sample player with a best of 1,842 m, 3,120 coins, two outfits, ten recent runs, missions half done and day 3 of the daily reward waiting. Everything the player does is kept on the device. Setting the Supabase values turns on the weekly board; setting the RevenueCat keys sells Plus.
Key features
The game: ready, running, paused and over on one full-bleed screen, with the distance, coins and best in the HUD and a medal for each distance band at the end
Rules in a pure engine (engine.ts), unit-tested: every row of obstacles leaves a passable lane, the first hazard is more than 1.5 s away, walls of three only after 400 m
Shop: eight outfits, each with its own headwear (a cap, a beanie, headphones, the hood up, a bucket hat, a headlamp, a visor, goggles), some with a backpack, a scarf or a light trail, bought with coins; the runner shown big on the yard
Missions: three at a time from real runs (jump 12 barriers in one run, collect 300 coins, run 500 m without jumping…), each a step harder the next time
Daily reward: a 7-day ladder claimed once per device date; a skipped day waits instead of starting over
Leaderboard: this week's board, rivals drawn as runners in their outfits and your place among them (a sample crew until Supabase is connected), and the phone's ten longest runs
How to play: the three swipes drawn with the game's own sprites
Settings: sound effects, vibration, reduce motion, Plus, How to play, About, Terms, Privacy and Delete my data
Screens
10 screens: the game (ready, running, paused, over), Shop, Missions, Leaderboard, How to play, Roofrail Plus, Settings, About, Terms of Use and Privacy Policy. One stack with no tab bar; the pushed screens follow the iOS 26 look in light and dark, the game keeps its dusk palette in both.
Game and backend
One requestAnimationFrame loop while running, a pure step(run, dt) with dt clamped to 0.05 s, seeded randomness, swipes through PanResponder (touch, mouse and the preview's taps)
The game folder reads app data through one hook (useGameProgress), so it lifts into another app
Weekly board on Supabase: each player reads only their own rows, one anonymous sign-in per device, names made of the game's words (no free text to moderate)
The server times every run: start_run records the start, and submit_score takes each run once and refuses a distance its time cannot reach
The board's distance rule is the game's own speed curve, held to the engine by tests; nine sample runners fill the first week
Delete my data clears the device and removes the player's anonymous sign-in, name and runs from the board
Monetisation
Roofrail Plus is one non-consumable in-app purchase sold through the App Store and Google Play with RevenueCat (react-native-purchases): every outfit, including one only Plus has, and double coins on every run. Access comes from the plus entitlement only, with Restore purchase on the Plus screen. Without RevenueCat keys the Plus screen shows the intended price marked as a sample, says purchases open in the App Store version, and never grants access. No ads, no loot boxes, nothing that pays out.
Setup
Connect Supabase, apply the three migrations and allow anonymous sign-ins for the weekly board
Connect RevenueCat with a roofrail_plus product and a plus entitlement to sell Plus
Reskin the yard, the runner and the outfits in palette.ts, outfits.ts and art.tsx
Replace the sample Terms of Use and Privacy Policy with your own
ما تحصل عليه
- الشيفرة كاملة — Expo وReact Native بلغة TypeScript، كتطبيق في مساحة عملك.
- معاينة مباشرة — جرّب كل تغيير في المتصفح أو على هاتفك.
- إصدار موثّق — يُبنى وتُفتح كل شاشة دون أخطاء.
- مساعد الذكاء الاصطناعي — غيّر أي شيء بالمحادثة؛ كل تغيير يستهلك رصيدًا.
- عمليات البناء والرفع إلى المتاجر — بناء iOS وAndroid، يُرسل إلى App Store وGoogle Play من Publish.
- النسخ لا يستهلك رصيدًا — النسخ نفسه بلا تكلفة.
صُنع بإصدار أقدم من FluxNative. تعمل نسختك كما هي؛ اطلب من الوكيل تحديثها عندما تريد لغات التطبيق وعملاته وروابط «حول».
ما تحتاج إليه
- حساب FluxNative — تتسع خطة Free لتطبيقين.
- لا خادم خلفي للبدء — يعمل ببيانات تجريبية إلى أن تصل خادمك.
- Creator أو أعلى — لعمليات البناء الأصلية والرفع إلى المتاجر.
- حسابات المتاجر — Apple Developer Program (99 دولارًا أمريكيًا سنويًا) وGoogle Play (25 دولارًا أمريكيًا مرة واحدة)، للنشر.
ما الذي تتضمنه الشيفرة
- شاشات
- 10
- ملفات في نسختك
- 339
- أسطر كُتبت لهذا التطبيق
- 8,012
- مكوّنات واجهة جاهزة
- 139
نصوص التطبيق بـالإنجليزية والفيتنامية
التقنيات المستخدمة
- Expo SDK
- 57.0.22
- React Native
- 0.86.3
- React
- 19.2.8
- TypeScript
- 6.0.3
- Expo Router
- 57.0.21
- Supabase JS
- 2.112.3
- RevenueCat
- 10.9.1
من package.json لهذا الإصدار.
نظام التصميم
- العناوين
- خط النظام
- النص
- خط النظام
- الوضع الداكن فقط
- Liquid Glass
- أزرار كبسولية
- بطاقات بارزة
الإعداد بعد النسخ
تُفتح نسختك مع مساعد الذكاء الاصطناعي الذي بناها. نفّذ الخطوات بالترتيب: صِل ضمن Server ما تطلبه الخطوة، ثم أرسل كل موجّه.
Connect Supabase for the weekly board
Server › Backend › Supabase. Apply the three migrations in supabase/migrations in name order, allow anonymous sign-ins in the Supabase dashboard, and write the project URL and anon key to .env.
طلب للذكاء الاصطناعيConnect this game to my Supabase project from Server › Backend › Supabase. Write EXPO_PUBLIC_SUPABASE_URL and EXPO_PUBLIC_SUPABASE_ANON_KEY to .env. Apply the three migrations in supabase/migrations in name order: 20261027090000_weekly_board.sql, 20261027090100_weekly_board_crew.sql, then 20261027120000_weekly_board_server_timed.sql. Remind me to turn on Authentication › Sign In / Providers › Allow anonymous sign-ins in the Supabase dashboard, because each device signs in anonymously the first time it starts a run. Then check that the Leaderboard opens on This week with the nine sample runners, and that a finished run appears there under the device's board name.
Sell Roofrail Plus
Server › Monetization: a non-consumable roofrail_plus in App Store Connect and Google Play, the RevenueCat entitlement plus and the offering default with a Lifetime package, then the public SDK keys in .env.
طلب للذكاء الاصطناعيSet up Roofrail Plus through RevenueCat from Server › Monetization. Create a non-consumable in-app purchase with the product ID roofrail_plus in App Store Connect and a one-time product roofrail_plus in Google Play, an entitlement named plus that holds them, and the current offering default with a Lifetime package of it. Write EXPO_PUBLIC_REVENUECAT_IOS_KEY and EXPO_PUBLIC_REVENUECAT_ANDROID_KEY to .env, and set PLAN_PREVIEW in src/services/iap/index.ts to the price I choose. Tell me how to test a sandbox purchase and Restore purchase on a device build.
Reskin the yard and the runner
The world's colours are in src/features/game/palette.ts, the outfits and their coin prices in outfits.ts, every drawing in art.tsx and runner.tsx, the logotype in assets/logo.svg. Keep outfit ids stable once players own them.
طلب للذكاء الاصطناعيReskin Roofrail for my game. Change the world's colours in src/features/game/palette.ts to my palette, rename and recolour the eight outfits in src/features/game/outfits.ts (keep their ids), and redraw the logotype in assets/logo.svg with my game's name, then render assets/logo.png from it at 1080 px wide (src/features/game/Logo.tsx shows it). Keep the lime coin colour for coins only. Show me the ready screen and the shop after the change.
Use your own Terms and Privacy Policy
Set EXPO_PUBLIC_TERMS_URL and EXPO_PUBLIC_PRIVACY_POLICY_URL in .env, or replace the sample text of the in-app pages in src/features/legal/copy.ts with your studio's own.
طلب للذكاء الاصطناعيReplace Roofrail's sample legal text. Ask me for my studio's name and contact email, then rewrite src/features/legal/copy.ts (Terms of Use and Privacy Policy) for my studio, keeping what the game really does: progress on the device, the weekly board's anonymous sign-in and run data when Supabase is connected, Plus through the App Store and Google Play, and Delete my data. If I already host the pages, write their addresses to EXPO_PUBLIC_TERMS_URL and EXPO_PUBLIC_PRIVACY_POLICY_URL in .env instead.
كيفية استخدام هذا القالب
- استخدم القالب لتحصل على نسخة قابلة للتعديل، مع شيفرتها المصدرية، في مساحة عملك (القوالب).
- اطلب من مساعد الذكاء الاصطناعي التغييرات التي تريدها بكلمات بسيطة (العمل مع المساعد).
- جرّب كل تغيير في المعاينة المباشرة أو على هاتفك (المعاينة).
- مع خطة Creator أو أعلى، أنشئ إصدار iOS وAndroid وأرسله إلى المتاجر (نظرة عامة على النشر).
الترخيص والدعم
الترخيص
التطبيق الذي أُنشئ لك ملكك؛ وتبقى شيفرة القالب ملكًا لـ InspireUI ومرخّصة للاستخدام في تطبيقاتك (الشروط › ملكيتنا الفكرية).
المساعدة
- أدلة عن القوالب والمساعد والنشر.
- التواصل مع الدعم من المساعدة؛ نردّ عادةً خلال 1–2 يوم عمل.
- في نسختك، اسأل مساعد الذكاء الاصطناعي عن أي شاشة أو ملف.
من صنع FluxNative
سياسة الدعمأسئلة
هل هو مجاني؟
نسخ قالب مجاني لا يكلّف شيئًا، ولا حتى رصيدًا؛ والقالب Premium شراء لمرة واحدة لكل موقع. تغييرات المحادثة وعمليات البناء تستهلك رصيدًا.
ماذا أملك؟
أنت تملك التطبيق المصنوع لك. تبقى شيفرة القالب ملكًا لـInspireUI ومرخّصة للاستخدام في تطبيقاتك (Terms › Our intellectual property).
هل أحتاج إلى معرفة البرمجة؟
لا. اطلب التغييرات من المساعد بكلماتك؛ والشيفرة الكاملة متاحة متى شئت.
هل يأتي مع خادم خلفي؟
لا. يسمّي التطبيق الكامل الخادم الخلفي الذي يحتاجه وتصل خادمك ضمن Server؛ أما التصميم فيعمل ببيانات تجريبية.
هل أستطيع تغيير التصميم؟
نعم. يضبط تبويب Design لون العلامة والألوان والخطوط والزوايا دون رصيد؛ ويغيّر المساعد الباقي.
أي خطة أحتاج إليها للنشر؟
تبني خطة Creator أو أعلى وترفع إلى المتاجر بحساباتك في Apple وGoogle. يُبنى تطبيق القالب Premium على أي خطة بعد ربط موقعه.
هل أستطيع تنزيل الشيفرة؟
نعم، عبر Download source أو Push to GitHub، بعد أن تشتري مساحة عملك خطة أو رصيدًا أو قالبًا مدفوعًا. يحتاج تطبيق القالب Premium أيضًا إلى ربط موقعه.
ماذا لو صُنع بإصدار أقدم من FluxNative؟
تعمل نسختك كما هي. اطلب من المساعد تحديثها بميزات أحدث، مثل لغات التطبيق وعملاته؛ وهي آخر خطوة إعداد.
هل أنت مستعد لتجعله تطبيقك؟
ابدأ من Roofrail Endless Runner Game App وغيّر أي شيء عبر الدردشة. تتضمن نسختك الشيفرة المصدرية كاملة.
نسخ مجاني. لا حاجة إلى بطاقة ائتمان.