3 ms·
Show HN: HTML5 Ping-Pong Game
- mukundmohan 14y agoVery nice. I like it.
- sopooneo 14y agoThat is cool. I love the touch of the little dust explosions off the paddles. For anyone else that wants to start playing with canvas, let me relate a gotcha that drove me absolutely nuts. And if I'm mistaken on this, someone please set me straight. The issue: You can not paint pixels directly onto a canvas. Instead you create a buffer of specified dimensions, indicate what colors to make its pixels, then overlay that buffer onto the canvas at a specified location. So it is possible to wrap that functionality up into an api that lets you simulate direct pixel painting, but it is not possible with raw javascript. Lines and other shapes, on the other hand, can be rasterized directly onto the canvas.
- nekgrim 14y agoWhat if you paint a 1px line?
- freehunter 14y agoAre there any good tools/frameworks for HTML5 games yet? Every time I see a rundown of how a developer made an HTML5/JS game, the common complaint from that dev is that the tools are far from mature and they had to recreate X and Y by hand.
- davidstith 14y agoNice job! I was looking for something like this for a project I'm working on. Just FYI - If I resize the window to the width of the paddles I can play forever :) http://imgur.com/ukxi8 http://imgur.com/ukxi8