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

ActionPoints
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

  1. Clone the repository and open the Xcode project:
    git clone https://github.com/jdawud/FrogGame.git
    cd FrogGame
    open "Froggy Hopper.xcodeproj"
    
  2. 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.