Competition: Pong Race!

Discussion and feedback on Construct 2

Post » Wed Nov 27, 2013 6:42 am

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??? Stiivais2013-11-27 07:01:16
B
10
S
1
Posts: 163
Reputation: 1,436

Post » Wed Nov 27, 2013 8:44 am

@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.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 990
Reputation: 11,229

Post » Wed Nov 27, 2013 11:58 am

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.

capx:
https://dl.dropboxusercontent.com/u/85412219/forumposts/QuickyPong.capx
Play it:
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.)Paradox2013-11-28 04:21:59
B
241
S
63
G
33
Posts: 903
Reputation: 40,729

Post » Wed Nov 27, 2013 12:53 pm

[QUOTE=Stiivais]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[/QUOTE]

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 90angle 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).
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Wed Nov 27, 2013 2:44 pm

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 ;)
B
11
S
2
G
1
Posts: 62
Reputation: 1,410

Post » Wed Nov 27, 2013 9:50 pm

[QUOTE=mindfaQ]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 90angle 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).[/QUOTE]

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.


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.


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.


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.Stiivais2013-11-27 21:52:47
B
10
S
1
Posts: 163
Reputation: 1,436

Post » Sun Dec 22, 2013 7:37 pm

Just a quick reminder about this one! Deadline is on the 24th!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 990
Reputation: 11,229

Post » Thu Nov 26, 2015 2:06 pm

Message: silentreader is not yet permitted to post plain text URLS (300 rep required). 2 URLS removed. Why?
Stiivais wrote: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 :(
B
2
Posts: 2
Reputation: 154

Post » Thu Nov 26, 2015 2:49 pm

@silentreader

This is a very old thread and Stiivais hasn't been on here for over a year.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,541
Reputation: 60,426

Post » Thu Nov 26, 2015 3:07 pm

Hmm, i'm sorry :(, how to have it without this link ? because this link is closed :(
B
2
Posts: 2
Reputation: 154

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests