0% found this document useful (0 votes)
10 views31 pages

Project Report (Sanjana) 1

The seminar report presents a project on developing a 'Space Shooter Combat Game' using Python and the Pygame module, aimed at fulfilling the requirements for a Bachelor of Computer Science degree. The document includes sections on project requirements, design diagrams, coding, and a conclusion emphasizing the game's entertainment value and mechanics. Acknowledgments are given to faculty and resources that supported the project development process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views31 pages

Project Report (Sanjana) 1

The seminar report presents a project on developing a 'Space Shooter Combat Game' using Python and the Pygame module, aimed at fulfilling the requirements for a Bachelor of Computer Science degree. The document includes sections on project requirements, design diagrams, coding, and a conclusion emphasizing the game's entertainment value and mechanics. Acknowledgments are given to faculty and resources that supported the project development process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Royal Education Society’s

COLLEGE OF COMPUTER SCIENCE & INFORMATION

TECHNOLOGY, LATUR

SEMINAR REPORT On

SPACE SHOOTER COMBAT GAME IN PYTHON


Submitted by
1: SANJANA BANDEPPA KANTE B17
(Exam Seat No : ZC 24940)
2: PRATIKSHA RAJKUMAR URGUNDE B100
(Exam Seat No : ZC 25093)
3: SAKSHI BALAJI MUNDE B107
(Exam Seat No : ZC 24993)

Partial fulfillment for the award of the degree of

BACHELOR OF COMPUTER SCIENCE

SWAMI RAMANAND TEERTH MARATHAWADA UNIVERSITY, NANDED.


Winter/Summer-2023-24
Royal Education Society’s
COLLEGE OF COMPUTER SCIENCE AND INFORMATION
TECHNOLOGY, LATUR.

CERTIFICATE

This is to certify that the Seminar entitled “Space Shooter Combat Game In
Python” has been carried out by Sanjana Bandeppa Kante ,
Pratiksha Rajkumar Urgunde ,Sakshi Balaji Munde under my guidance in partial
fulfillment of the degree of Bachelor of Computer Science of SRTMU, Nanded during the
academic year 2023-2024

Mr. R.S.Jadhav Mr.R.M.Ladge Dr.D.H.Mahamuni

Seminar Guide Seminar In-Charge HOD


ACKNOWLEDGEMENT
We Would Like To Convey Our Gratitude To Dr.N.S.Zulpe , Principal of College of
Computer Science And Information Technology , Latur Who
Gave us Necessary information and guidance for project .
We are greatful to swami ramanand Teerth Marathwada University , Nanded For giving
an opportunity to deliver project .
We Would like to thanks project In-Charge and project guide Mr.Rutuj S.Jadhav Who
guided us through doing these project development process , provided with in valuable
advice , helped us in difficult period and provided practical assistant for our project . Their
willingness to motivate us contributed tremendously to the success of this project.
We Would like to express our special thanks of gratitude to our Head of the Department of
Computer Application Dr.D.H.Mahamuni who helped us a lot in finalizing this project.
Besides we would Like to thank all staff Member who helped us by giving advice and
providing equipment which we needed.
Last but not least we would like to thanks all who helped and motivated us.

With Sincere Thanks,


Kante Sanjana

Munde Sakshi

Uragunde Pratiksha
Royal Education Society’s

COLLEGE OF COMPUTER SCIENCE & INFORMATION

TECHNOLOGY, LATUR

Project Approval Letter


This is to declare that the project entitle “Space Shooter Combat Game In
Python” has been allotted to Kante Sanjana , Munde Sakshi ,Urgunde Pratiksha in
partial fulfillment of the degree of Bachelor of Computer Science of SRTMU,
Nanded during the academic year 2023-24

Dr.D.H.Mahamuni

HOD
Sr. No. Topic Name Page No.
1. Cover Page 1

2. Certificate 2
3. Acknowledgement 3
4. Abstract 5
5. Introduction 7
Project Module 7
Project Plan(Gantt Chart) 8
6. Project Requirement 9
Harware Requirement
Software Requirement
7. System Designing 10

E.R. Diagram
Data Flow Diagram
8. Designing
9. Coding
10 Conclusion
11. Bibilography
Abstract –

When playing a game, players seek challenge, mastery and reward, all packed in
entailing and motivating activities. From this stems the importance of gameplay as a crucial
game design cornerstone, and game mechanics as tools that the player has to interact with in
order to carry out gameplay activities.
We analyze the relevance of gameplay and game mechanics from a player centered
perspective, and provide insights and guidelines to improve game design in order to sustain
and enhance players’ motivation through gameplay.
Introduction:

The project basically uses the pygame module. We use images and animate the
images using pygame module. We use pygame module to do button mapping and several
other display function. We use classes to call functions after every iteration of the game
level .

A hit from an asteroid causes the player’s health to decrease.


While smaller asteroids deal lesser damage, larger asteroids will deal a
hevier blow to your health bar. Once the player’s health bar runs out, they lose a life.

Project Module:
1. Pygame Module:
It is used to make games and other multimedia applications, build on highly portable
development.
2. OS Module:
To command operating system (os) using python.
3. Random Module
For generating random numbers for the occurrence of enemies and other stuff
In the game randomly .
Project Plan:
Gantt chart:
Sr.no Task Name 15 Sep 1 Oct 11 Oct 14 Nov 15-Mar

1 Requirement
Gathering

2 Planning

3 Designing

4 Coding

5 Testing and
Deployment
Project Requirements:
 Hardware Requirements:
1) Processor: I3and above
2) RAM: 4GB and above
3) Hard Disk: 160 GB or above
4) Input device: keyboard, Mouse
5) Output device : Monitor or LCD/LED
6) LAN Network or Internet Connection

 Software Requirement:
 Frontend-IDE: PyCharm Community Edition 2021.3.3
 Language :python
 Backend-Database: Xampp server
E R Diagram

Moves Move

Shoo Drop

Alien Get Hit

Trigger player
Gets Hits
Data Flow Diagram:

start

Move Initialization spawns

spaceship

Find
Target FLOW DIAGRAM
Aim Target

Choose NPC for


health and speed
Destroy
evolution
Target

yes

End
Code:
import math

import pygame
import random
pygame.init()
screen=pygame.display.set_mode((860,700))
pygame.display.set_caption("SPACE SHOOTER GAME ")
icon=pygame.image.load("space-invaders (8).pngs")
pygame.display.set_icon(icon)

background=pygame.image.load("space background.png")
background=pygame.image.load("bg1.png")
spaceshipimg=pygame.image.load("space-arcade - Copy.png")
ghostimg=pygame.image.load("ghost.jpg")
ghostimgx=random.randint(0,130)
ghostimgy=random.randint(20,350)
ghostimgspeedx=-1
ghostimgspeedy=10
bulletimg=pygame.image.load("BULLET1.png")

def player():
screen.blit(playerimg,(150,550))
check=False
bulletx=460
bullety=641
def collision():
distance=math.sqrt(math.pow(bulletx-
ghostimgx,2)+math.pow(bullety-ghostimgy,2))
if distance<27:
print("collision occured")

while running:
screen.blit(background,(0,0))
for event in pygame.event.get():
if event.type==pygame.QUIT:
running=False
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_LEFT:
changex=-2
if event.key==pygame.K_RIGHT:
changex=2
if event.key==pygame.K_SPACE:
if check is False:
check=True
screen.blit(bulletimg,(150,350))
bulletx=spaceshipx+20

if event.type==pygame.KEYUP:
changex=0
spaceshipx+=changex
if spaceshipx<=0:
spaceshipx=0
elif spaceshipx>=563:
spaceshipx=563

ghostimgx+=ghostimgspeedx
screen.blit(background,(0,0))
for event in pygame.event.get():
if event.type==pygame.QUIT:
running=False
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_LEFT:
changex=-2
if event.key==pygame.K_RIGHT:
changex=2
if event.key==pygame.K_SPACE:
if check is False:
check=True
screen.blit(bulletimg,(150,350))
bulletx=spaceshipx+20

def collision():
distance=math.sqrt(math.pow(bulletx-
ghostimgx,2)+math.pow(bullety-ghostimgy,2))
if distance<27:
print("collision occured")
if ghostimgx<=0:
ghostimgspeedx=1
ghostimgy+=ghostimgspeedx
if ghostimgx>=940:
ghostimgspeedx=-1
ghostimgy+=ghostimgspeedy
if bullety<=0:
bullety=690
check=False
if check:
screen.blit(bulletimg, (bulletx, bullety))
bullety-=2

collision()

screen.blit(spaceshipimg,(spaceshipx,spaceshipy))
screen.blit(ghostimg,(ghostimgx,ghostimgy))
pygame.display.update()

if event.type==pygame.KEYUP:
changex=0
spaceshipx+=changex
if spaceshipx<=0:
spaceshipx=0
elif spaceshipx>=563:
spaceshipx=563
while running:

background=pygame.image.load("space background.png")
background=pygame.image.load("bg1.png")
spaceshipimg=pygame.image.load("space-arcade - Copy.png")
ghostimg=pygame.image.load("ghost.jpg")
ghostimgx=random.randint(0,130)
ghostimgy=random.randint(20,350)
ghostimgspeedx=-1
ghostimgspeedy=10
bulletimg=pygame.image.load("BULLET1.png")

def player():
screen.blit(playerimg,(150,550))
check=False
bulletx=460
bullety=641

spaceshipx=450
spaceshipy=650
changex=0
running=True
if ghostimgx<=0:
ghostimgspeedx=1
ghostimgy+=ghostimgspeedx
if ghostimgx>=940:
ghostimgspeedx=-1
ghostimgy+=ghostimgspeedy
if bullety<=0:
bullety=690
check=False
if check:
screen.blit(bulletimg, (bulletx, bullety))
bullety-=2

collision()

screen.blit(spaceshipimg,(spaceshipx,spaceshipy))
screen.blit(ghostimg,(ghostimgx,ghostimgy))
pygame.display.update()
while running:
screen.blit(background,(0,0))
for event in pygame.event.get():
if event.type==pygame.QUIT:
running=False
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_LEFT:
changex=-2
if event.key==pygame.K_RIGHT:
changex=2
if event.key==pygame.K_SPACE:
if check is False:
check=True
screen.blit(bulletimg,(150,350))
bulletx=spaceshipx+20
background=pygame.image.load("space background.png")
background=pygame.image.load("bg1.png")
spaceshipimg=pygame.image.load("space-arcade - Copy.png")
ghostimg=pygame.image.load("ghost.jpg")
ghostimgx=random.randint(0,130)
ghostimgy=random.randint(20,350)
ghostimgspeedx=-1
ghostimgspeedy=10
bulletimg=pygame.image.load("BULLET1.png")

while running:
screen.blit(background,(0,0))
for event in pygame.event.get():
if event.type==pygame.QUIT:
running=False
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_LEFT:
changex=-2
if event.key==pygame.K_RIGHT:
changex=2
if event.key==pygame.K_SPACE:
if check is False:
check=True
screen.blit(bulletimg,(150,350))
bulletx=spaceshipx+20
ghostimgx+=ghostimgspeedx
if ghostimgx<=0:
ghostimgspeedx=1
ghostimgy+=ghostimgspeedx
if ghostimgx>=940:
ghostimgspeedx=-1
ghostimgy+=ghostimgspeedy
if bullety<=0:
bullety=690
check=False
if check:
screen.blit(bulletimg, (bulletx, bullety))
bullety-=2

collision()

screen.blit(spaceshipimg,(spaceshipx,spaceshipy))
screen.blit(ghostimg,(ghostimgx,ghostimgy))
pygame.display.update()

if event.type==pygame.KEYUP:
changex=0
spaceshipx+=changex
if spaceshipx<=0:
spaceshipx=0
elif spaceshipx>=563:
spaceshipx=563
Conclusion:

Pygame is suitable to create client-side applications that can be potentially wrapped in a


standalone executable. The project basically uses the pygame module . The game is used for
entertainment. The spaceship finds the target and destroy them until the health of spaceship
is detorated .
Finally ,when the spaceship is destroyed by obstacle the game ends...
Bibliography -

Books–
Think Python(2nd Edition) by Allen B. Downey

Links--

https://www.youtube.com/watch?v=- FoziIlV7N0
https://github.com/topics/space-shooter

You might also like