This blog post discusses how we organize our foliage data with patches. The previous blog post mentioned that we separate foliage rendering into full-3D objects near the camera, and 2D billboard proxies further away (and for small objects near the camera). This data drives our rendering of both 2D and 3D objects.
This blog series discusses some ideas and issues around rendering foliage. We provide a sample program (with source code) to demonstrate the ideas.
Last year, I wrote a blog about creating your own simple collision detection code. I implemented this for a children's math game I created. You can refer to my blog here: