| HTML5 PONG | |
|---|---|
| Tweet Topic Started: Tuesday, 21. June 2011, 10:47 (715 Views) | |
| Andrew | Tuesday, 21. June 2011, 10:47 Post #1 |
![]()
ぼくたちがすべてはばか。
|
So I'm making a game of Pong. Right now you can click the canvas and the ball will move to where you clicked. Pretty simple what I have done so far. http://pro-online.zxq.net/portfolio/ponged/index.html I'll finish this over the course of the week. Edited by Andrew, Wednesday, 22. June 2011, 15:53.
|
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| Oracle | Tuesday, 21. June 2011, 10:53 Post #2 |
![]()
Level 8
|
Wow that's awesome. I can't wait to play the actual game.
|
Visit my shop! Forum reviews, posting packages, recolors![]() ![]() ![]() Me! | |
Off
Profile |
Quote Top
|
| Geoffrey | Tuesday, 21. June 2011, 10:56 Post #3 |
![]()
It's a love story, baby just say yes
|
It messes up if you click too much, too quickly.
|
Consider this statement my permission to convert my themes to other platforms. Please link back to http://geoffreykoester.com. Be sure to rehost all theme images on the new platform as we do not know how long they will redirect. Also some boards hosting theme/skin images may not survive the move.![]() Other Sigs Awards & Memories
| |
Off
Profile |
Quote Top
|
| Alam | Tuesday, 21. June 2011, 11:38 Post #4 |
|
Level 6
|
It also tends to lag a bit because you have to move the ball so often (it looks like ~1 px at a time). I would suggest increasing the amount that the ball moves from each call of your recursive function. |
![]() Credit to Sarah for the signature. <3 Spoiler: click to toggle
| |
Off
Profile |
Quote Top
|
| Andrew | Tuesday, 21. June 2011, 21:18 Post #5 |
![]()
ぼくたちがすべてはばか。
|
I actually just used a slope formula and then simplified it to see how many pixels to move it by. I'll fix the lag thing later. Time to utilize animation frames. |
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| Andrew | Wednesday, 22. June 2011, 15:54 Post #6 |
![]()
ぼくたちがすべてはばか。
|
Okay the game demo is up. Just need to fix a couple of bugs and rework the physics of the game. |
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| Aidan | Wednesday, 22. June 2011, 15:57 Post #7 |
![]()
Level 12
|
Nice improvements, though it still needs work (again). Haha, I can't wait for the final outcome.
|
Off
Profile |
Quote Top
|
| Oracle | Thursday, 23. June 2011, 03:43 Post #8 |
![]()
Level 8
|
I don't like how you have to keep on pressing a button to go down and up. This is awesome though. |
Visit my shop! Forum reviews, posting packages, recolors![]() ![]() ![]() Me! | |
Off
Profile |
Quote Top
|
| jay00 | Thursday, 23. June 2011, 05:04 Post #9 |
![]()
Level 2
|
I have to agree. But this is great, especially because I'm not familiar with any HTML5... yet Great work Pro, keep it up!
|
Off
Profile |
Quote Top
|
| Andrew | Thursday, 23. June 2011, 07:28 Post #10 |
![]()
ぼくたちがすべてはばか。
|
The reason you have to keep doing so is because if two people hold down buttons at the same time then the person who was late won't move. |
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| Reid | Thursday, 23. June 2011, 10:35 Post #11 |
![]()
Es una trampa!
|
Use an event loop. That'll solve your problem quite nicely. I wrote up this example. Excuse the shoddy coding: http://jsfiddle.net/JLSaF/ Of course, you can use setTimeout to avoid setInterval problems, since this is going to be an intensive script, and you can reduce the spacing of the timeouts/intervals for a more fine-tuned control (I find 20ms to work exceedingly well, actually). |
| Reid | |
Off
Profile |
Quote Top
|
| Andrew | Thursday, 23. June 2011, 13:54 Post #12 |
![]()
ぼくたちがすべてはばか。
|
Thanks now I'm just trying to figure out why it speeds up so much after a few rounds.
|
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| FallenShadow | Thursday, 23. June 2011, 16:04 Post #13 |
The Stoner Artist
|
lol the paddles wouldn't move |
|
www.FallnShadw.com Personal and Professional Portfolio. Officially Open. | |
Off
Profile |
Quote Top
|
| Andrew | Thursday, 23. June 2011, 17:09 Post #14 |
![]()
ぼくたちがすべてはばか。
|
Try clicking the page and try again. |
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| Cody | Thursday, 23. June 2011, 17:23 Post #15 |
![]()
Winter is coming.
|
Very nice, although after one goal the ball starts to go ridiculously fast.
|
![]()
| |
Off
Profile |
Quote Top
|
| Andrew | Thursday, 23. June 2011, 17:40 Post #16 |
![]()
ぼくたちがすべてはばか。
|
That's already a known issue. I'm working on fixing it. |
![]() Professional web design/development services. • http://wildandrewlee.com/ | |
Off
Profile |
Quote Top
|
| buyessay | Thursday, 14. July 2011, 08:28 Post #17 |
Level 1
|
It is not clear how it works. And sometimes buggy |
Off
Profile |
Quote Top
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Theme & Layout Display · Next Topic » |
| Track Topic · E-mail Topic |
10:10 AM Jul 11
|
Powered by ZetaBoards Premium · Privacy Policy



Multi
Multi


I can't wait to play the actual game.




Thank you Brendan for the image! 
































10:10 AM Jul 11


Outline Live