Very Custom Terrain Help
Posted: Wed Apr 01, 2009 7:26 am
Hello,
I am making a game where you can edit the terrain with a mouse by raising or lowing some vertices that you select with your mouse.
I made a terrain from a mesh by placing the vertices, 50 squares, 25*25 each, and I would like to page it to make it really really infinite.
Could anyone tell me what's the best and fastest method to save the whole meshbuffer into a binary file so the game loads it (or create it with all vertices to 0 if it doesn't exist) when I getting close to the next terrain to load please ?
I've tried to write the meshBuffer directly with fwrite but I just see 4 characters like @ ~, I don't think that's the whole terrain.
Thanks a lot.
I am making a game where you can edit the terrain with a mouse by raising or lowing some vertices that you select with your mouse.
I made a terrain from a mesh by placing the vertices, 50 squares, 25*25 each, and I would like to page it to make it really really infinite.
Could anyone tell me what's the best and fastest method to save the whole meshbuffer into a binary file so the game loads it (or create it with all vertices to 0 if it doesn't exist) when I getting close to the next terrain to load please ?
I've tried to write the meshBuffer directly with fwrite but I just see 4 characters like @ ~, I don't think that's the whole terrain.
Thanks a lot.