University of Pula. Faculty of Informatics in Pula.
Abstract
U radu je prikazan postupak nastajanja jednostavne arkadne igre rađene u Pythonu. Za potrebe rada pomoću paketa Pygame izrađena je igra Invaders, dostupna na repozitoriju Github: https://github.com/jcrljenko/Invaders. Cilj rada bio je prikazati postupno građenje svakog elementa igre. Igra je nastajala u nekoliko faza, te je svaka faza u radu detaljno opisana i obrazložena. Na prvi pogled igra je vrlo jednostavna no, kako bi bila zanimljivija i privlačnija za igru bilo je potrebno osmisliti puno detalja. U radu je stoga sve spomenuto obrazloženo, te je opisan svaki korak pri nastanku igre: od početnog postavljanja pozadinske slike, dodavanja letjelice igrača, podešavanja pokreta invadera ili mystery letjelice, animacija i eksplozija, postavljanja statičkog, dinamičkog i treptajućeg teksta, izrade bunkera pomoću mreže pravokutnih objekata, postavljanja težine igre, zvukova igre te konačno tri stanja igre (game started, game paused, game over). Rad je popraćen i oprimjeren mnogim prilozima izvornog koda, kako bi se lakše mogao slijediti proces.This paper shows the development process of a simple arcade game made in Python. The game Invaders was also created for this paper, with the help of the Pygame package and is available on the repository Github: https://github.com/jcrljenko/Invaders. The goal of this paper was to show the systematic building of all elements of a game. The game was developed in several phases; each phase is displayed and explained in detail. It seems fairly simple at first glance but, in order for the game to be more interesting and exciting to play, many details had to be created. Therefore, this paper describes all of the above mentioned, furthermore, all the steps taken towards the creation of a game from adding its initial background image, addition of player's aircrafts, movement adjustments for the Invader or Mystery aircrafts, animation and explosions, the insertion of static, dynamic and blinking text, the development of a bunkers with the help of a web of rectangular objects, setting the skill level of the game, sounds and the three game states (game started, game paused, game over). Several attachments of source code are provided in order to more easily follow the process