Greenfoot Basics: Java Game Coding - Video #2 (Catch The Apple)
You can download starter code at https://apcsexamprep.com In this Greenfoot project, you’ll learn how to code a simple Java game where the player controls a basket to catch falling apples. But beware—bombs take away lives, golden apples give bonus points, and the timer is always ticking ⏳. Your challenge: score as many points as possible before time runs out or your lives hit zero! 🎮 What You’ll Learn in This Tutorial: Moving objects with the keyboard (Greenfoot.isKeyDown("left"), Greenfoot.isKeyDown("right")) Making apples, golden apples, and bombs fall using setLocation() and randomness Detecting collisions with isTouching() and removeTouching() Tracking score, lives, and time with variables Displaying text with showText() Writing Game Over conditions and displaying the final score Applying key OOP concepts: Actors, Worlds, Subclasses, Methods, and Variables 📚 Key AP CS Vocabulary Covered: Actor | World | Subclass | Method | Collision | Randomness | Instance Variable 💡 Extra Credit Challenge Ideas: Increase falling speed over time Add sound effects for catching apples or hitting bombs Add multiple levels of difficulty Track and display high scores ✅ By completing this project, you’ll strengthen your Java game coding skills and practice core concepts for AP Computer Science A. 🌐 Learn more and access study resources at: apcsexamprep.com 🔔 Subscribe to AP CS Exam Prep for more tutorials on Greenfoot, Java, AP CSA, and AP CSP. 📺 Watch the full Greenfoot Basics Playlist here: [Playlist link] #Greenfoot #JavaGame #APCSA #APComputerScience #GameDevelopment #CodingForBeginners
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.