MP:
Good work! I like the colors, I was expecting a black background with neon-green paddles or something, so this was a pleasant surprise :-)
I'm not sure if you're looking for a bug reports yet, but if so, the ball got "stuck" twice (it was moving vertically, but not horizontally), once right in front of the AI paddle and once right behind the AI paddle.
[WIP] Colorful Pong Clone [First Game]
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: [WIP] Colorful Pong Clone [First Game]
If you want bug reports I may as well report that points weren't counted neither mines nor the AI's, also the ball got stuck when the AI lost it's point, and the AI had like a forcefield in front of him, the ball would be reflected even before it touched it's paddle...
Anyway, the game is looking great so keep it up!
Anyway, the game is looking great so keep it up!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: [WIP] Colorful Pong Clone [First Game]
Hello MadamPlumpette,
And thanks for checking out my humble tutorial!
The prototype you have going here is not bad, but I got the ball stuck at one point
it just bounces back and forth horizontally in front of the right paddle.
It happens due to following piece of code:
You can't just flip the velocity because if ball.x is greater than "1000 + max_possible_step" then the ball will get stuck.
You need an extra check, something like:
Good luck!
And thanks for checking out my humble tutorial!
The prototype you have going here is not bad, but I got the ball stuck at one point
it just bounces back and forth horizontally in front of the right paddle.
It happens due to following piece of code:
Code: Select all
if ball.x > 1000 then
...
ball.xv = -ball.xv
elseif ball.x < -50 then
...
ball.xv = -ball.xv
end
You need an extra check, something like:
Code: Select all
if (ball.xv > 0 and ball.x > 1000) or (ball.vx < 0 and ball.x < 50) then
ball.xv = -ball.xv -- now it's safe to flip
Who is online
Users browsing this forum: No registered users and 5 guests