Skip to content

Commit

Permalink
Updated README,removed irrelevant files
Browse files Browse the repository at this point in the history
  • Loading branch information
SauravGitte committed Dec 21, 2024
1 parent 0a8e7e7 commit 76ea370
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 143 deletions.
12 changes: 6 additions & 6 deletions 1Gameplay.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
###Base version of Game :
You can Open Swarmshot Folder in V S Code and then run main.py file.
Map of 50X50 tiles each of 16X16 pixel size.
Map of 44X44 tiles each of 16X16 pixel size.
The game is currently Just the main Player moving on the map. Animated via spritesheet.

###Final Version of Game :
Expand All @@ -12,8 +12,8 @@ The scientist , weapons , enemies , buildings are all rendered through Spriteshe
because Spritesheets give optimisation.

Gameplay:
Map Size: 50x50 grid, each tile being 16x16 pixels (adjustable based on resolution).
Player Spawn Point: Center of the map (25, 25 in tile coordinates).
Map Size: 44x44 grid, each tile being 16x16 pixels (adjustable based on resolution).
Player Spawn Point: Center of the map (22, 22 in tile coordinates).
Environment: The map is a simple desert .
The game is played on a big map of 50X50 tiles . Player cannot move outside the map bounds .
Player is a scientist who has to end zombie apocalypse. He kills zombies with his high-tech advanced Technology.
Expand All @@ -32,17 +32,17 @@ If scientist collides(overlaps) with enemy , his health decreases by the damage
If scientist health drops below zero , Game Over.

Wave system:
Game consists of 20 waves.
Game consists of 12 waves.
Each wave different types of enemies and different number of enemies will be deployed randomly on map . Enemies will be deployed randomly but away from PlAYER .
Enemies cannot be deployed on the portion occupied by building .
A wave has following property: Enemy type and Number .
Each wave lasts untill all enemies are not dead . (i.e total Number of enemies left = zero )
After 20 waves are completed , The game is won by player.
After 12 waves are completed , The game is won by player.

Shop System: After each wave is over,The screen is overlayed by a shop which displays some cards , a shop randomly gives 4 cards to choose from , Player can choose using mouse . Player can choose only 2 cards.
cards can be defense buildings , pets , weapons . Cards offer these things randomly , it could be any type of building , pet , weapons .
If Player has max weapons or pets he has to discard any of them , to Equip new ones .
Discarded pet will be eaten by zombies.(its health will be 20HP and decrease and die(remove from Game) .
Discarded pet will be eaten by zombies.(its health will be 20HP and decrease and die(remove from Game)) .

Pets: 1X1 tile size
Pets are dynamic wrt scientist and they are like the Spring-arm of Unreal Engine or Unity.
Expand Down
81 changes: 0 additions & 81 deletions Example_of_Game/Explaination.txt

This file was deleted.

16 changes: 0 additions & 16 deletions Example_of_Game/Initial_Issues.txt

This file was deleted.

33 changes: 3 additions & 30 deletions Example_of_Game/practice.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is the file for your basic Issues.
# Use V S Code ( no problem if other editor)
#
# Issue 1:
# Issue 2:
# Just create a Window in Python of any size (say 800 by 600 pixels)
# So this is total black screen.
#
Expand All @@ -15,32 +15,5 @@
# (Using Single tile , will give a boring map )
# (Use multiple tiles ,so that beautiful map is created )
#
# Issue 2:
# Now , we will create a Character Sprite and Animate it .
# Begin by drawing a rectangle on the screen , say 64 by 64 size.
# This will be our main character . Give it 8-directional motion .
# Learn from the player.py and main.py code .
#
# Issue 3: (Read Explaination.txt)
# Now ,Lets animate using sprite in "Sprites\Sprites_Player\Char_003.png"
# The top-left of any image is (0,0) in cordinates
# The bottom-right of any image is (width,height) in cordinates
# The image has 16 photos of same character in 4X4 grid manner .
# Check properties of Char_003.png to know its size , it is 288 X 288 pixel
# So , the character is 288/4 = 72 pixel in size .
# Hence if we were to access Top-left photo , (x,y, width, height) will be (0,0, 72,72 )
# Photo in top row and 2nd Column will be (72 , 0 , 72, 72 )
# Photo in 4th row and 3rd Column will be ((4-1)*72, (3-1)*72 , 72,72 ) i.e (216 , 144, 72,72 )
# So , we can access any photo :
# (x,y) = ( (column-1)*72 , (row-1)*72
#
# We will use 2 for-loops to access the sprites. Observe the code in player.py
# write similar code and properly access the spritesheet for the Player up-down left-right movement
# Notice that player moves diagonally but still left or right animation is played .(AND IT FEELS okay !)
#
# Issue 4:
# For time when Player is not moving/ Idle , access 'Sprites/Sprites_Player/Char_003_Idle.png' ,
# and Just use its first row , where Player is facing the screen
# Hurray ! You have learned animating a character using Spritesheet .
#
# Ta da ! This Sums up all 4 issues .
# Write code below this :

Binary file modified README.md
Binary file not shown.
20 changes: 10 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
from building import Building
from shop import Shop


# Initialize Pygame
pygame.init()

# Screen dimensions
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
# Screen Dimensions
TILE_SIZE = 16
MAP_SIZE = 50 # 50x50 tiles
GRID_SIZE = 44
MAP_WIDTH = TILE_SIZE * GRID_SIZE
MAP_HEIGHT = TILE_SIZE * GRID_SIZE

# Colors (optional background fallback)
WHITE = (255, 255, 255)
Expand All @@ -25,22 +24,23 @@
DESERT_TILE = pygame.transform.scale(DESERT_TILE, (TILE_SIZE, TILE_SIZE)) # Resize tile to 16x16

# Set up display
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
screen = pygame.display.set_mode((MAP_WIDTH, MAP_HEIGHT))
pygame.display.set_caption("SwarmShot by IIITA")

# Clock for controlling frame rate
clock = pygame.time.Clock()

# Load Player
player = Player(SCREEN_WIDTH // 2, SCREEN_HEIGHT // 2)
player = Player(MAP_WIDTH // 2, MAP_HEIGHT // 2)
# Placing player at centre of map

# Function to render a basic map
def render_map():
for y in range(MAP_SIZE):
for x in range(MAP_SIZE):
for y in range(GRID_SIZE):
for x in range(GRID_SIZE):
screen.blit(DESERT_TILE, (x * TILE_SIZE, y * TILE_SIZE))

# Main game loop
# Main game loopS
def main():
while True:
for event in pygame.event.get():
Expand Down

0 comments on commit 76ea370

Please sign in to comment.