Hacker News new | past | comments | ask | show | jobs | submit login

The intermediate steps of development were as follows:

1. Draw a big rectangle of flat-shaded ground (no textures, no heightmaps) tiled into triangles of equal size. Mouse navigation to fly over it.

2. Move the vertices vertically according to a formula - a procedural heightmap - e.g. a sine wave.

3. Add subdivision of triangles into smaller triangles as needed, like in ROAM (http://www.llnl.gov/graphics/ROAM/roam.pdf).

4. Solve hidden surface removal. This is easy because the triangles form a bintree-like structure, treat it as a BSP and draw back to front.

5. Implement loading of texture tiles. (Do you have those?) The scale of the texture to load for each triangle depends on its transformed Z value.

6. Implement loading of heightmaps in your preferred format.

7. Debug, optimize, debug, optimize, debug, optimize.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: