Terrain?

Maybe it's because I'm new to breve, or maybe I'm just stupid, but how do I enable the fractal terrain thing? There's got to be some really basic thing I'm missing, but I can't think of it.

Download the full breve release

The full breve release comes with demos of using the terrain feature with physical walkers. You can use that as an example of how to add terrain to the Creatures simulation.

It should be just a couple of lines of code to copy and paste, to replace the Floor in the Creatures simulation with a Terrain object.

- jon

Got it working but....

Okay, I did that and it sort of worked, but now the terrain is solid black. No shading, no nothing but black. I can't get it in wireframe, either. here's the relevant source:

@use PhysicalControl.
@use DirectedGraph.
@use Link.
@use Stationary.
@use MultiBody.
@use GeneticAlgorithm.
@use Terrain.

Controller VirtualCreatures.

PhysicalControl : VirtualCreatures {
+ variables:
running (int).
dg (object).
body (object).
flag (object).
terrain (object).

startlocation (vector).

parser (object).

ga (object).

+ to init:
terrain = new Terrain.
terrain generate-fractal-terrain with-ruggedness .4 with-height 15.
terrain set-scale to 3.
terrain set-eT to .9.
terrain draw-wireframe.

flag = new Mobile.
flag disable-physics.
flag set-shape to (new Sphere init-with radius .2).
flag set-color to (0, .5, .5).
flag set-label to "Start".

However, It is only solid black in the screensaver, not in the actual breve environment. In the application, it looks as it should.

Fixed.

The screensaver doesn't work with jpgs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.