Hacker News new | ask | show | jobs
by dmarlow 1419 days ago
Great work. The examples are fantastic. Code looks really clean, but there's quite a bit of magic going on that's not immediately understandable. For example, in the flappy bird clone, how are the pipes' placement determined?
1 comments

The playfield is a moving camera view on a static world.

The bird moves forward constantly, the camera follows the bird, and the pipes spawn at a fixed location one screen width ahead of the bird.