Shutter Dive is an underwater photography game where you control a diver, take pictures of marine life, and aim for perfect shots to earn extra points!
The game ends when your dive time runs out due to low air supply.
It’s an educational game — by playing, users can discover the incredible variety of sea life that inhabits our oceans.
🌊 The game currently features 13 different marine species, including fish, squids, turtles, and more!
-
Move the diver with arrow keys
-
Show camera focus with
Z
-
Take pictures with
X
-
Air timer and extra air from other divers
-
Ranking system with local storage
-
Customizable theme: Night or Day dive
-
Dive log
-
📸 Scoring System
In Shutter Dive, players earn points by photographing marine animals. The scoring system rewards both presence and precision:-
✅ Base Score You get 500 points for any photo that contains an animal.
-
🌟 Perfect Picture Bonus - You earn extra points when you take a perfect shot — this means the animal is fully visible and centered within the camera focus box. - The bonus depends on how difficult it is to perfectly frame the animal, based on its size relative to the camera box.
-
- Different game modes, e.g. :
- "The collector": Goal is to photograph all species
- "The identifier" Type the name of the animal you photographed
- More fish species
- Moving background
- HTML, CSS, Javascript, DOM Manipulation, JS Audio, Local Storage.
- Start screen
- Game screen
- Game over / Dive log screen
- main.js: Handles DOM, game logic, event listeners
- Element.js: Base class for element positioning and swimming movement.
- Diver.js: Diver logic
- OtherDiver.js: Other diver logic
- Fish.js: Fish logic
- Camara.js: Camera logic
- Handles DOM, game logic, event listeners.
- startGame()
- gameOver()
- restartGame()
- startTimer()
- gameLoop()
- handleDiverSwim(event)
- calculateFishAreaAndScores()
- calculatePositionsForFishSpawning(numPoints)
- spawnFish()
- fishdespawning()
- spawnOtherDiver()
- despawnOtherDiver()
- checkCollisionWithOtherDiver()
- increaseAir()
- positionCameraFocus()
- capturePicture()
- showDiveLog()
- updateGeneralResultsBox()
- updateRanking()
- checkCollision(element1, element2)
- clearAllRankings()
- convertTimeRemainingToString(time)
Contains an array of fish objects, with the source of the image, and the size it will have in the game. Each object looks like this:
{
fishName: "Yellow cowfish",
src: ./images/Fish-yellow-cowfish.png
,
w: 60,
h: 50,
},