Skip to content

Commit

Permalink
Project done
Browse files Browse the repository at this point in the history
  • Loading branch information
vsai121 committed Mar 18, 2018
1 parent 215f98f commit 8b18cfe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions game/flappy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pygame.locals import *
from itertools import cycle


FPS = 30
SCREENWIDTH = 288
SCREENHEIGHT = 512
Expand All @@ -16,6 +17,8 @@
SCREEN = pygame.display.set_mode((SCREENWIDTH, SCREENHEIGHT))
pygame.display.set_caption('Flappy Bird')



IMAGES, SOUNDS, HITMASKS = flappy_utils.load()
PIPEGAPSIZE = 100 # gap between upper and lower part of pipe
BASEY = SCREENHEIGHT * 0.79
Expand Down
11 changes: 6 additions & 5 deletions game/flappy_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pygame

import sys

def load():
Expand Down Expand Up @@ -40,11 +41,11 @@ def load():
else:
soundExt = '.ogg'

SOUNDS['die'] = pygame.mixer.Sound('assets/audio/die' + soundExt)
SOUNDS['hit'] = pygame.mixer.Sound('assets/audio/hit' + soundExt)
SOUNDS['point'] = pygame.mixer.Sound('assets/audio/point' + soundExt)
SOUNDS['swoosh'] = pygame.mixer.Sound('assets/audio/swoosh' + soundExt)
SOUNDS['wing'] = pygame.mixer.Sound('assets/audio/wing' + soundExt)
#SOUNDS['die'] = pygame.mixer.Sound('assets/audio/die' + soundExt)
#SOUNDS['hit'] = pygame.mixer.Sound('assets/audio/hit' + soundExt)
#SOUNDS['point'] = pygame.mixer.Sound('assets/audio/point' + soundExt)
#SOUNDS['swoosh'] = pygame.mixer.Sound('assets/audio/swoosh' + soundExt)
#SOUNDS['wing'] = pygame.mixer.Sound('assets/audio/wing' + soundExt)

# select random background sprites
IMAGES['background'] = pygame.image.load(BACKGROUND_PATH).convert()
Expand Down

0 comments on commit 8b18cfe

Please sign in to comment.