A performance-driven playable ad prototype
🔗 Play now: https://omerozerf.itch.io/fruit-hook
Fruit Hook is a short-loop action prototype built specifically for playable ads.
The project is shaped around WebGL and Luna constraints, with a clear focus on runtime stability, predictable performance, and fast iteration.
| Focus | Description |
|---|---|
| Playable-first | Designed for ad networks and playable runtimes |
| Performance | Low CPU / GPU footprint |
| Iteration speed | ScriptableObject-driven tuning |
| Stability | Luna-compatible architecture |
| Branch | Purpose |
|---|---|
main |
Core gameplay, no ScratchCard integration |
scratch-card-entegration |
Gameplay with ScratchCard erase mechanics |
- Nearly all gameplay and balance values are controlled via ScriptableObjects.
- Damage, speed, spawn rates, area sizes, and thresholds can be adjusted:
- Without touching code
- From a single, centralized configuration
- This enables rapid tuning and easy creation of playable variants.
Initial approach:
Tilemap and MeshRenderer-based map systems were planned to improve rendering performance.Problem:
These systems could not be integrated reliably with Luna, leading to unstable behavior and performance drops.
| Aspect | Solution |
|---|---|
| Map generation | Manual tile spawning |
| Tilemap / MeshRenderer | Abandoned due to Luna issues |
| Performance bottleneck | Excessive render & update cost |
| Optimization | Chunk-based culling |
| Off-screen areas | Rendering & updates disabled |
This resulted in a more stable and predictable runtime for Luna + WebGL.
- Continuous
Update()calls are minimized. - Systems are:
- State-driven
- Manually triggered
- Activated only when needed
- This significantly reduces CPU load in WebGL environments.
| Module | Responsibility |
|---|---|
| Gameplay | Sword / hook / combat logic |
| World | Map & chunk management |
| Spawning | Enemy placement logic |
| Rendering | Visibility & culling |
| Scratch | Erase mechanics |
Each module is isolated, loosely coupled, and can be disabled independently.
- Tiles are generated at runtime.
- Tilemap is intentionally avoided.
- Chunk culling enables:
- Visibility-based activation
- Reduced render and physics overhead
- Acts as a deliberate workaround for Luna limitations.
| Feature | Implementation |
|---|---|
| Physics usage | Minimal |
| Erase shape | Vertical, sword-like |
| Reference | Sword transform |
| Goal | Stable, low-cost erase logic |
- Swords rotate around a shared orbit center.
- Orbit radius and sword parameters are decoupled.
- Visual changes do not affect damage or erase behavior.
| Rule | Behavior |
|---|---|
| Player distance | Maximized |
| Play area bounds | Enforced |
| Enemy spacing | Overlap prevented |
Ensures clean first frames and avoids collision spikes.
- Unsupported Unity packages are avoided.
- No Timeline or Async GPU Readback usage.
- Heavy LINQ and unnecessary allocations are minimized.
Goal: predictable behavior across ad networks.
| Asset | Tool |
|---|---|
| Audio | Audacity |
| Sprite color edits | Picsart |
- Unity
- C#
- ScriptableObject architecture
- Chunk-based culling
- Luna / WebGL-friendly design
This project prioritizes playable ad realities over traditional Unity workflows.
Visual complexity was intentionally sacrificed in favor of:
Stability · Performance · Control
Several Unity conveniences were deliberately avoided to meet these goals.
