An Overhead Farming and Fighting Game: Moonlight Harvest

Professor Parse

In this chapter, you'll farm by day and fight off lizards by night, in Moonlight Harvest. The big idea is to keep the state of the whole game in one plain object, and redraw the screen from it, so that planting, watering, selling, and fighting all fit together.

I'm still writing this chapter, step by step. In the meantime, you can play the finished game, and read the code and the assets that make it, so that you can run it and change it yourself.

Play the Game

The code that makes it:

The assets, which go in an assets folder next to the game: