Juicy PONG

Show off your games, demos and other (playable) creations.
User avatar
milk
Prole
Posts: 39
Joined: Sun Jul 17, 2016 7:20 pm

Juicy PONG

Post by milk »

My first, well, second game made with LOVE, I usually got myself bogged down with animations and generally my scope was massive so I never finished the other one. So I've gone back to basics and this is the product, PONG. But with juice, I guess. See this great video to understand what I'm talking about: https://www.youtube.com/watch?v=Fy0aCDmgnxg
2016-10-28-040730_1366x768_scrot.png
2016-10-28-040730_1366x768_scrot.png (5.03 KiB) Viewed 5347 times
It took me around 3 days to make, a few hours every day or so, the main features are:
  • working game :)
  • sound
  • tweening stuff
  • AI gets harder the more score you have
  • juicyness
I've only beaten it a handful of times since the AI + ball speed get super fast towards 10 points, I'll be impressed if you can get 8 points past it.

I used these libraries:
HUMP game tools, for timers, camera shake etc.
bump.lua, collisions
flux, object tweening
Sounds are all generated from BFXR.net, music is "ParagonX - Chaoz Fantasy" fed into GXSCC to make it sound "8bit"-ish

The aim of the game is to get 10 points first.
I'd be happy for criticism (+ bug reports) to make the game/code better! Thanks for looking :3

Controls:
You're the paddle on the left;
W/Up to go up
S/Down to go down,
` (backtick) to toggle console
' ' (spacebar) to restart, i.e. reset scores.

WINDOWS: https://drive.google.com/drive/folders/ ... sp=sharing (older version)
LINUX: See attached .love (updated in later post)
Attachments
jp.love
(3.41 MiB) Downloaded 151 times
Last edited by milk on Sun Oct 30, 2016 12:21 am, edited 1 time in total.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Juicy PONG

Post by Positive07 »

Well I like it, just some things: movement is too fast, you should probably smooth it / slow it down. And the "AI Wins" label doesn't dissapear when I press spacebar (reset) also I can't move at all in that state.
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
milk
Prole
Posts: 39
Joined: Sun Jul 17, 2016 7:20 pm

Re: Juicy PONG

Post by milk »

Positive07 wrote:Well I like it, just some things: movement is too fast, you should probably smooth it / slow it down. And the "AI Wins" label doesn't dissapear when I press spacebar (reset) also I can't move at all in that state.
Could you elaborate on "the movement is too fast", like the movement of the ball or paddle is too fast? I also fixed those bugs you mentioned :)
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Juicy PONG

Post by Positive07 »

The paddles, there is no control over it, I found you are not using dt when determining the pad position. Also the AI is way too formidable haha it looks kind of weird to see it stutter too fast. Also does the paddle become smaller?
Captura de pantalla 2016-10-28 01.48.11.png
Captura de pantalla 2016-10-28 01.48.11.png (50.71 KiB) Viewed 5313 times
Ignore the 101, it's not like I hacked a way to replay the game after you die... and accidentally made it endless
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
milk
Prole
Posts: 39
Joined: Sun Jul 17, 2016 7:20 pm

Re: Juicy PONG

Post by milk »

Positive07 wrote:The paddles, there is no control over it, I found you are not using dt when determining the pad position. Also the AI is way too formidable haha it looks kind of weird to see it stutter too fast. Also does the paddle become smaller?
Captura de pantalla 2016-10-28 01.48.11.png
Ignore the 101, it's not like I hacked a way to replay the game after you die... and accidentally made it endless
I found the ai to be suuuuper sloppy and overshoot a lot of the time when I did ai.yvel * dt, so I just used a constant instead. Did it actually take you 101 ai scores for you to get 10 points? :o The AI paddle gets larger and becomes faster when you gain more points, if you look at the increaseDifficulty() function it's all there :)
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: Juicy PONG

Post by Jeeper »

milk wrote:
Positive07 wrote:The paddles, there is no control over it, I found you are not using dt when determining the pad position. Also the AI is way too formidable haha it looks kind of weird to see it stutter too fast. Also does the paddle become smaller?
Captura de pantalla 2016-10-28 01.48.11.png
Ignore the 101, it's not like I hacked a way to replay the game after you die... and accidentally made it endless
I found the ai to be suuuuper sloppy and overshoot a lot of the time when I did ai.yvel * dt, so I just used a constant instead. Did it actually take you 101 ai scores for you to get 10 points? :o The AI paddle gets larger and becomes faster when you gain more points, if you look at the increaseDifficulty() function it's all there :)
Then the problem is with your calculation of velocity, not using dt. If you do not use dt then the speed will vary depending on computer peformance, meaning that a person with a fast computer will have a much faster speed than someone with a lower end computer.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Juicy PONG

Post by Positive07 »

It overshoot whith the constant. There is probably an error in the position calculation, you should use dt always when you want smooth movement

Also that AI is kind of unbeatable, you need to hope the overshoot makes the AI make a mistake, that is why it took me so many points, you may be good at it but remember that you programmed it and also your computer may be better suitted for the game (mine is crap).

If I were to make this AI I would make it calculate the end position where it should move, set a constant speed, slower than that of the player and not necessary enough to reach the position in time, maybe even with a start delay, move with dt, and add errors here and there with math.random, say in the delay, position and speed. And to make it harder the error would be reduced and speed incremented and such...
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
evgiz
Citizen
Posts: 83
Joined: Mon Aug 29, 2016 11:05 pm
Contact:

Re: Juicy PONG

Post by evgiz »

Looks good! Any particular reason why you're using an older version of LÖVE? Just curious.

The game is quite "juicy" already, so good job on that. I'd suggest adding some screenshake or freezing frames to make hits more impactful. Perhaps a fade to black when you lose a point, and a fade to white when you get a point or something like that? Oh the paddle could bounce back a bit and then push the ball forward, flux is a great tweening library I've used for stuff like this.

The particles when you hit the paddle have a too long delay before they're visible in my opinion.
Computer science student and part time game dev! Currently working on Depths of Limbo! :cool:

Check out the game website DepthsOfLimbo.com! :ultrahappy:
And my personal website with all my projects evgiz.net! :megagrin:
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Juicy PONG

Post by pgimeno »

Cool rendition. I especially like the AI. It feels pretty natural.

Some comments.

- It seems you've made the game compatible with 0.10. In that case, don't set the version in love.conf, to avoid the warning at the beginning.
- On occasion, I get into an endless loop, with both paddles up. http://www.formauri.es/personal/pgimeno ... e-pong.gif
- Occasionally, the ball stays big for a long time, even after serving again.
- Occasionally, the ball bounces in air. I happened to capture one instance: Image
- The ball trace would look nicer if it was smooth rather than pixelated.
- Yes, you rely on vsync, so in those cards that don't support it, it runs too fast. Try setting t.window.vsync = false in conf.lua to see how some people see it. You really need to make it depend on dt somehow.
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: Juicy PONG

Post by Sulunia »

Hey, i like it! Good job!
Also, nice choice on the music :D
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
Post Reply

Who is online

Users browsing this forum: No registered users and 60 guests