How nyanmyr/flappy-toys works
Flappy Toys is a Swing arcade game: players choose a toy and world, steer through hazards, collect rewards, and try to improve their score. The sampled game loop owns timed movement, obstacle and collectible spawning, level scenery, and ability use; toys hold score and reward state. The tree also identifies account, registration, leaderboard, and options screens, while the README documents character abilities, themed levels, randomized challenges, and competitive scoring. Those broader screen connections are not fully visible in the excerpts, so uncertain wiring is omitted.
Main entry points: Game.java Game loop · Toy.java Playable toys · DatabaseConnection.java Database access · Main.java Application startup
Components 22
Game entry
- Application startup
src/game/Main.java - Menu
src/game/Menu.java
Gameplay
- Game loop
src/game/Game.java - Mouse controls
src/utility/inputhandling/MouseInputHandler.java - Playable toys
src/toys/Toy.java - Toy characters
src/toys/ToyCharacter.java - Abilities
src/abilities/Ability.java - Collectibles
src/collectibles/Collectible.java - Obstacle columns
src/obstacles/columns/Column.java
World content
- Level selection
src/levels/Level.java - Level runtime
src/levels/AbstractLevel.java - Themed worlds
src/levels - Backgrounds and parallax
src/levels/backgrounds/Background.java - Ground hazards
src/obstacles/grounds/Ground.java
Accounts and services
- Account screens
src/game/Account.java - Login and registration
src/game/Login.java - Leaderboards
src/game/Leaderboards.java - Database access
src/database/DatabaseConnection.java - Play summary
src/database/PlayManager.java - Music and sound
src/sfx/music/MusicPlayer.java
Other components
- Player
- MySQL database
Connections 22
- Player → Menu: opens
- Application startup → Menu: shows
- Application startup → Database access: checks connection
- Application startup → Music and sound: starts menu music
- Player → Mouse controls: provides mouse input
- Mouse controls → Game loop: supplies controls
- Game loop → Playable toys: updates and scores
- Playable toys → Abilities: uses
- Game loop → Collectibles: spawns and tracks
- Playable toys → Collectibles: receives rewards
- Game loop → Level selection: selects
- Game loop → Level runtime: generates world elements
- Level runtime → Themed worlds: implemented by
- Game loop → Obstacle columns: spawns
- Game loop → Ground hazards: checks and replaces
- Game loop → Backgrounds and parallax: displays and scrolls
- Game loop → Music and sound: changes level music
- Database access → MySQL database: queries and updates
- Account screens → Database access: account data
- Login and registration → Account screens: handles credentials
- Leaderboards → Database access: score data
- Play summary → Playable toys: reads run totals