Improvements

Congratulations! You just wrote another game from scratch. And it’s a fun and challenging one. You can still use other ways to improve things. Some suggestions:

  • Add things that the Purple Fruit Monster doesn’t like, to make the score go down when she eats them. Hint: An /images/rotten_banana.png image is also available!

  • Stop the game if too much fruit gets past the Purple Fruit Monster. Hint: create a checkMissedFruit() function that’s called at the very beginning of launchFruit(). The ‘checkedFruit()‘ function should loop through all fruit in the scene, counting the number whose X position is too low. If that count is too high, it’s game over!

This is your code, so make the game better as only you can!

Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.