Topic outline

  • To pass the course, you need to be present at 80 % of the lectures, do the homework assignments, and complete the larger...

    Final Programming Assignment

    You are allowed to choose your own topic if you so please, but there will also be a ready-made option available below. A small project will earn you the minimum 3 ECTS, but if you do something considerably larger, you may earn up to 6. Discuss your idea with the teacher. Tutoring will be available before the deadline in case you need it – keep following your email for a Doodle link where you can book a meeting time.

    The deadline for the assignment is October 12 at 23:59. Zip the sketch folder with all the required files and send it by email to the lecturer. If you're doing a larger project the deadline can be extended by a week or two. In any case, you'll have to put into some meaningful use at least:

    • variables
    • arrays or lists
    • loops and if statements
    • own function(s)
    • comments
    • interaction with either the mouse or keyboard


    Default Option: Aliens!

    Oh no! Aliens from outer space are trying to invade Earth, and we can't let that happen. You and your trusty laser gun are our last hope. Requirements:

    • Aliens keep appearing from the top and moving down
    • If an alien gets to the bottom of the screen the game ends
    • Show the gun at the bottom of the screen
    • You can shoot a laser by clicking with the mouse
    • If you hit an alien it'll disappear
    • Zapping aliens awards you points which are shown on the screen

    Once you get it working you can experiment with things like more interesting motion, explosions for the aliens, title and end screens, different kinds of enemies and so on. If you extend the basic functionality far enough, it will earn you an extra credit point too.

    Aliens!

    Some tips

    • You can consider the aliens rectangles or circles when detecting if you hit them
    • Event handlers work well for games
    • A list makes more sense here than an array here (both can be made to work though)
      • Pay attention what happens to the list size and indices when removing items
    • Start building the solution progressively: this first, then that and so on
    • See previous days' examples for useful pieces of code
    • cursor() will let you change the shape of the mouse pointer