Fly your jet through the city, dodge obstacles, and compete for high scores on Reddit!
Sky Racer is a fast-paced flight game built for Reddit's Developer Platform (Devvit). Pilot your jet through a bustling cityscape, perform tricks, collect rings, and climb the leaderboard!
Built for: Reddit Devvit Hackathon - Community Play Category
Live Demo: Running version 0.0.19 on r/sky_racer_game_dev
Source Code: This repository contains the latest development version with additional UI improvements
The live demo is fully functional with all core features. The source code includes additional responsive design improvements and UI polish that will be deployed in future updates.
- Smooth Flight Physics - Vertical movement with realistic controls
- Dynamic Obstacles - Buildings, cranes, floating boxes, and bonus rings
- Trick System - Barrel rolls, loops, and combos for bonus points
- Global Leaderboard - Compete with other Reddit users
- Real-time Scoring - Live score updates and multipliers
- Reddit Integration - Native user authentication and profiles
- W / โ - Fly up
- S / โ - Fly down
- A - Barrel roll (left)
- D - Speed boost
- Space - Turbo boost
- Q / E - Loop-de-loop
- Distance - Auto-scroll points
- Rings - +100 points (fly through them!)
- Obstacles - +10-30 points for passing
- Tricks - +25-100 points for barrel rolls and loops
- Combos - Up to 5x multiplier for consecutive successes
You have 3 lives. Lose one when you hit:
- Buildings
- Cranes
- Floating boxes
- The ground
- Visit the game post on Reddit
- Click to start playing
- Your scores automatically save to the leaderboard!
# Install dependencies
npm install
# Run development server
npm run dev
# Open http://localhost:3000# Login to Devvit
devvit login
# Build the game
npm run build
# Upload to Reddit
npm run devvit:upload
# Install to your test subreddit
devvit install YOUR_SUBREDDIT_NAMESee DEVVIT_SETUP.md for detailed setup instructions.
- Frontend: React + TypeScript
- Animation: Framer Motion
- Styling: Tailwind CSS + shadcn/ui
- Platform: Reddit Devvit
- Database: Redis (leaderboard)
- Build: Vite
reddit-sky-racer/
โโโ src/
โ โโโ main.tsx # Devvit app entry point
โ โโโ GamePost.tsx # Game post component
โ โโโ handlers.ts # Event handlers
โโโ components/
โ โโโ game/
โ โ โโโ JetPlane.tsx # Player component
โ โ โโโ GameObstacles.tsx # Obstacle rendering
โ โ โโโ GameUI.tsx # HUD and UI
โ โโโ ui/ # Reusable UI components
โโโ hooks/
โ โโโ useGameEngine.ts # Core game logic
โ โโโ useDevvitBridge.ts # Reddit integration
โโโ CityBackground.tsx # Animated background
โโโ App.tsx # Main game component
โโโ devvit.yaml # Devvit configuration
- Buildings (15%) - Ground-level structures to dodge
- Cranes (10%) - Construction obstacles
- Floating Boxes (60%) - Air obstacles scattered throughout
- Rings (15%) - Bonus collectibles (fly through for points!)
- Progressive challenge as you fly further
- Increasing obstacle density
- Faster scroll speed with boost
- Engine trails and sparks
- Particle effects on tricks
- Smooth animations with Framer Motion
- Parallax scrolling background
The global leaderboard tracks:
- Top 10 scores across all players
- Personal high scores
- Reddit usernames
- Real-time updates
Powered by Redis for fast, reliable score storage.
npm run dev- Start development servernpm run build- Build for productionnpm run devvit:upload- Upload to Redditnpm run devvit:playtest- Live testing with auto-reload
The game is modular and easy to extend:
- Add new obstacles in
GameObstacles.tsx - Modify physics in
useGameEngine.ts - Update scoring in the game loop
- Add power-ups or achievements
This is a hackathon submission, but feel free to:
- Report bugs
- Suggest features
- Fork and improve!
MIT License - See LICENSE file for details
- Built with Reddit Devvit
- UI components from shadcn/ui
- Animations by Framer Motion
Category: Community Play Theme: Building engaging, community-driven gaming experiences on Reddit
- Unique Mechanics - Flight-based gameplay (not another runner)
- Community Focus - Global leaderboard brings players together
- Reddit Native - Built specifically for Reddit's platform
- Addictive Gameplay - Easy to learn, hard to master
- Visual Polish - Smooth animations and effects
Ready to fly? ๐ฉ๏ธ Install Sky Racer on your subreddit and start competing!
For setup help, see DEVVIT_SETUP.md
