I've made a quick test with 3000 moving objects (primitives without skin, I know), they don't use collision detection but adopt nicely and smoothly to the terrain:



Download source code with example here!

Instead of c_trace I interpolate between the 4 surrounding terrain vertices. The manual suggests you could use ent_getvertex and ent_nextvertex but that alone results in choppy movement.
The download includes two examples, 'level.c' and 'level_optimized.c' (all entity movement in one loop). With the latter file I only have 2.3ms script execution time on my 4-year-old notebook which I think is a pretty nice result.
Have fun experimenting with it (if you like to)! If you don't know how to use the height interpolation in your code, a game with a smaller scale is probably the better choice for you.

(Can be moved to User Contributions.)


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends