Page 1 of 1

Terrain

Posted: Tue Jan 22, 2013 5:25 pm
by vkreal
iforce2d do you have any plan for advance topic on Terrain. It would be interesting to see how to implement endless Terrain.

Thanks!

Re: Terrain

Posted: Wed Jan 23, 2013 6:13 am
by iforce2d
Yes probably sometime I will. Ray Wenderlich has a pretty good tutorial about that, you could check that one out. I think he uses polygons whereas I would prefer chain shapes though, because they do not have the sticking in the ground problem, and you can easily make concave shapes.

I think the typical approach is to generate discrete chunks of terrain that can be loaded and destroyed on the fly, and you would want to make sure the edges of the chunks match up. This can sometimes cause issues with stuttering as each chunk is loaded, if the chunks are too large. If you wanted to, you could load individual edges and set their ghost vertices, that should eliminate the stuttering problem.