Pygame Flappy Bird Clone Black Screen Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)SimCity clone with PyGameTetris clone written in Python/PygameFlappy Bird game clone for a beginners' programming classBlock_breaker clone in pygame with simple edge detectionSimple Snake with pygameBricky - A Breakout Clone in PygameFlappy Bird clonePygame Flappy Bird clone - Object orientedFlappy Bird Style Game in Space SettingSimple Flappy Bird Clone using Kivy (with very minimum physics)
Why is Nikon 1.4g better when Nikon 1.8g is sharper?
Can a new player join a group only when a new campaign starts?
Chebyshev inequality in terms of RMS
Project Euler #1 in C++
Most bit efficient text communication method?
What does it mean that physics no longer uses mechanical models to describe phenomena?
How to write this math term? with cases it isn't working
Is there any word for a place full of confusion?
What would you call this weird metallic apparatus that allows you to lift people?
Maximum summed subsequences with non-adjacent items
How to tell that you are a giant?
What is the font for "b" letter?
What is the topology associated with the algebras for the ultrafilter monad?
Do wooden building fires get hotter than 600°C?
Localisation of Category
Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?
Should I follow up with an employee I believe overracted to a mistake I made?
Why wasn't DOSKEY integrated with COMMAND.COM?
Dating a Former Employee
Should I use a zero-interest credit card for a large one-time purchase?
Why doesn't SQL Optimizer use my constraint?
Using audio cues to encourage good posture
How often does castling occur in grandmaster games?
How does the math work when buying airline miles?
Pygame Flappy Bird Clone Black Screen
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)SimCity clone with PyGameTetris clone written in Python/PygameFlappy Bird game clone for a beginners' programming classBlock_breaker clone in pygame with simple edge detectionSimple Snake with pygameBricky - A Breakout Clone in PygameFlappy Bird clonePygame Flappy Bird clone - Object orientedFlappy Bird Style Game in Space SettingSimple Flappy Bird Clone using Kivy (with very minimum physics)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I am new to coding python, and I followed everything in a 4hr video tutorial but however, I get a black screen when I run my game. I am trying to finish this game for my long-term-project in high-school. I greatly appreciate everyone who helps me with my code.
Here is my code:
import pygame
import time
from random import randint,randrange
black = (0,0,0)
white = (255,255,255)
sunset = (253,72,47)
greenyellow = (184,255,0)
brightblue = (47,228,253)
orange = (255,113,0)
yellow = (255,236,0)
purple = (252,67,255)
colorChoices = [greenyellow,brightblue,orange,yellow,purple]
pygame.init()
surfaceWidth = 800
surfaceHeight = 500
imageHeight = 43
imageWidth = 100
surface = pygame.display.set_mode((surfaceWidth,surfaceHeight))
pygame.display.set_caption('Helicopter')
clock = pygame.time.Clock()
img = pygame.image.load('helicopterbettersized.png')
def score(count):
font = pygame.font.Font('freesansbold.ttf', 20)
text = font.render("Score: "+str(count), True, white)
surface.blit(text, [0,0])
def blocks(x_block, y_block, block_width, block_height, gap, colorChoice):
pygame.draw.rect(surface, colorChoice, [x_block,y_block,block_width,block_height])
pygame.draw.rect(surface, colorChoice, [x_block,y_block_block_height+gap,block_width, surfaceHeight])
def replay_or_quit():
for event in pygame.event.get ([pygame.KEYDOWN, pygame.KEYUP, pygame.QUIT]):
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == pygame.KEYDOWN:
continue
return event.key
return None
def makeTextObjs(text, font):
textSurface = font.render(text, True, sunset)
return textSurface, textSurface.get_rect()
def msgSurface(text):
smallText = pygame.font.Font('freesansbold.ttf', 20)
largeText = pygame.font.Font('freesansbold.ttf', 150)
titleTextSurf, titleTextRect = makeTextObjs(text, largeText)
titleTextRect.center = surfaceWidth / 2, surfaceHeight / 2
surface.blit(titleTextSurf, titleTextRect)
typTextSurf, typTextRect = makeTextObjs('Press any key to continue', smallText)
typTextRect.center = surfaceWidth / 2, ((surfaceHeight / 2) + 100)
surface.blit(typTextSurf, typTextRect)
pygame.display.update()
time.sleep(1)
while replay_or_quit() == None:
clock.tick()
main()
def gameOver():
msgSurface('Kaboom!')
def helicopter(x, y, image):
surface.blit(img, (x,y))
def main():
x = 150
y = 200
y_move = 0
x_block = surfaceWidth
y_block = 0
block_width = 75
block_height = randint (0,surfaceHeight/2)
gap = imageHeight * 3
block_move = 4
current_score = 0
blockColor = colorChoices[randrange(0,len(colorChoices))]
game_over = False
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT:
game_over = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
y_move = -5
if event.type == pygame.KEYUP:
if event.key == pygame.K_UP:
y_move = 5
y += y_move
surface.fill(black)
helicopter(x ,y, img)
blocks(x_block, y_block, block_width, block_height, gap, blockColor)
score(current_score)
x_block -= block_move
if y > surfaceHeight-40 or y < 0:
gameOver()
if x_block < (-1*block_width):
x_block = surfaceWidth
block_height = randint(0,(surfaceHeight / 2))
blockColor = colorChoices[randrange(0,len(colorChoices))]
current_score+=1
if x + imageWidth > x_block:
if x < x_block + block_width:
if y < block_height:
if x - imageWidth < block_width + x_block:
gameOver()
if x + imageWidth > x_block:
if y + imageHeight > block_height+gap:
if x < block_width + x_block:
gameOver()
# if x_block < (x - block_width) < x_block + block_move + block_move:
# current_score += 1
if 3 <= current_score <5:
block_move = 5
gap = imageHeight * 2.9
if 5 <= current_score < 8:
block_move = 6
gap = imageHeight *2.8
if 8<= current_score < 14:
block_move = 7
gap = imageHeight *2.7
pygame.display.update()
clock.tick(60)
main()
pygame.quit()
quit()
python python-3.x pygame
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
I am new to coding python, and I followed everything in a 4hr video tutorial but however, I get a black screen when I run my game. I am trying to finish this game for my long-term-project in high-school. I greatly appreciate everyone who helps me with my code.
Here is my code:
import pygame
import time
from random import randint,randrange
black = (0,0,0)
white = (255,255,255)
sunset = (253,72,47)
greenyellow = (184,255,0)
brightblue = (47,228,253)
orange = (255,113,0)
yellow = (255,236,0)
purple = (252,67,255)
colorChoices = [greenyellow,brightblue,orange,yellow,purple]
pygame.init()
surfaceWidth = 800
surfaceHeight = 500
imageHeight = 43
imageWidth = 100
surface = pygame.display.set_mode((surfaceWidth,surfaceHeight))
pygame.display.set_caption('Helicopter')
clock = pygame.time.Clock()
img = pygame.image.load('helicopterbettersized.png')
def score(count):
font = pygame.font.Font('freesansbold.ttf', 20)
text = font.render("Score: "+str(count), True, white)
surface.blit(text, [0,0])
def blocks(x_block, y_block, block_width, block_height, gap, colorChoice):
pygame.draw.rect(surface, colorChoice, [x_block,y_block,block_width,block_height])
pygame.draw.rect(surface, colorChoice, [x_block,y_block_block_height+gap,block_width, surfaceHeight])
def replay_or_quit():
for event in pygame.event.get ([pygame.KEYDOWN, pygame.KEYUP, pygame.QUIT]):
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == pygame.KEYDOWN:
continue
return event.key
return None
def makeTextObjs(text, font):
textSurface = font.render(text, True, sunset)
return textSurface, textSurface.get_rect()
def msgSurface(text):
smallText = pygame.font.Font('freesansbold.ttf', 20)
largeText = pygame.font.Font('freesansbold.ttf', 150)
titleTextSurf, titleTextRect = makeTextObjs(text, largeText)
titleTextRect.center = surfaceWidth / 2, surfaceHeight / 2
surface.blit(titleTextSurf, titleTextRect)
typTextSurf, typTextRect = makeTextObjs('Press any key to continue', smallText)
typTextRect.center = surfaceWidth / 2, ((surfaceHeight / 2) + 100)
surface.blit(typTextSurf, typTextRect)
pygame.display.update()
time.sleep(1)
while replay_or_quit() == None:
clock.tick()
main()
def gameOver():
msgSurface('Kaboom!')
def helicopter(x, y, image):
surface.blit(img, (x,y))
def main():
x = 150
y = 200
y_move = 0
x_block = surfaceWidth
y_block = 0
block_width = 75
block_height = randint (0,surfaceHeight/2)
gap = imageHeight * 3
block_move = 4
current_score = 0
blockColor = colorChoices[randrange(0,len(colorChoices))]
game_over = False
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT:
game_over = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
y_move = -5
if event.type == pygame.KEYUP:
if event.key == pygame.K_UP:
y_move = 5
y += y_move
surface.fill(black)
helicopter(x ,y, img)
blocks(x_block, y_block, block_width, block_height, gap, blockColor)
score(current_score)
x_block -= block_move
if y > surfaceHeight-40 or y < 0:
gameOver()
if x_block < (-1*block_width):
x_block = surfaceWidth
block_height = randint(0,(surfaceHeight / 2))
blockColor = colorChoices[randrange(0,len(colorChoices))]
current_score+=1
if x + imageWidth > x_block:
if x < x_block + block_width:
if y < block_height:
if x - imageWidth < block_width + x_block:
gameOver()
if x + imageWidth > x_block:
if y + imageHeight > block_height+gap:
if x < block_width + x_block:
gameOver()
# if x_block < (x - block_width) < x_block + block_move + block_move:
# current_score += 1
if 3 <= current_score <5:
block_move = 5
gap = imageHeight * 2.9
if 5 <= current_score < 8:
block_move = 6
gap = imageHeight *2.8
if 8<= current_score < 14:
block_move = 7
gap = imageHeight *2.7
pygame.display.update()
clock.tick(60)
main()
pygame.quit()
quit()
python python-3.x pygame
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago
add a comment |
$begingroup$
I am new to coding python, and I followed everything in a 4hr video tutorial but however, I get a black screen when I run my game. I am trying to finish this game for my long-term-project in high-school. I greatly appreciate everyone who helps me with my code.
Here is my code:
import pygame
import time
from random import randint,randrange
black = (0,0,0)
white = (255,255,255)
sunset = (253,72,47)
greenyellow = (184,255,0)
brightblue = (47,228,253)
orange = (255,113,0)
yellow = (255,236,0)
purple = (252,67,255)
colorChoices = [greenyellow,brightblue,orange,yellow,purple]
pygame.init()
surfaceWidth = 800
surfaceHeight = 500
imageHeight = 43
imageWidth = 100
surface = pygame.display.set_mode((surfaceWidth,surfaceHeight))
pygame.display.set_caption('Helicopter')
clock = pygame.time.Clock()
img = pygame.image.load('helicopterbettersized.png')
def score(count):
font = pygame.font.Font('freesansbold.ttf', 20)
text = font.render("Score: "+str(count), True, white)
surface.blit(text, [0,0])
def blocks(x_block, y_block, block_width, block_height, gap, colorChoice):
pygame.draw.rect(surface, colorChoice, [x_block,y_block,block_width,block_height])
pygame.draw.rect(surface, colorChoice, [x_block,y_block_block_height+gap,block_width, surfaceHeight])
def replay_or_quit():
for event in pygame.event.get ([pygame.KEYDOWN, pygame.KEYUP, pygame.QUIT]):
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == pygame.KEYDOWN:
continue
return event.key
return None
def makeTextObjs(text, font):
textSurface = font.render(text, True, sunset)
return textSurface, textSurface.get_rect()
def msgSurface(text):
smallText = pygame.font.Font('freesansbold.ttf', 20)
largeText = pygame.font.Font('freesansbold.ttf', 150)
titleTextSurf, titleTextRect = makeTextObjs(text, largeText)
titleTextRect.center = surfaceWidth / 2, surfaceHeight / 2
surface.blit(titleTextSurf, titleTextRect)
typTextSurf, typTextRect = makeTextObjs('Press any key to continue', smallText)
typTextRect.center = surfaceWidth / 2, ((surfaceHeight / 2) + 100)
surface.blit(typTextSurf, typTextRect)
pygame.display.update()
time.sleep(1)
while replay_or_quit() == None:
clock.tick()
main()
def gameOver():
msgSurface('Kaboom!')
def helicopter(x, y, image):
surface.blit(img, (x,y))
def main():
x = 150
y = 200
y_move = 0
x_block = surfaceWidth
y_block = 0
block_width = 75
block_height = randint (0,surfaceHeight/2)
gap = imageHeight * 3
block_move = 4
current_score = 0
blockColor = colorChoices[randrange(0,len(colorChoices))]
game_over = False
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT:
game_over = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
y_move = -5
if event.type == pygame.KEYUP:
if event.key == pygame.K_UP:
y_move = 5
y += y_move
surface.fill(black)
helicopter(x ,y, img)
blocks(x_block, y_block, block_width, block_height, gap, blockColor)
score(current_score)
x_block -= block_move
if y > surfaceHeight-40 or y < 0:
gameOver()
if x_block < (-1*block_width):
x_block = surfaceWidth
block_height = randint(0,(surfaceHeight / 2))
blockColor = colorChoices[randrange(0,len(colorChoices))]
current_score+=1
if x + imageWidth > x_block:
if x < x_block + block_width:
if y < block_height:
if x - imageWidth < block_width + x_block:
gameOver()
if x + imageWidth > x_block:
if y + imageHeight > block_height+gap:
if x < block_width + x_block:
gameOver()
# if x_block < (x - block_width) < x_block + block_move + block_move:
# current_score += 1
if 3 <= current_score <5:
block_move = 5
gap = imageHeight * 2.9
if 5 <= current_score < 8:
block_move = 6
gap = imageHeight *2.8
if 8<= current_score < 14:
block_move = 7
gap = imageHeight *2.7
pygame.display.update()
clock.tick(60)
main()
pygame.quit()
quit()
python python-3.x pygame
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
I am new to coding python, and I followed everything in a 4hr video tutorial but however, I get a black screen when I run my game. I am trying to finish this game for my long-term-project in high-school. I greatly appreciate everyone who helps me with my code.
Here is my code:
import pygame
import time
from random import randint,randrange
black = (0,0,0)
white = (255,255,255)
sunset = (253,72,47)
greenyellow = (184,255,0)
brightblue = (47,228,253)
orange = (255,113,0)
yellow = (255,236,0)
purple = (252,67,255)
colorChoices = [greenyellow,brightblue,orange,yellow,purple]
pygame.init()
surfaceWidth = 800
surfaceHeight = 500
imageHeight = 43
imageWidth = 100
surface = pygame.display.set_mode((surfaceWidth,surfaceHeight))
pygame.display.set_caption('Helicopter')
clock = pygame.time.Clock()
img = pygame.image.load('helicopterbettersized.png')
def score(count):
font = pygame.font.Font('freesansbold.ttf', 20)
text = font.render("Score: "+str(count), True, white)
surface.blit(text, [0,0])
def blocks(x_block, y_block, block_width, block_height, gap, colorChoice):
pygame.draw.rect(surface, colorChoice, [x_block,y_block,block_width,block_height])
pygame.draw.rect(surface, colorChoice, [x_block,y_block_block_height+gap,block_width, surfaceHeight])
def replay_or_quit():
for event in pygame.event.get ([pygame.KEYDOWN, pygame.KEYUP, pygame.QUIT]):
if event.type == pygame.QUIT:
pygame.quit()
quit()
elif event.type == pygame.KEYDOWN:
continue
return event.key
return None
def makeTextObjs(text, font):
textSurface = font.render(text, True, sunset)
return textSurface, textSurface.get_rect()
def msgSurface(text):
smallText = pygame.font.Font('freesansbold.ttf', 20)
largeText = pygame.font.Font('freesansbold.ttf', 150)
titleTextSurf, titleTextRect = makeTextObjs(text, largeText)
titleTextRect.center = surfaceWidth / 2, surfaceHeight / 2
surface.blit(titleTextSurf, titleTextRect)
typTextSurf, typTextRect = makeTextObjs('Press any key to continue', smallText)
typTextRect.center = surfaceWidth / 2, ((surfaceHeight / 2) + 100)
surface.blit(typTextSurf, typTextRect)
pygame.display.update()
time.sleep(1)
while replay_or_quit() == None:
clock.tick()
main()
def gameOver():
msgSurface('Kaboom!')
def helicopter(x, y, image):
surface.blit(img, (x,y))
def main():
x = 150
y = 200
y_move = 0
x_block = surfaceWidth
y_block = 0
block_width = 75
block_height = randint (0,surfaceHeight/2)
gap = imageHeight * 3
block_move = 4
current_score = 0
blockColor = colorChoices[randrange(0,len(colorChoices))]
game_over = False
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT:
game_over = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
y_move = -5
if event.type == pygame.KEYUP:
if event.key == pygame.K_UP:
y_move = 5
y += y_move
surface.fill(black)
helicopter(x ,y, img)
blocks(x_block, y_block, block_width, block_height, gap, blockColor)
score(current_score)
x_block -= block_move
if y > surfaceHeight-40 or y < 0:
gameOver()
if x_block < (-1*block_width):
x_block = surfaceWidth
block_height = randint(0,(surfaceHeight / 2))
blockColor = colorChoices[randrange(0,len(colorChoices))]
current_score+=1
if x + imageWidth > x_block:
if x < x_block + block_width:
if y < block_height:
if x - imageWidth < block_width + x_block:
gameOver()
if x + imageWidth > x_block:
if y + imageHeight > block_height+gap:
if x < block_width + x_block:
gameOver()
# if x_block < (x - block_width) < x_block + block_move + block_move:
# current_score += 1
if 3 <= current_score <5:
block_move = 5
gap = imageHeight * 2.9
if 5 <= current_score < 8:
block_move = 6
gap = imageHeight *2.8
if 8<= current_score < 14:
block_move = 7
gap = imageHeight *2.7
pygame.display.update()
clock.tick(60)
main()
pygame.quit()
quit()
python python-3.x pygame
python python-3.x pygame
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 7 mins ago
Ian BlumbergIan Blumberg
1
1
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Ian Blumberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago
add a comment |
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "196"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Ian Blumberg is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217703%2fpygame-flappy-bird-clone-black-screen%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ian Blumberg is a new contributor. Be nice, and check out our Code of Conduct.
Ian Blumberg is a new contributor. Be nice, and check out our Code of Conduct.
Ian Blumberg is a new contributor. Be nice, and check out our Code of Conduct.
Ian Blumberg is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f217703%2fpygame-flappy-bird-clone-black-screen%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Welcome to Code Review! Unfortunately, your question is off-topic for this community, since code has to be working before a review can take place. Please fix your code (maybe with some help from Stack Overflow) and come back later.
$endgroup$
– Alex
2 mins ago