Hacker News new | ask | show | jobs
by xirium 6682 days ago
A good example to start would be BreakOut. You have a grid of tiles. Some are bricks. Some are spaces. This you can implement as an HTML <table>. The bat and the ball can be implemented as floating <div>s. You can detect the x position of the pointer and use this to control the position of the bat. When the ball hits a brick, you want the brick to disappear. If you label each tile in your grid then JavaScript can replace any tile with any other image.
1 comments

I was just thinking in terms of the original poster. There are lots of books and articles on writing "normal" games (game loop, sprites etc.). I think Javascript games would be a bit different, so I don't think they would be a good starting point. Unless you think that in the future there will only be Javascript games. For the time being, it would be much harder work to make a Javascript game look reasonably smooth, compared to other technologies.