Love2d Not Responding
Posted: Mon Mar 30, 2020 5:18 pm
Hello. This is my first post here. I am trying to change code for a Pong game a received for an assignment to implement an AI. For some reason, despite me not changing any of major components of the code, like the code that makes it load and everything, when I changed this bit of code from this:
if love.keyboard.isDown('up') then
player2.dy = -PADDLE_SPEED
elseif love.keyboard.isDown('down') then
player2.dy = PADDLE_SPEED
else
player2.dy = 0
To this:
if ball.y < player2.y
then while(player2.y ~= ball.y)
do
player2.dy = -PADDLE_SPEED
end
elseif ball.y > player2.y
then while(player2.y ~=ball.y)
do
player2.dy = PADDLE_SPEED
end
end
Love only loads a white screen and says not responding. The game worked fine before I changed it. If it changes anything, I am using the 0.10.2 version of Love. Thank you
if love.keyboard.isDown('up') then
player2.dy = -PADDLE_SPEED
elseif love.keyboard.isDown('down') then
player2.dy = PADDLE_SPEED
else
player2.dy = 0
To this:
if ball.y < player2.y
then while(player2.y ~= ball.y)
do
player2.dy = -PADDLE_SPEED
end
elseif ball.y > player2.y
then while(player2.y ~=ball.y)
do
player2.dy = PADDLE_SPEED
end
end
Love only loads a white screen and says not responding. The game worked fine before I changed it. If it changes anything, I am using the 0.10.2 version of Love. Thank you