Source code for my Playdate fishing game "By the Pier", with fish art made by Goodgis. Uses the accelerometer to calculate cast speed and crank to reel in your line. Watch for your tension so you don't snap the line, and try to catch all the fish! You can find the game on Itch IO.
scripts/directory/directoryScene.lua- This is the scene that handles the fishing log. It uses the gridview UI component (I made a video on it)
game/ui/catchTimer.lua- This is the bar that pops up that shows you how long you have to catch the fishresultDisplay.lua- This is the notebook that comes down and shows you what fish you caughttensionBar.lua- This is the bar that shows what tension the fishing line is at
cloud.lua- Handles a single cloud moving and removing itself after it goes off screencloudSpawner.lua- Handles spawning the cloudsfishingLine.lua- Handles drawing the fishing line and also a lot of the fishing game logicfishingRod.lua- Handles drawing the fishing rod and the code that uses the accelerometer to determine how fast you swung the PlaydatefishManager.lua- Uses fish.json to get data on how difficult the fishing game should be based on what fish was caughtgameScene.lua- Handles initializing the fishing game scenewater.lua- Handles drawing the simulated water physics
instructions/instructionsScene.lua- The scene that shows the instructions
title/titleScene.lua- The scene that shows the title screen
sceneManager.lua- Handles scene transitionsfish.json- Holds data for the different fish typesmain.lua- Game entry point
All code is licensed under the terms of the MIT license.