Ping - A twist on Pong

Show off your games, demos and other (playable) creations.
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Ping - A twist on Pong

Post by iPoisonxL »

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.
Image
Attachments
ping.love
(1.55 KiB) Downloaded 260 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
Website
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Ping - A twist on Pong

Post by Positive07 »

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)
User avatar
bdjnk
Citizen
Posts: 81
Joined: Wed Jul 03, 2013 11:44 pm

Re: Ping - A twist on Pong

Post by bdjnk »

Needs more juciness ;)
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: Ping - A twist on Pong

Post by iPoisonxL »

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
That's true, that's why you have the option to amp up the difficulty.

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
User avatar
SiENcE
Party member
Posts: 810
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Ping - A twist on Pong

Post by SiENcE »

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.
User avatar
SneakySnake
Citizen
Posts: 94
Joined: Fri May 31, 2013 2:01 pm
Contact:

Re: Ping - A twist on Pong

Post by SneakySnake »

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.
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: Ping - A twist on Pong

Post by iPoisonxL »

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.
OK, sorry about that. I will fix this.

EDIT: Fixed

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Ping - A twist on Pong

Post by Jasoco »

Really? I use it to set the title to add the FPS every frame and I get no slowdown at all.
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: Ping - A twist on Pong

Post by iPoisonxL »

Jasoco wrote:Really? I use it to set the title to add the FPS every frame and I get no slowdown at all.
I never heard about this problem

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Ping - A twist on Pong

Post by Positive07 »

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)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests