views:

516

answers:

4

I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode.

Any idea how/where to find one?

(I'm assuming that since Blender3D has game programming capabilities, it is OK for someone to ask in SO)

+2  A: 

Is this link related?

http://blenderartists.org/forum/showthread.php?t=77794

To generate terrain (height map) the algorithm is pretty simple (fractal plasma), something like this algorithm (Java):

http://www.sinc.stonybrook.edu/stu/jseyster/plasma/

If you Google search for "fractal plasma python" you might find some example code.

Jared Updike
A: 

You should be able to reprogram most of the python scripts available to generate terrain for rendering to generate terrain for your game... is there a specific thing you need from the script to make it suitable for realtime gameplay instead of a static render?

D.J. Capelis
A: 

@Capelis yes, the game has random levels.. That's why I want to programmatically generate random terrains. What are the "most of the python scripts available to generate terrain for rendering" and where can I find them to reprogram as you say.

pek
A: 

I've not really worked much with the game engine, but how about generating a random cloud texture and using that to displace the model? Wouldn't that be easier?

pypmannetjies