Project 2.2: Nightfall
Draw your dream house and have it switch to night on a mouse press


  • Your dream house

    • It can be anything: a mansion, castle, moon base, or secret volcano lair

  • Features

    • You must include a ground and sky in the background that change color at night

    • You must include a sun (day), and crescent moon (night)

    • You must include a house with at least six distinct elements

      • Ex: Windows, Doors, Roof, Lava Moat

      • Multiple copies of the same thing are still one element

  • Organization

    • Your program must be divided into methods to keep it organized
      Ex: You would draw the windows in a method called drawWindows()

  • Interaction

    • While the user has the mouse button pressed, the entire image should change to show that it is night time.

      • The sun should be replaced with the moon

      • The colors should become darker

      • You might have some elements change in other ways (optional)
        Ex: Stars might come out, lights pop on in the windows, etc...

FAQ / Tips

  • How do I draw a crescent moon?

    • You'll need to use two overlapping shapes. If one is the color of the sky....

  • How can I make things look darker at night?

    • Two options:

      • You could make each individual part change colors, like we did in Portrait.

      • You could use transparency to make a semi-transparent dark layer on top of everything.