Competition: Pong Race!

  • EncryptedCow

    Nice! Do you have a capx?

  • AnD4D completely forgot to put the capx up. I'll do that as soon as I get home.

  • Guys, i do not intend to participate in this competition (mostly because i don't believe that you can produce something worthwhile in ~20 minutes), but i wanted to make a pong game, so i made one either way.

    So, here is the game:

    <img src="http://i.imgur.com/oUaGi1Z.jpg" border="0">

    <img src="http://i.imgur.com/bNDC4Gj.jpg" border="0">

    The features implemented/working are:

    ? a fully functional menu (mouse controls)

    ? adjustable A.I. difficulty

    ? adjustable game duration

    ? adjustable detail level for graphical effects

    ? toggleable sound effects and music

    ? a simplistic menu background music

    ? your typical pong gameplay based on the physics behaviour

    ? keyboard controls (arrow keys)

    ? gameplay speeds up the longer you play

    ? if the ball is moving too slow horizontally, it gets a boost

    ? a short delay after the ball resets, before it starts moving

    ? messages for both win and lose states, a shortcut back to menu

    ? a nice 8-bit soundtrack and fitting sound effects

    You can test it here:

    https://dl.dropboxusercontent.com/u/80437109/PONG/index.html

    *please note that i disabled webgl for this version

    You can also download the .capx here:

    https://dl.dropboxusercontent.com/u/80437109/PONG/PONG.capx

    I originally planned to have an advanced A.I., which would predict the trajectory of the ball when it is moving towards the right side, however i lost my patience after losing track of different variables (cos this, sin that, no one even invited tg) and screwing up the algorithms.

    Also, i know very well that many of the events could have been merged together and families or whatever could have been used as well, but i just wanted to see this thing work, not be the most optimized game ever made.

  • Stiivais The only issue I came across is the game didn't reset when i wanted to play again. It just dropped me back into the same lose game scenario with the "All Your Pong Belong To Us" and audio stopped working. But the first game played great.

  • Fixing it as we speak; WE MUST RECLAIM THE PONGS!

    Edit: Problem fixed, .capx and the actual game updates.

    Who could have imagined that global variables actually are global??? <img src="smileys/smiley3.gif" border="0" align="middle" />

  • Stiivais

    "Guys, i do not intend to participate in this competition (mostly because i don't believe that you can produce something worthwhile in ~20 minutes)"

    It's not meant to be worthwhile. It's meant to be fun and quick. Something that brand new users can take part in. That's why I'm encouraging people share their capx and videos of them doing it. Think of it as a mass tutorial :)

    Plus, the best one gets a prize.

  • I made one because I wanted to see how few events I could make it in.

    It's 3 short events. It was 2, but I added a victory declaration at 10 points which added a sub-event.

    I think I was just over 30 minutes because I played with some fancy collision paths to prevent balls getting stuck, ;-) and as part of the AI.

    <font color="magenta">capx:</font>

    https://dl.dropboxusercontent.com/u/85412219/forumposts/QuickyPong.capx

    <font color="magenta">Play it:</font>

    https://dl.dropboxusercontent.com/u/85412219/forumposts/QuickyPong/index.html

    I didn't look at anyone else's first, so I wouldn't affect my choices.

    Edit: Oh yeah, Cursor keys to play. Sadly I stink at pong, my best against my AI was 6 to 10.

    (Cancel that, after trying some others, I came back and beat it 10 to 8)

    Just realized how I could get it down to 2 events again too. (9 actions) Couldn't help but make a version. Play & .CAPX (this one also gets harder the longer the ball is alive.)

  • The features implemented/working are:

    ? a fully functional menu (mouse controls)

    ? adjustable A.I. difficulty

    ? adjustable game duration

    ? adjustable detail level for graphical effects

    ? toggleable sound effects and music

    ? a simplistic menu background music

    ? your typical pong gameplay based on the physics behaviour

    ? keyboard controls (arrow keys)

    ? gameplay speeds up the longer you play

    ? if the ball is moving too slow horizontally, it gets a boost

    ? a short delay after the ball resets, before it starts moving

    ? messages for both win and lose states, a shortcut back to menu

    ? a nice 8-bit soundtrack and fitting sound effects

    Pong's typical gameplay is not based on physics, but simple rules. Reflection at the outer walls: angle of incidence = angle of reflectance (that works with the physics as long as we ignore friction, yes). But the most important thing that spices up Pong's gameplay: if the ball hits the upper half of the paddle it will go upwards, if it hits the lower half, it will go downwards; further on edge means it "higher" angle (EncryptedCow tried to emulate it with sculpting the paddles accordingly, although the result is still different).

    At game start, near 90?angle is not used, but probably only like up to 60?. Together with the paddle reflection stuff this will prevent the ball from ever going very slowly horizontally.

    Also another AI variant would be moving the paddle into the middle if the ball is moving away from it. This way it covers the biggest range when the ball comes back (especially relevant if the ball moves fast in relation to the paddle AI speed).

  • Hahaha this is such a great idea. I wont be participating in this one but its great to see what some people can do!

    I'll keep an eye out for future competitions ;)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Pong's typical gameplay is not based on physics, but simple rules. Reflection at the outer walls: angle of incidence = angle of reflectance (that works with the physics as long as we ignore friction, yes). But the most important thing that spices up Pong's gameplay: if the ball hits the upper half of the paddle it will go upwards, if it hits the lower half, it will go downwards; further on edge means it "higher" angle (EncryptedCow tried to emulate it with sculpting the paddles accordingly, although the result is still different).

    At game start, near 90?angle is not used, but probably only like up to 60?. Together with the paddle reflection stuff this will prevent the ball from ever going very slowly horizontally.

    Also another AI variant would be moving the paddle into the middle if the ball is moving away from it. This way it covers the biggest range when the ball comes back (especially relevant if the ball moves fast in relation to the paddle AI speed).

    Adjusts jedi ninja-robe.

    "Aaah, young grasshopper, you are enthusiastic, but you still have a lot to learn,

    as not everything is what it always appears to be."

    You see, the gameplay is based on the physics behaviour, but i tweaked it as much as i could to mimic how pong usually works, by preventing the rotation of the ball, thus removing some of the randomness, and as you can see the friction is indeed being ignored.

    <img src="http://i.imgur.com/3dcuyfh.jpg" border="0" />

    As for how paddles work, i also tried doing this, just in a not so apparent way, by adjusting the collision polygon for the paddles. Obviously this is not perfect, as the collisions sometimes fail to detect properly and the change in angle is pretty insignificant but hey, i tried.

    <img src="http://i.imgur.com/Imixprc.jpg" border="0" />

    Lastly, my solution to the horizontal speed problem was checking if there is a difference in the two of the speeds, and if it were to be found, applying a horizontal boost to the ball. Because the check is done all the time, this should happen seamlessly, as the ball deflects from surfaces.

    <img src="http://i.imgur.com/Rqsi20v.jpg" border="0" />

    As for the AI, i got lazy. You tip is appreciated.

    @AnD4D I get your idea, but i just can't finish a project, i always get sidetracked and end up experimenting with new and probably unnecessary features... Feeling the need to rush, well, that usually makes me take the easy way out and create things that work but are not necessarily well made, which shouldn't be encouraged IMO (but there are different people, this is a challenge, not complaining here, just giving you my POV).

    Lastly: this is a long post, i'll be quiet not to waste forum space, and let others post their games.

  • Just a quick reminder about this one! Deadline is on the 24th!

  • Guys, i do not intend to participate in this competition (mostly because i don't believe that you can produce something worthwhile in ~20 minutes), but i wanted to make a pong game, so i made one either way.

    So, here is the game:

    The features implemented/working are:

    ? a fully functional menu (mouse controls)

    ? adjustable A.I. difficulty

    ? adjustable game duration

    ? adjustable detail level for graphical effects

    ? toggleable sound effects and music

    ? a simplistic menu background music

    ? your typical pong gameplay based on the physics behaviour

    ? keyboard controls (arrow keys)

    ? gameplay speeds up the longer you play

    ? if the ball is moving too slow horizontally, it gets a boost

    ? a short delay after the ball resets, before it starts moving

    ? messages for both win and lose states, a shortcut back to menu

    ? a nice 8-bit soundtrack and fitting sound effects

    You can test it here:*please note that i disabled webgl for this version

    You can also download the .capx here:I originally planned to have an advanced A.I., which would predict the trajectory of the ball when it is moving towards the right side, however i lost my patience after losing track of different variables (cos this, sin that, no one even invited tg) and screwing up the algorithms.

    Also, i know very well that many of the events could have been merged together and families or whatever could have been used as well, but i just wanted to see this thing work, not be the most optimized game ever made.Stiivais2013-11-27 07:01:36

    Hello bro, please repost your link dropbox. i want to play your game

  • silentreader

    This is a very old thread and Stiivais hasn't been on here for over a year.

  • Hmm, i'm sorry

  • Hmm, i'm sorry

    Unfortunately, your only option may be to hope that some other user still has the .capx in question and will post it for you.

    Wait a few days to see if anyone responds.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)