Lunch time coding...

Community Forums/Showcase/Lunch time coding...

Rob Farley(Posted 2004) [#1]
Graphics3D 640,480,0,2

size=128

mesh=CreateTerrain(size)
PositionEntity mesh,-size/2,0,-size/2
TerrainShading mesh,True
EntityShininess mesh,1
ScaleEntity mesh,1,50,1
TerrainDetail mesh,10000

camera=CreateCamera()
light=CreateLight(2)
PositionEntity light,2000,2000,-100

pivot=CreatePivot()
MoveEntity camera,0,size,-size
EntityParent camera,pivot
PointEntity camera,pivot

hsize=size/2
offset#=0

frequency#=0.6
speed#=10

Repeat

TurnEntity pivot,0,1,0

For x=0 To (size/2)-1
For y=0 To (size/2)-1
i=((size/2)-(Sqr((x*x)+(y*y))))*7

h#=(Sin((i*frequency)+offset)/2)+.5

	ModifyTerrain mesh,x+hsize,y+hsize,h
	ModifyTerrain mesh,hsize-x,y+hsize,h
	ModifyTerrain mesh,x+hsize,hsize-y,h
	ModifyTerrain mesh,hsize-x,hsize-y,h

Next
Next

offset=offset+speed

UpdateWorld
RenderWorld
Flip

Until KeyHit(1) 



Ross C(Posted 2004) [#2]
Look at it when i get home. Lunch time is when i get ALOT of stuff done :) Pity i only get 2 per week :)


napole0n(Posted 2004) [#3]
Nice effect :)


Genexi2(Posted 2004) [#4]
Nice terrain effect, I remember see'in a similar effect done by creatin' a mesh instead and applyin' basically the same thing....aside from the the fact the mesh wasnt solid like your terrain there.


BlackJumper(Posted 2004) [#5]
Any chance of adding this as an option in Droplet 3 ?
(Just kidding !)

Nice as this was (quite impressive in its own way) I do hope that this isn't an example of your 'changed priorities'. The fact that I haven't yet achieved great things in BB even though I have Droplet to speed up my development just shows what an important contribution talented guys like yourself are making. If we all had to build our own tools as well as our games some of us would get very little done.

Thanks Rob


jhocking(Posted 2004) [#6]
I hardly think a couple dozen line demo indicates "changed priorities."


Ice9(Posted 2004) [#7]
http://members.cox.net/notatspublic/WCRelease.rar

I did WaveCandy a few years ago