Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All files updated to work with LOVE2D version 11.3 (current as of 6.22.2020) #57

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

VKiNGpl
Copy link

@VKiNGpl VKiNGpl commented Jun 23, 2020

All files have been updated and confirmed to work with LOVE2D version 11.3 as of 6.22.2020.
Main updates:

  • file push.lua v0.2 updated to v0.4
  • updated RBGA format updated from range 0-255 to range 0.00-1.00 (retained original colors selection).
  • fixed majority of Ball.lua files having dx/dy (delta x, delta y) swapped - causing initial ball acceleration in the y axis (going up or down instead of to the sides)

@@ -255,7 +255,7 @@ function love.draw()

-- clear the screen with a specific color; in this case, a color similar
-- to some versions of the original Pong
love.graphics.clear(40, 45, 52, 255)
love.graphics.clear(0.16, 0.18, 0.20, 255)
Copy link
Author

@VKiNGpl VKiNGpl Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Values higher than 1 are capped to 1

Comment on lines +25 to +26
self.dx = math.random(2) == 1 and -100 or 100
self.dy = math.random(2) == 1 and math.random(-80, -100) or math.random(80, 100)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delta values swapped to enable initial ball acceleration in the x axis instead of y axis

@@ -111,7 +111,7 @@ function love.update(dt)
-- detect ball collision with paddles, reversing dx if true and
-- slightly increasing it, then altering the dy based on the position of collision
if ball:collides(player1) then
ball.dx = -ball.dx * 1.03
ball.dx = -ball.dx * 1.05
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change can be discarded - implemented for testing purposes.

@@ -122,7 +122,7 @@ function love.update(dt)
end
end
if ball:collides(player2) then
ball.dx = -ball.dx * 1.03
ball.dx = -ball.dx * 1.05
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change can be discarded - implemented for testing purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant