We can get our gameplay area set up straight away by blitting two graphics – ‘header’ and ‘colourmap’ – to 0,0 and 0,80 respectively in the draw() function. This will give us room for a roughly square maze and a header area for some game information. Let’s set our window size to WIDTH = 600 and HEIGHT = 660. Sign up to our newsletter to get a free digital PDF of The MagPi every month, or click here to subscribe to our print magazine.Īs with the more recent episodes of this series, let’s jump straight in, assuming that we have our basic Pygame Zero setup done. This article was written by Mark Vanstone and first appeared in The MagPi magazine issue #76. Easy retro gaming on a Raspberry Pi with Lakka and NOOBS.Rediscover Retro Computing in The MagPi #67.In this first part, we will put together the basics of the Pac-Man game and introduce the concept of adding extra Python modules to our program. We will also use some more advanced programming concepts to make our games even better. This is the first instalment in a two-part tutorial which will show you some more tricks to writing arcade games with Pygame Zero. In this series we have gradually introduced new elements of Pygame Zero and also concepts around writing games. Avoid the ghosts unless you have just eaten a power-up, in which case ghosts are tasty. Pac-Man eats dots in a maze to score points.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |