Source code for my action sports Playdate game, "Almost Tennis". Fight a gauntlet of 10 different enemies with three different classes, each with their own unique abilities. Become the Almost Tennis champion! You can find the game on Itch IO.
libraries/AnimatedSprite.lua- By Whitebrim - animation state machineFluid.lua- By Dustin Mierau - simple fluid simulationSceneManager.lua- Handles scene transitionsShaker.lua- By Dustin Mierau - detects shake from accelerometerSignal.lua- By Dustin Mierau - implements the observer patternUtilities.lua- Some simple helper functions
scripts/game/enemies/enemy.lua- Draws enemy and handles AIenemyList.lua- Data list of enemies and properties
healthbar/animatedHeart.lua- Draws animated heart on the sidehealthbar.lua- Draws the list of animatedHearts on the sidehurtBurst.lua- Draws animation when losing a point
player/characterStats.lua- Data list of different classes and their propertieshitbox.lua- Generic hitbox class used by player and enemy to hit the ballplayer.lua- Player character controllerpowerBar.lua- Handles power ability and draws power bar on the sideracquet.lua- Handles drawing the tennis racquet
ball.lua- Handles ball collision and physicsgameEndScene.lua- Scene that shows up when the game is wongameScene.lua- Manages all game elementsscoreBurst.lua- Handles animation when point is scoredwall.lua- Generic collision box class used to create court bounds
title/- Code for the titletitleScene.lua- UI for the title screen
main.lua- Entry point for the game
All code is licensed under the terms of the MIT license except for Fluid.lua, Shaker.lua, and Signal.lua by Dustin Mierau. Images/audio are also not included.