10"> Generating random terrain | Torque X 2D | Forums | Community | GarageGames.com

Game Development Community

Generating random terrain

by luggage · in Torque X 2D · 06/13/2008 (8:20 pm) · 1 replies

Hello

I've created a starter kit and got that working ok. I'm trying to change the terrain to use a randomly generated one. I've changed the data section in my .txscene to...


1024
1
10
data/terrains

true


But it just crashes on the PC with a...

"The operation was aborted. You may not modify a resource that has been set on a device, or after it has been used within a tiling bracket."

At line 90 in ClipMapDebugImageCache.cs.

Any ideas? And how does it know what textures to use? I know I'm doing something stupid here but I can't find much reference to this.

Thanks!

Scott

#1
06/14/2008 (8:18 pm)
If I comment out the offending line it works and I can generate a random terrain now. Trouble is it's coming out entirely black. Has anyone managed to generate a random terrain and have textures?

A small bit of example code with a new terrain on a button press would be pretty awesome.