Shark Escape - Android Source Code

Description
Shark Escape is an exciting, endless mobile survival game built natively for Android using Java. Players control a surfer navigating through changing ocean waters, tapping left or right to avoid unpredictable dangers.
The project features a smart, score-based progressive difficulty system. As the player's score increases, the game automatically introduces new obstacles (switching from basic lifebuoys to aggressive sharks), keeping the gameplay highly engaging and addictive!
This is a complete, production-ready project template, making it an excellent opportunity for developers and publishers looking to launch a polished game on the Google Play Store quickly.
🎮 Features Native Android Code: Built entirely in Java using a clean, lightweight custom 2D Canvas engine (SurfaceView). No heavy third-party frameworks required! Progressive Difficulty System: Game logic dynamically shifts obstacle spawns based on the score (Lifebuoys for beginners, Sharks for advanced play). AdMob Integration: Monestization-ready out of the box with a pre-configured AdMob Banner. Local High Score System: SharedPreferences integration to automatically save and display the player's best score. Audio Management: Complete sound effects handling for background music, scoring, and game-over collisions. Smooth 60 FPS Gameplay: Optimized frame rate controller matching industry standards for responsive and fluid touch controls.
🛠️ What is Included in the Package? * Complete Android Studio Source Code (Java). * Ready-to-use game assets (Sprites, background, and audio files). * Step-by-step documentation for importing, configuring, and publishing.
🎨 Easy to Reskin (Customize) The code is heavily modular and highly organized. You can easily transform this game into any other theme (car racing, space shooter, plane avoider) simply by replacing the image files (`.png`) in the drawable folder and sound files (`.mp3`) in the raw folder, without touching the core game mechanics.
Features
📋 Technical Specifications & Features
Language & Platform: 100% Native Java development, fully compatible with the latest Android Studio versions. Architecture: Structured with a dedicated Game Engine (`Runnable` loop) and `SurfaceView` implementation for lightweight performance. Dynamic Spawn Logic:Score-based asset loading that automatically cycles between standard static hazards and advanced moving obstacles. Optimized Rendering: Handled via standard Android Canvas (`drawBitmap`) ensuring high compatibility across low-end and high-end devices. State Management: Robust GameState controller smoothly switching between Menu, Playing, and Game Over states. Audio Pipeline: MediaPlayer` implementation with robust error handling (`try-catch`) preventing crashes on sound initialization. Storage:Persistent data handling using `SharedPreferences` to securely save the user's High Score. Layout & UI: Zero-action-bar theme configuration, preset to absolute vertical orientation (`portrait`) for a consistent mobile layout.
Requirements
⚙️ System Requirements
Android Studio: Bumblebee, Flamingo, Hedgehog, Jellyfish, or any newer version (Koala/Ladybug+ recommended). Language: Java (JDK 11 or JDK 17 configured in Android Studio). Minimum Android SDK:API 21 (Android 5.0 Lollipop) or higher. Target Android SDK:API 34 or API 35 (Fully compliant with the latest Google Play Store policies). Build System: Gradle (Compatible with Gradle 8.0+ wrapper included in the project). Operating System (Developer): Windows, macOS, or Linux running Android Studio.
Instructions
🚀 Setup & Customization Instructions
Follow these clear steps to get your game up and running in minutes:
Step 1: Extract and Open 1. Download and extract the `.zip` file onto your computer. 2. Open **Android Studio**, click on **File > Open**, and select the project root folder. 3. Wait for the automatic Gradle Sync to complete. Make sure you have an active internet connection for the initial build dependencies.
Step 2: Test the Game 1. Connect your Android physical device via USB (with Developer Options enabled) or open an Android Virtual Device (Emulator). 2. Click the green Run (Play) button in the top toolbar of Android Studio to compile and install the app.
Step 3: Change the Package Name & App ID
1. In the project tree view on the left, click the Gear Icon (Settings) and disable Compact Middle Packages. 2. Right-click on the `SharkEscape` package folder, select Refactor > Rename**, choose Rename Package, and type your custom name in lowercase. 3. Open `app/build.gradle` and update both the `namespace` and `applicationId` lines to match your new package name exactly. 4. Go to Build > Clean Project**, then Build > Rebuild Project.
Step 4: Add Your AdMob Unit IDs 1. Open `MainActivity.java` and locate the line with `adView.setAdUnitId(...)`. Replace the default Google test ID with your official AdMob Banner Unit ID. 2. Open `AndroidManifest.xml` and replace the `com.google.android.gms.ads.APPLICATION_ID` meta-data value with your actual AdMob App ID.
Step 5: Reskinning the Graphics & Audio 1. To change images, navigate to `app/src/main/res/drawable` and overwrite the `.png` files with your custom graphics (ensure names match exactly, like `carro_player.png`, `obstaculo.png`, and `obstaculo_boia.png`). 2. To change audio, go to `app/src/main/res/raw` and replace the audio files with your own `.mp3` tracks using the original file names.
| Author | RodrigoFerreira1991 |
|---|---|
| Category | App Templates / Android / Games / Casual |
| Price | $15 |
| Extended License | $45 |
| First Release | May 21, 2026 |
| Last Update | May 21, 2026 |
| Files included | .apk, .java, build.settings |
| Operating systems | Android 7.0, Android 8.0, Android 9.0, Android 10.0, Android 11.0, Android 12.0, Android 4.0, Android 5.0, Android 6.0 |
Categories
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit🥇
Perceptle
Perceptle is a daily browser-based game that challenges you to test your sensory intuition through five quick estimation and rhythm-based rounds.
Other · 3,205 views · 15 clicksOther · Week 47 · 3,205 views · 15 clicks
🥈
Free LinkedIn Likes From Real
Get free LinkedIn likes on your posts from real members who react by hand. No
SaaS · 3,323 views · 17 clicksSaaS · Week 47 · 3,323 views · 17 clicks
🥉
STOP GUESSING WHAT TO POST
AI that learns your brand voice and builds a month of consistent, on-brand social content: carousels, posts and hooks that sound like you, not like everyone else's AI.
SaaS · 10,823 views · 79 clicksSaaS · Week 47 · 10,823 views · 79 clicks
#4
aaas.market
407 reliable micro tools for solo founders, marketers and creators. They work in your browser
SaaS · 3,224 views · 7 clicksSaaS · Week 47 · 3,224 views · 7 clicks