Hi! I made this little game as kind of a refresher of memory, I guess. Haven't programmed in a while so I set myself a challenge. Well after a day, here it is.
Ping!
It's like Pong, except you control the ball.
The controls are up arrow, and down arrow. They control the ball's height, and that's about it.
If you want to set yourself more/less of a challenge, just go in main.lua, and change paddle1's (left) and paddle2's (right) values, like:
thinkspeed - the time, in seconds, it takes to react to the ball's movement
speed - the vertical speed of the paddle
offset - the distance between the paddle and the wall
The rest isn't very important. But, you can change the ball's:
speed - vertical speed of the ball
xspeed - horizontal speed of the ball
size - width and height of the ball (always a square)
If you wish to use the "advanced" bouncing mechanism on the paddles, go enable gamemode2, which is the first line of love.load().
That's pretty much all, I think. Have a screenshot.
Ping - A twist on Pong
Ping - A twist on Pong
- Attachments
-
- ping.love
- (1.55 KiB) Downloaded 259 times
Last edited by iPoisonxL on Tue Jun 17, 2014 12:19 am, edited 1 time in total.
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Ping - A twist on Pong
I liked this game a lot but I found that if you hold down since the beginning you can score multiple points in a row... doesn't work always but it happens
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: Ping - A twist on Pong
That's true, that's why you have the option to amp up the difficulty.Positive07 wrote:I liked this game a lot but I found that if you hold down since the beginning you can score multiple points in a row... doesn't work always but it happens
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
Re: Ping - A twist on Pong
Interesting, but i found a way how to just press down and i get points on every side each turn. The paddles have to be more dynamic or just make a two or three player game. One or two control the paddles and one controlls the ball.
- SneakySnake
- Citizen
- Posts: 94
- Joined: Fri May 31, 2013 2:01 pm
- Contact:
Re: Ping - A twist on Pong
Please don't set the window title every frame! It can be a real performance killer on some systems.
On my system, it causes 100% cpu utilization and I can't even reach a decent FPS.
On my system, it causes 100% cpu utilization and I can't even reach a decent FPS.
Re: Ping - A twist on Pong
OK, sorry about that. I will fix this.SneakySnake wrote:Please don't set the window title every frame! It can be a real performance killer on some systems.
On my system, it causes 100% cpu utilization and I can't even reach a decent FPS.
EDIT: Fixed
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Ping - A twist on Pong
Really? I use it to set the title to add the FPS every frame and I get no slowdown at all.
Re: Ping - A twist on Pong
I never heard about this problemJasoco wrote:Really? I use it to set the title to add the FPS every frame and I get no slowdown at all.
Code: Select all
L
L Ö
Ö V
L Ö V E
Ö B E
V E
E Y
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Ping - A twist on Pong
It's really OS dependent, so if you want to please them all make a key enable or disable just that...
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)
Who is online
Users browsing this forum: No registered users and 5 guests