Space Bike is a side-scrolling physics-based Android game where you pilot a space bike through obstacle-filled levels. Tilt your device or use on-screen controls to lean the bike, and tap the screen to drive forward or reverse. Beat each level before your battery runs out!
- Objective: Reach the end of each level without crashing before the timer expires.
- Controls:
- Tilt controls — tilt your device left/right to lean the bike.
- Button controls — tap the right side of the screen to drive forward, the left side to reverse, and the center to brake.
- Slider bar — an alternative touch layout where a horizontal strip controls both steering and throttle.
- Gravity panel — in later levels you can rotate gravity in any direction (up, down, left, right) or disable it entirely. Tap the directional arrows in the top-left corner of the screen.
- Battery meter — a countdown bar at the top of the screen represents your remaining power. When it reaches zero the bike shuts down.
- Level progression — complete a level to unlock the next one. Progress is saved automatically.
| # | Name | Time Limit |
|---|---|---|
| 1 | Tutorial | 4 min 10 s |
| 2 | Level 1 | 1 min |
| 3 | Level 2 | 2 min 30 s |
| 4 | Level 3 | 2 min 30 s |
| Option | Values |
|---|---|
| Graphics detail | Low / Medium / High |
| Tilt sensitivity | Slow / Normal / Fast |
| Feedback | Vibrate / Sound |
| Control layout | Normal buttons / Slider bar |
src/main/
├── AndroidManifest.xml
├── assets/
│ ├── fonts/ # Custom fonts (space.ttf, sketch.ttf, Brushed.ttf)
│ └── doc/ # Emini Physics Engine API documentation
├── java/com/doodle/physics2d/
│ ├── full/spacebike/ # Game logic
│ │ ├── DoodleBikeMain # Main game Activity (physics loop, input, UI)
│ │ ├── Level # Level-select and settings Activity
│ │ ├── LevelControl # Level configuration (world files, gravity, timers)
│ │ ├── GameEvents # Physics event handler (collisions, win/death)
│ │ ├── SoundManager # Sound pool wrapper
│ │ └── MyCount # (stub / unused)
│ └── graphics/ # Rendering layer
│ ├── GraphicsWorld # Physics world + canvas drawing + sensor input
│ ├── SimulationView # SurfaceView that hosts the game canvas
│ └── UserImages # Bitmap loader for bike body and wheels
└── res/
├── layout/ # XML layouts (rotategame, level2, level3, …)
├── drawable/ # UI assets and shape drawables
├── raw/ # Physics world files (.phy) and audio
└── values/ # strings.xml, general.xml
- Language: Java
- Platform: Android (minSdk 7, targetSdk 20)
- Physics: Emini Physics Engine v1.3.4 by Alexander Adensamer — a 2D fixed-point rigid-body physics library
- Sensor:
SensorManager.SENSOR_ACCELEROMETERfor tilt controls - Audio:
SoundPoolfor sound effects;MediaPlayerfor music (imported but managed viaSoundManager)
- Java Development Kit (JDK) 11 or 17 — required by the Android Gradle plugin.
- Android SDK — install via Android Studio or the standalone command-line tools. Make sure
ANDROID_HOME(orANDROID_SDK_ROOT) is set. - Android SDK Platform 34 — install through Android Studio's SDK Manager or with:
sdkmanager "platforms;android-34" "build-tools;34.0.0"
If you have the Gradle wrapper installed (or generate it with gradle wrapper), you can build from the command line:
# Debug APK
./gradlew assembleDebug
# The APK will be at:
# build/outputs/apk/debug/SpaceBike-debug.apkTo create a release APK you must sign it. First create a keystore, then build:
# Generate a keystore (one-time step)
keytool -genkey -v -keystore my-release-key.jks \
-keyalg RSA -keysize 2048 -validity 10000 -alias spacebike
# Build the release APK
./gradlew assembleRelease
# Sign the APK
apksigner sign --ks my-release-key.jks \
build/outputs/apk/release/SpaceBike-release-unsigned.apk- Open the project root folder in Android Studio.
- Wait for Gradle sync to complete.
- Select Build → Build Bundle(s) / APK(s) → Build APK(s).
- The generated APK will be in
build/outputs/apk/.
# Install the debug APK on a connected device or emulator
adb install build/outputs/apk/debug/SpaceBike-debug.apk- Game development: Brian Purgert
- Physics engine: Alexander Adensamer — Emini Physics
Copyright © 2010 Brian Purgert. All rights reserved.
Physics engine copyright © 2010 Alexander Adensamer (Emini Physics). All rights reserved.