Interactive Demo

Use arrow keys or move your mouse to explore the ocean. Collect glowing orbs and treasure chests for points. Chain collections for combo multipliers! Watch your oxygen at depth and avoid jellyfish stings.

Score: 0 Depth: 0 m Fish spotted: 0

About this project

Ocean Space is an immersive generative game that takes players on an underwater exploration adventure. Built with JavaScript and p5.js, it features procedurally generated ocean environments with dynamic sea creatures exhibiting flocking behavior, swaying seaweed and coral formations, and atmospheric bubble and particle effects. The ocean world uses a depth gradient that grows darker as the player descends, creating a sense of deep-sea mystery. Each playthrough offers a unique ocean to discover, with schools of colorful fish that respond to the environment using alignment, cohesion, and separation algorithms inspired by Craig Reynolds' Boids model.

The project showcases procedural generation techniques, real-time simulation, and generative art principles, combining computer science fundamentals with creative expression to produce an endlessly varied underwater experience.

generative art JavaScript p5.js procedural generation flocking algorithms interactive game creative coding simulation