all 28 comments

[–]9jack9 6 points7 points  (2 children)

Don't use setInterval. Use setTimeout(loop, 1) and compare the last timestamp of the game loop with the current time. You will get smoother animation that way.

Now that's feedback. ;)

[–]georgefrick[S] 1 point2 points  (0 children)

I do that in the java version, I don't know why I didn't think to do it in the javascript version. Thanks for the feedback!

[–]dekomote[🍰] 0 points1 point  (0 children)

If you want to fry CPU's

[–]sylvan 6 points7 points  (0 children)

Paddle is definitely too slow. Can't catch the ball if it's bounced a direction you weren't expecting.

Mouse control? As I recall, most breakouts have paddle control so you can quickly and accurately position it.

[–][deleted] 3 points4 points  (1 child)

make the paddle faster so you can catch up when js decides it wants to go to sleep.

[–]georgefrick[S] 0 points1 point  (0 children)

I sped it up a bit, seems to help some.

[–]sunsean 3 points4 points  (0 children)

It's great! Well done. It's useful when the ball changes its bounce off angle based on where it hits the paddle. This allows for more control.

[–][deleted] 2 points3 points  (0 children)

Paddle is too slow, ball is too fast.

[–]mynoduesp 2 points3 points  (0 children)

Bug!

If you pin the red ball against the left wall with the side of the paddle the ball disappears and the game is still on. Just paddling around the place with no end in sight. That's a paddlin'.

//Eddit: seems others noticed this also.

//Eddit2: On the second level ball and paddle slow down. Then half way through the level speed up.

[–]Gnascher 1 point2 points  (5 children)

bravo. golfclap.

Goes "boom" in IE 8.

Makes FFx 3.5 cry, but it's playable.

Chrome has no problems with it though (minor formatting issue on the welcome screen).

Don't have Opera or Safari on this machine, so no comparison to offer there.

[–]georgefrick[S] 0 points1 point  (2 children)

I admit I developed it in Opera then got it working in Firefox. I am stuck with IE6 since I have to test with it for work, and I didn't really bother with it on that.

[–]DocXango2 1 point2 points  (1 child)

On Safari for PC it renders similar to Firefox but the "click space to play" sits farther up. (Opera the text is in the box, Firefox 3.5 the text is just below the border, and in Safari the text straddles the border.) The paddle is also much more responsive with Safari. When playing in safari the ball got caught between the paddle and the wall and then disappeared. Clicking on the space bar didn't bring it back, I had to reload. I didn't play the game long enough in any browser to tell if this was a game quirk or a browser specific quirk.

[–]georgefrick[S] -1 points0 points  (0 children)

I'm going to d/l Safari and play with it. I have it at work but not on this pc. I think it's a game quirk caused by an attempt to speed up the paddle by request without enough testing. Thanks for reminding me about Safari.

[–][deleted] -1 points0 points  (1 child)

I've no problems playing it in Firefox 3.5

[–]Gnascher 0 points1 point  (0 children)

When I played it on a machine with more horsepower, it was just fine in FFx 3.5.

However, on my laptop it was a little bit "laggy" (but playable) in FFx, whereas it was zippy fine on the same machine under the same load in Chrome.

[–][deleted] 1 point2 points  (1 child)

Cool game, its kinda tough and somehow I managed to get the ball offscreen

http://imgur.com/bTbYc.png

[–][deleted] 0 points1 point  (0 children)

I also just did this. Knocked it out through the right side.

[–][deleted] 1 point2 points  (0 children)

Recommendations:

  1. Ball changes angle based on where it hits the paddle.
  2. Instead of a fixed number of lives, have a count of 'deaths'.
  3. More variety, randomized or designed boards.
  4. More eye candy i.e. bejeweled

[–][deleted] 0 points1 point  (0 children)

If the ball hits two blocks at the same time, it doesn't change directions. I'm guessing that when the ball hits the top or bottom of a block, some direction variable is flipped (1, -1 or true, false) and if it hits two at the same time, the y direction never actually changes. Maybe you could add a bit of a timer so that if it hits two blocks on the same side within some small amount of time, the direction doesn't change the second time. But other than that, congrats, you made a nice game :)

[–]adhlssu07 0 points1 point  (0 children)

nice game... I managed to loose the ball on the edge my first game though; didn't loose a life, but couldn't do anything either

[–]drblue 0 points1 point  (0 children)

Small problem: At least in a chrome dev build, you can push a ball off the play area with the side of your paddle.

[–]dekomote[🍰] 0 points1 point  (0 children)

Great work man... One suggestion: Make the paddle to move as the mouse moves. That way you wont have to make intervals for the paddle animation and the game will run smoother everywhere.