https://github.com/adeoja/a-gravity-platformer
A 3D Unity platformer prototype with a gravity reversal mechanic
https://github.com/adeoja/a-gravity-platformer
game-development gamedev platformer-3d platformer-game unity unity3d
Last synced: 1 day ago
JSON representation
A 3D Unity platformer prototype with a gravity reversal mechanic
- Host: GitHub
- URL: https://github.com/adeoja/a-gravity-platformer
- Owner: adeoja
- Created: 2025-10-18T18:56:48.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-19T03:58:28.000Z (9 months ago)
- Last Synced: 2025-10-19T15:51:40.347Z (9 months ago)
- Topics: game-development, gamedev, platformer-3d, platformer-game, unity, unity3d
- Language: ShaderLab
- Homepage: https://adeoja.itch.io/a-gravity-platformer
- Size: 8.07 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# a gravity platformer - Gravity Manipulation Game
A 3D Unity platformer prototype featuring unique gravity-manipulation mechanics where players can walk on ceilings and navigate challenging obstacle courses.
> **Play the game here:** [Link to game](https://adeoja.itch.io/a-gravity-platformer)
> **Game Clip:** [Link to Video](https://youtu.be/2zsQ_3-Gohs)

## 📚 About This Project
This prototype was created for an assignment requiring:
- Third-person character with animations
- 3+ moving parts (platforms, bullets, etc.)
I expanded on these requirements by implementing a gravity-flip mechanic that opens up vertical level design possibilities.
---
## 🎮 Gameplay Features
### Core Mechanics
- **Gravity Flip Ability** - Toggle gravity to walk on ceilings and reach new areas
- **Third-Person Camera** - Smooth orbital camera with mouse controls
- **Combat System** - Raycast-based shooting with crosshair targeting
- **Checkpoint System** - Progressive checkpoint saving for quick respawns
- **Moving Platforms** - Dynamic platforms triggered by player progression
- **Tutorial System** - Context-sensitive hint displays to guide players
### Controls
| Input | Action |
|-------|--------|
| **WASD** | Movement |
| **Mouse** | Camera control |
| **Space** | Jump (works on both ground and ceiling) |
| **Z** | Toggle gravity ability |
| **Left Click** | Shoot |
---
## 🏗️ Technical Architecture
### Design Patterns
- **Finite State Machine** - Clean state management for player controller
- **Singleton Pattern** - Global access for core managers (GameManager, UIManager, CheckpointSystem)
- **Component-Based Design** - Modular scripts for easy maintenance and iteration
### Key Systems
#### Player Controller
Implements a Finite State Machine with 5 states:
1. **Idle**
2. **Run**
3. **Jump**
4. **Gravity Ability** (ascending)
5. **On Ceiling** (inverted gameplay)
**Features include:**
- Camera-relative movement
- Physics-based jump mechanics
- Smooth state transitions
- Animation integration
#### Checkpoint System
- Automatic checkpoint detection based on level progression
- Position-based checkpoint ordering (z-axis)
- Respawn functionality on obstacle collision
#### Camera System
- Third-person orbital camera
- Configurable distance, height, and rotation limits
- Smooth mouse-based rotation
- Look-at offset for better player framing
---
## 📁 Project Structure
```
Scripts/
├── PlayerController.cs # Main player logic and state machine
├── CameraController.cs # Third-person camera system
├── GameManager.cs # Score tracking and level management
├── CheckpointSystem.cs # Respawn point management
├── UIManager.cs # Tutorial hints and UI displays
└── MovingPlatform.cs # Dynamic platform movement
```
---
## 🛠️ Technologies Used
- **Engine:** Unity 6000.0.56f1
---
## 🎯 Core Features Showcase
### Gravity Manipulation
Players can invert gravity to walk on ceilings, opening up vertical level design possibilities.
### State Machine Implementation
Player controller uses FSM pattern, making it easy to add new states or modify existing behaviors.
### Progressive Checkpoint System
Smart checkpoint management that automatically tracks player progress through the level.
---
## 📝 Code Highlights
- **Clean Architecture** - Well-organized, commented code suitable for team collaboration
- **Scalable Systems** - Modular design allows for easy feature additions
- **Performance Conscious** - Uses appropriate Unity lifecycle methods (FixedUpdate for physics, LateUpdate for camera)
- **Best Practices** - Proper use of SerializeField, regions, and XML documentation
---
## 🔮 Future Enhancements
Potential features for expansion:
- [ ] Multiple gravity directions (not just up/down)
- [ ] Time-based challenges
- [ ] Collectible system
- [ ] Enemy AI
- [ ] Level selection menu
- [ ] Audio system integration
- [ ] Particle effects and visual polish
---
**Note:** This is a work-in-progress portfolio project showcasing game development fundamentals and Unity engine capabilities.