GravityTDG
About The Game
Most tower defense games ask you to destroy whatever comes at you. Gravity TD asks you to save it. Stranded cosmonauts are drifting into the gravity well of a black hole, a dying star, an uncharted planet. You can't grab them — but you can bend the forces around them. Place jet fields to nudge their orbits, brakes to bleed off their speed, and rescue-beam turrets that charge a teleport shield before it's too late.
Built with libGDX 1.12.1, the game leverages custom RK4 (Runge-Kutta 4th Order) numerical physics at a fixed 60Hz frequency to calculate smooth planetary gravity and complex force fields. With support for sophisticated multi-touch camera gestures (pan, pitch tilt, pinch-to-zoom, and axial rotation), players can navigate space arenas seamlessly.
Core Mechanic: Every wave starts with a design phase where you spend your energy budget and study trajectory previews. Then you start the wave and watch physics do the rest — turning a death spiral into a rescue orbit!
Key Features
RK4 Orbital Physics
High-precision 60Hz integration simulator modeling real inverse-square gravity wells, directional jet forces, and tangential drag profiles.
Tactical Phases
Plan out your approach in the paused Design Phase with real-time vector trajectory previews, then execute in the Play Phase with customizable time speeds.
Dynamic Repositioning
Brief Reposition Phase between waves allows you to relocate and optimize turrets at a reduced cost, adapting to new cosmonaut entry vectors.
Hybrid 3D/2D Visuals
Stunning 3D spheres rendered with Depth Mask buffers, mixed with screen-space overlays for additive glow coronae, Keplerian bands, and planetary Terminators.
Procedural Audio Synth
Immersive sub-bass looping drones and custom-synthesized SFX generated mathematically from Python audio engines, playing in 22kHz mono.
Star Progression
Sequentially unlocking levels with persistent high scores and star ratings based on your rescue performance saved directly to preferences.
Turret Specifications
Strategically spend your energy budget on two categories of turrets: force-field generators that steer orbits, and rescue-beam shooters that charge shields.
| Turret ID | Class | Subtype | Placement Cost | Effect / Description |
|---|---|---|---|---|
| jet | Field | Jet Force | 30 Energy | Pushes cosmonauts in the turret's facing direction. Rotate 360° in Design Phase to align forces. |
| brake | Field | Friction Drag | 20 Energy | Applies drag directly opposing the velocity vector, slowing down fast-orbiting targets. |
| shooter_single | Shooter | Point Beam | 40 Energy | High-strength (1.5x) rescue beam focused strictly on a single nearest cosmonaut in range. |
| shooter_multi | Shooter | Splash Area | 60 Energy | Fills shields of all cosmonauts within range simultaneously, with a lower individual recharge rate. |
Cosmonaut Reference
Different cosmonauts require tailored gravitational handling and charge speeds based on their size, speed, and shield charges.
| Type | Size | Base Speed | Stickiness | Shield Cycles | Description |
|---|---|---|---|---|---|
| cosmonaut_basic | 6 | 1.0x | 1.0 | 1 Cycle | Standard crew member. One full charge rescues them instantly. |
| cosmonaut_fast | 1 | 2.0x | 14.0 | 1 Cycle | Tiny and fragile. Charges extremely fast, but moves at double speed through orbits. |
| cosmonaut_heavy | 12 | 1.0x | 0.7 | 3 Cycles | Massive cargo vessel. Charges slowly and must undergo 3 complete charge cycles to be rescued. |
Celestial Centers & Rules
The cosmic bodies at the center of the field govern both the gravity profiles and the rules required to pull off a successful rescue:
Black Hole
Enormous gravity pull. Accompanied by Keplarian accretion disks and relativistic jets. Cosmonauts are saved immediately upon completing their shield charge anywhere in the arena.
Bright Star
Scorching corona and solar flares. Cosmonauts teleport and are saved instantly when their shield is fully charged, avoiding incineration.
Planet
Features beautiful atmospheric gradients and cloud terminators. Cosmonauts must physically land on the planet's surface after their shield has been 100% charged to be saved.
Space Station
Metallic technological outpost. Any cosmonaut that physically contacts the center station is automatically saved, regardless of their shield charge status.
Gallery