There are a few other commands in here that are worth pointing out:
- image.blit(0,0) - the (0,0) is the location of the centre of the image in x and y co-codinates. 'Blitting' is the process of drawing an image into our window. Otherwise we only load it into memory and never display it.
- we also use the window.height and the window.width commands to return the current height/width of the window which is a far nicer way of defining the location of things. (N.B. the height and width methods also work on image objects!)
Challenge!
Find some nice atmospheric music for your game (and yes check it's Creative Commons licenced for you to use first!) and setup a background image you want to use and display it in the centre of your image in such a way that if you resize your window it appears in the the same place. I highly recommend checking out the wonderful local composer Rhian Sheehan's Soundcloud for inspiration (and yes you can download some of his .mp3s but make sure to attribute them if you use them!).
No comments:
Post a Comment