PDA

View Full Version : terrain generation in a war-tank game



wow
01-07-2004, 09:37 AM
Hi all, I would like to ask if you are going to develop a war tank game that is going to accommodate near a hundred user (each have a tank and can attack other users), then the terrain must be very large. By what means would you create the heightmap of the terrain?

dorbie
01-07-2004, 12:16 PM
Look here: http://www.vterrain.org/

wow
01-08-2004, 06:39 PM
But I think if I use the model in the vterrain.org, it seems not very suitable for my war tank game since I need coordinate when the tank is on the terrain. Further, I just wonder how can I generate a terrain in realtime? It seem that over hundred tank on a terrain need a very large size.. I can't find much material on that.

**P.S. I am afraid that I have "cross-post" again. ( I have posted a similar questino in the hardware, game forum. Sorry for that as I don't know where should I ask the question) This will be my last time.

Could anyone give me some link which directly tell people how to generate a terrain in REAL-TIME and LARGE enough to accomdate hundred user? THANK a lot! I am really in trouble for the terrain generation

Andrea Rossini
01-08-2004, 11:19 PM
This is just a suggestion

Create a 2D array of floats of x y dimensions, then fill it with random numbers between -1.0 and +1.0
You created an height grid in this way.

Now (assume that z is for UP) points in 3D space are:

x * 2, y * 2, grid[x][y]

the *2 allow you to have a terrain without high peaks.

When you render use optimizing tecniques to speed up the game.
It wold be nice to render triangles this way:



+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|/|\|/|\|/|\|/|\|/|\|/|\|/|\|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|\|/|\|/|\|/|\|/|\|/|\|/|\|/|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|/|\|/|\|/|\|/|\|/|\|/|\|/|\|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|\|/|\|/|\|/|\|/|\|/|\|/|\|/|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


where + are the grid points.


Hope this helps

wow
01-09-2004, 12:28 AM
Thank you very much for your kindful help! I would like to ask one further question, how can I achieve real-time and fast rendering in this way? Sorry that because I am just a beginning in writing a terrain and using the OpenGL, I dont have much understanding and the concept on the geneartion. Really thank for your help

Alessandro_dup1
01-12-2004, 04:52 AM
Check www.vterrain.org (http://www.vterrain.org)