Final Project Report Format - Class 11
Final Project Report Format - Class 11
on
Space Invader
Submitted By
ARYA ARORA
SHASHANK KUMAR
Class: XI D
SHASHANK KUMAR
ARYA ARORA
Class: XI D
ACKNOWLEDGEMENT
I would like to express my special thanks of gratitude to my computer
science teacher Ms. Angel Panesar for her able guidance and support in
completing our project.
ARYA ARORA
SHASHANK KUMAR
Class: XI D
CONTENTS
S. No. Topic Page No.
1. LIBRARIES USED 1-1
2. WORKING 2-4
DESCRIPTION
3. PROJECT CODE 5-7
4. OUTPUT SCREENS 7-8
5. CONCLUSION 9-9
6. BIBLIOGRAPHY 10-10
LIBRARIES USED
Following are the librarie which where used during the project where
1. pygame
WORKING DESCRIPTION
The various modules which were used in my program are:-
1. sys module(System – specific parameters and functions)
2. maths module
3. random module
4. os module.
2. MATH MODULE
Python’s standard library provide a module namely math for mat related
function that work with all number types expect for complex numbers.
In order to use math module in python we firstly import the math module by
using import function .
Inside math module we have many functions for example
Ceil function ,sqrt function , exp function , fabs function, floor function, log
function, log 10, pow , sin, tan, cos , degrees, radians
3. RANDOM MODULE
Python offers random module that can generate random numbers.
If the seeding value is same, the sequence will be the same. For example, if you use 2
as the seeding value, you will always see the following sequence.
4. OS MODULE
The os module in python provides a way of using operating system dependent
functionality
The functions that the os module allow you to interface with the underling
operating system on which the python is running on be that the windows mac or
linux
You can find important information about your location or about the proess
boom_s = pygame.mixer.Sound("boom.wav")
shot_s = pygame.mixer.Sound("shot.wav")
highscore_s = pygame.mixer.Sound("highscore.wav")
wait = 0
time=0
gameover = pygame.image.load("gameover.gif")
gameover_r = gameover.get_rect()
gameover_r = gameover_r.move([size[0]/2-gameover_r.width/2, size[1]/2-
gameover_r.height/2])
score = 0
pygame.mouse.set_visible(False)
song = pygame.mixer.Sound("technotris.wav")
song.play(-1)
while 1:
time+=1
keys = pygame.key.get_pressed()
info = open("highscore.spacegame","r")
highscore = int(info.readline())
if score-1>highscore:
highscore_s.play()
info = open("highscore.spacegame","w")
info.write(str(score))
explosion_L.append(Explosion(ship_pos))
ship = None
enemy_L.remove(enemy)
boom_s.play()
if ship!=None: score+=100
#scoring system
score = max(0, score)
screen.blit(score_t, score_t_r)
OUTPUT SCREENS
1. Enemy number one
4. In between illustrations
5. Battle spaceship
6.Final output