I also have the source of Torque 3D if I need to do some kind of C++ stuff.
1. Badspot does not accept has never accepted foreign C++ code.2. Why can't you just do a cubescape?
if you can make a height field (gray-scale bitmap) - then you can import that into the mission editor. or if you want it made out or bricks -- just write your own .bls file and load that.
Well I was wondering how Minecraft worked with terrain, and I figured Perlin noise had something to do with it, and I just don't know how to actually do Perlin Noise in Torque. Also I was planning on doing this with T3D, just as a practice project.
See, thats what I was wondering, is if you can make a "height field" directly in Torque.
1. Badspot has never accepted foreign C++ code.
function serverCmdPerlinTest(%client,%width,%length,%depth,%iters){ if(!%client.isSuperAdmin || !isObject(%client.player)) return; %ppos = %client.player.getPosition(); %px = getWord(%ppos,0); %py = getWord(%ppos,1); %pz = getWord(%ppos,2); if(!%iters) %iters = 4; %perlin = new ScriptObject() { class = perlin; }; %size = %width * %length; %quality = 2; %z = getRandom() * %depth; for(%j=0;%j<%iters;%j++) { for(%i=0;%i<%size;%i++) { if(%data[%i] $= "") %data[%i] = 0; %x = %i % %width; %y = mFloor(%i / %length); %data[%i] = %perlin.noise(%x / %quality,%y / %quality,%z) * %quality; } %quality *= 4; } for(%x=0;%x<%width;%x++) { for(%y=0;%y<%length;%y++) { %bx = %px + (%x * 2); %by = %py + (%y * 2); %bz = %pz + mFloor(%data[%x + %y * %width] * 0.2); %bpos = %bx SPC %by SPC %bz; %brick = new fxDTSBrick() { position = %bpos; datablock = brick4xCubeData; isPlanted = 1; client = %client; colorID = 2; }; %brick.setTrusted(1); %brick.plant(); %client.brickGroup.add(%brick); } } %perlin.delete();}
That is pretty awesome. So I don't even need a height field to make terrain?
-snip-
You're making a mod for a game about building with bricks and your first instinct is to use something other than bricks to make terrain.What.
Also I was planning on doing this with T3D, just as a practice project.