Source code for my Playdate game "Escape from Complex 32, a vertically scrolling endless action game where you use the crank to control a giant laser to shoot yourself up and dodge obstacles. You can get the game on Itch IO.
scripts/game/background/gameBackground.lua- Manages the infinitely scrolling walls and it's collisions
obstacles/floorSpikes.lua- The spikes that catch the player if they fall too far downgate.lua- The obstacle for the platform with the gapmovingSpike.lua- The moving spike obstacle (extends spike.lua)obstacle.lua- The parent obstacle class which all obstacles extend fromobstacleRect.lua- An invisible helper obstacle I used for gate.luaobstacleSpawner.lua- Manages the spawning of obstacles as the player moves upspike.lua- The stationary spike obstacle
player/laserBeam.lua- The beam that shoots out from the player (it's purely cosmetic)laserGun.lua- The rotating laser gunlaserTimer.lua- The currently unused timer to shoot the laserplayer.lua- The player (manages collisions, gravity, input, and more)
ui/heightDialog.lua- UI element that displays the height and max height in resultsDisplay.luaheightDisplay.lua- UI element that appears while playing that displays your current heightresultsDisplay.lua- UI element that handles displaying the result and fading the background
gameScene.lua- Used by sceneManager.lua and loads everything related to the game scene
title/titleScene.lua- Used by sceneManager.lua and loads everything related to the title scene
globals.lua- A helper file that contains functions/variables used across the gamesceneManager.lua- Class that handles scene transitions
All code is licensed under the terms of the MIT license.