TradeRun is an interactive 3D endless runner that gamifies stock market trading. Built with Unity and C#, the game challenges players to make real-time buy and sell decisions by swiping, all while navigating a dynamic, procedurally generated world. It integrates backend services like Firebase for leaderboards and Google Mobile Ads for monetization, delivering a complete and engaging mobile gaming experience.
- 📱 iOS App Store: Download on the App Store
- 🏠 Official Website: TradeRun Landing Page
TradeRun's architecture is designed for a responsive and state-driven gameplay experience, leveraging modern Unity features and robust backend services.
- Game Engine: Unity 3D
- Programming Language: C#
- UI Framework: Unity UI with TextMeshPro
- Input System: Unity's Enhanced Touch API for swipe gestures and the new Input System for keyboard controls.
- Backend Services:
- Firebase Firestore: Powers the real-time global leaderboard and syncs player progression data.
- Firebase Authentication: Manages user accounts and identity.
- Google Mobile Ads: Integrated for banner, interstitial, and rewarded video ads.
- Key Technical Implementations:
- State-Driven UI Management: A centralized
GameUIManagercontrols the flow between various game states (main menu, gameplay, pause, game over), ensuring a clean separation of concerns. - Procedural World Generation: The
WorldGeneratorclass dynamically creates the game environment and provides real-time price data, ensuring unique runs every time. - Event-Driven Systems: Decoupled components communicate through C# events, such as portfolio updates (
onAvgPriceUpdateEvent) and tutorial actions. - Contextual Guidance System: An intelligent
CheeringManagerprovides players with dynamic, real-time hints and feedback based on their in-game actions and market conditions.
- State-Driven UI Management: A centralized
- Intuitive Swipe Controls: Buy, sell, and switch lanes with simple and responsive swipe gestures.
- Dynamic Trading Simulation: Navigate a 3D world where the path represents real-time stock chart data, including Bollinger Bands.
- Comprehensive Tutorial: An in-depth, multi-panel
GuideManageronboarding new players to the core mechanics. - Player Progression & Levels: Earn cash from profitable trades to level up and unlock new milestones.
- Global Leaderboards: Compete with players worldwide for the highest rank, powered by Firebase.
- Monetization Ready: Fully integrated with Google Mobile Ads for rewarded videos and other ad formats.
- Unity Hub with a Unity 2021.3 LTS (or newer) version installed.
- Android Build Support and iOS Build Support modules installed in Unity.
- A configured Firebase project with Authentication and Firestore enabled.
- A configured Google AdMob account.
-
Clone the repository:
git clone https://github.com/kanchana123/traderun.git cd traderun -
Open the project in Unity Hub:
- Launch Unity Hub.
- Click "Add" and navigate to the cloned
traderundirectory. - Select the project to open it in the Unity Editor.
-
Configure Firebase:
- Download your
google-services.json(for Android) andGoogleService-Info.plist(for iOS) from your Firebase project settings. - Place
google-services.jsonin theAssets/directory. - Place
GoogleService-Info.plistin theAssets/directory.
- Download your
-
Resolve Dependencies:
- The project uses the External Dependency Manager for Unity (EDM4U) to handle Firebase and AdMob libraries.
- Upon opening the project, the resolver should run automatically. You can also force it to run by navigating to
Assets > External Dependency Manager > Android Resolver > Force ResolveandAssets > External Dependency Manager > iOS Resolver > Install Cocoapods.
-
Run the Game:
- Open the main game scene (e.g., located in
Assets/Scenes/). - Press the "Play" button in the Unity Editor to start the game.
- Open the main game scene (e.g., located in
This project is licensed under the GPLv3 License. See the LICENSE file for details.