Froggy Hopper ๐ธ
November 28, 2025 ยท View on GitHub
Froggy Hopper is a simple SpriteKit experiment that follows a hungry frog as it hops around a jungle clearing to snack on insects. The project demonstrates how to build a lightweight iOS arcade scene in Swift with touch controls, basic physics, audio, and haptic feedback. All code targets iOS 13+ and is organised as a standard Xcode project.
๐ฎ Gameplay overview
- Tap-to-hop controls โ Touch anywhere on the screen to launch the frog in that direction. The frog automatically mirrors to face the hop direction and shortens its jump when a rock blocks the path.
- Collectible bugs โ Flies, spiders, and ants spawn around the clearing. Each type uses a different texture, scale, and point value, and despawns automatically if ignored.
- Static obstacles โ Rocks appear at random locations during level loading and are used for hop-shortening collision checks.
- Timer and scoring UI โ Heads-up display shows the remaining time (starting at 120 seconds), the current level, and the total score.
- Simple level progression โ Clearing a level (reaching the target score before time expires) unlocks the next stage, swapping in a new background texture and background music track from the bundled set of ten.
- Welcoming title screen โ A custom Welcome scene handles the start button animation, looping background music, and ambient fly sprites before presenting the game scene.
- Audio & haptics โ Background music and bite sound effects are managed by
SoundManager, and successful bites trigger a medium-impact haptic pulse.
๐ Scoring
| Action | Points |
|---|---|
| Eat fly (green) | +2 |
| Eat spider (brown) | +2 |
| Eat ant (red) | +1 |
- Win condition: Reach 100 points before the 120-second timer reaches zero.
- Try again: If time runs out before hitting the target score, the scene resets and keeps you on the current level.
๐ Game Center leaderboard
- The game now posts your final level score to the Game Center leaderboard with the identifier
com.froggyhopper.highscores. - On the welcome screen, tap Leaderboard to open Apple's built-in Game Center UI and view global rankings.
- To use the leaderboard in your own bundle ID, enable the Game Center capability for the Froggy Hopper target and create a matching leaderboard with the same identifier in App Store Connect.
๐ ๏ธ Project structure
Froggy Hopper/
โโโ AppDelegate.swift / SceneDelegate.swift
โโโ GameViewController.swift # Presents the welcome screen
โโโ WelcomeScene.swift # Animated start screen with Start button
โโโ GameScene.swift # Core gameplay loop, spawning, and scoring
โโโ SoundManager.swift # Background music & sound effect helper
โโโ Assets.xcassets # Sprites, backgrounds, icons
โโโ *.sks & audio files # Scene files and background tracks
๐ฅ Getting started
- Clone the repository and open the Xcode project:
git clone https://github.com/jdawud/FrogGame.git cd FrogGame open "Froggy Hopper.xcodeproj" - Select the Froggy Hopper target and run it on the iOS Simulator or a connected device.
The repository does not include a compiled build or app store metadataโlaunching the project in Xcode is the recommended way to explore the game.
๐ค Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request if you spot a bug or want to add a new feature.
๐ License
Released under the MIT License.