Skip to content

Commit 7b39dbc

Browse files
committed
Modified README file
1 parent 8e40bdf commit 7b39dbc

File tree

5 files changed

+36
-4
lines changed

5 files changed

+36
-4
lines changed

README.md

+34-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1-
# Space Invaders
1+
# **Space Invaders**
22

3-
Copy of Space Invaders tried using Pygame.
3+
***Copy of Space Invaders tried using Pygame.<br>A arcade style game where player have to shoot aliens which are attacking on our planet before they touch the ground.
4+
<br>Player can play this game endless and keep increasing the score.***
5+
<br>
6+
<br>
7+
8+
## **Game Mechanism** :
9+
Bullet are drawn infinitly on the screen. When the bullet is fired it's postion at y-axis decreases which feels like bullet is fired and moving forward.
10+
<br>Player can shoot one bullet at a time unill it reaches the 0th position at y-axis, it gets reset to the orginial position at y-axis from where it was shoot<br> and x-axis where player is located.
11+
<br>This reseting of bullet works same when it hits any enemy.
12+
<br>Enemies are drawn randomly at the starting of the game and when a bullets hit them.<br>
13+
<br>
14+
15+
## **Programming Languages and Modules** :
16+
**Python** : This game is purely made in Python Programming Language.<br>
17+
**Pygame**: Pygame is a module provided by Python to create games in Python Programming Language.<br>(Link to Official Documentation is given below in Resources and References section).<br>
18+
<br>
19+
<img src = "./images/README-images/Game-Play.png" width=400><br>
20+
21+
## **Keyboard keys for Player movement** : <br>
22+
<kbd>A</kbd> is used for moving player to the Left.<br>
23+
<kbd>D</kbd> is used for moving player to the Right.
24+
25+
## **Mouse key for firing bullet** : <br>
26+
<kbd>Left Mouse Key</kbd> is used for Firing Bullets at enemy.<br>
27+
<br>
28+
29+
## **Resources and References** : <br>
30+
* **FreeCodeCamp Youtube Channel** - [Pygame Tutorial](https://www.youtube.com/watch?v=FfWpgLFMI7w).<br>
31+
* **Pygame Official Website** - [Pygame Documentation](https://www.pygame.org/docs/).<br>
32+
* **Make8bitart Official Website** - [8-bit Image making Tool](https://make8bitart.com/).<br>
33+
* **Flaticon Official Website** - [Free Images and Icons](https://www.flaticon.com/).<br>
34+
* **Google Fonts** - [Press Start 2P font by CodeMan38](https://fonts.google.com/specimen/Press+Start+2P).<br>
35+
* **Reduceimages Official Website** - [Image size converter in Pixels and Percentage](https://www.reduceimages.com/).

images/README-images/Game-Play.png

126 KB
Loading

images/enemy2.png images/enemy.png

File renamed without changes.
File renamed without changes.

main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
class Player:
66
def __init__(self, xPlayer, yPlayer):
7-
self.img = pygame.image.load('./images/player1.png')
7+
self.img = pygame.image.load('./images/player.png')
88
self.xPlayer = xPlayer
99
self.yPlayer = yPlayer
1010
self.playerSpeed = 11
1111

1212
class Enemy(pygame.sprite.Sprite):
1313
def __init__(self, xEnemy, yEnemy):
1414
super().__init__()
15-
self.image = pygame.image.load('./images/enemy2.png')
15+
self.image = pygame.image.load('./images/enemy.png')
1616
self.rect = self.image.get_rect()
1717
self.xEnemy = xEnemy
1818
self.yEnemy = yEnemy

0 commit comments

Comments
 (0)