Does this help you to get started?
Rem LKW - Basic setup
Sync On
Sync Rate 60
Hide Mouse
Color Backdrop rgb( 101, 156, 248 )
Rem LKW - Position camera
Autocam Off
Position Camera 500, 50, 0
Rem LKW - Make a simple ground object
ground( 1000, 30 )
Rem LKW - Create the cursor object
make_torch( 1 )
Rem LKW - Loop it
Do
position_torch( 1, 750 )
Sync : Loop
Rem LKW - ----------------------------------------------------------------------
Function make_torch( objectID )
Make Object Plain objectID, 12, 25
Set Object Light objectID, 0
Disable Object zDepth objectID
EndFunction
Function position_torch( objectID, distance# )
Local camx# As Float
Local camy# As Float
Local camz# As Float
Local objx# As Float
Local objy# As Float
Local objz# As Float
camx# = Camera Position X(0)
camy# = Camera Position Y(0)
camz# = Camera Position Z(0)
Point Object objectID, camx#, camy#, camz#
Pick Screen MouseX(), MouseY(), distance#
objx# = camx# + Get Pick Vector X()
objy# = camy# + Get Pick Vector Y()
objz# = camz# + Get Pick Vector Z()
Position Object objectID, objx#, objy#, objz#
EndFunction
Rem LKW - ----------------------------------------------------------------------
Function ground( size, tile )
Ink RGB( 0, 200, 0 ), 0 : Box 0,0,16,16 : Get Image 1, 0,0,16,16
Make Matrix 1, size, size, tile, tile
Randomize Matrix 1, 5
Set Matrix Wireframe Off 1
For x = 1 to tile-1 : For y = 1 to tile-1
x# = Sin( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x-1,y)-Get Matrix Height(1,x,y) )) )
y# = Cos( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x-1,y)-Get Matrix Height(1,x,y) )) )
z# = Sin( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x,y-1)-Get Matrix Height(1,x,y) )) )
Set Matrix Normal 1, x, y, x#, y#, z#
Next y : Next x
Prepare Matrix Texture 1, 1, 1, 1
Update Matrix 1
EndFunction
Alternatively you can achieve same (if not better) effect in less code using Lock command (line31). But I failed to have it work on all resolutions, maybe you can play around with some values though. (snippet below should work on 640x480 and 1024x768, currently resolution in code is 1024x768).
Rem LKW - Basic setup
Set Display Mode 1024, 768, 32
Sync On
Sync Rate 60
Hide Mouse
Color Backdrop rgb( 101, 156, 248 )
Rem LKW - Position camera
Autocam Off
Position Camera 500, 50, 0
Rem LKW - Make a simple ground object
ground( 1000, 30 )
Rem LKW - Create the cursor object
make_torch( 1 )
Do
Rem LKW - Position
Position Object 1, (0-Screen Width()/2)+MouseX(), (Screen Height()/2)-MouseY(), Screen Width()-(Screen Height()/2)
Sync : Loop
Rem LKW - ----------------------------------------------------------------------
Function make_torch( objectID )
Make Object Plain objectID, 14, 25
Set Object Light objectID, 0
Disable Object zDepth objectID
Lock Object On objectID
EndFunction
Rem LKW - ----------------------------------------------------------------------
Function ground( size, tile )
Ink RGB( 0, 200, 0 ), 0 : Box 0,0,16,16 : Get Image 1, 0,0,16,16
Make Matrix 1, size, size, tile, tile
Randomize Matrix 1, 5
Set Matrix Wireframe Off 1
For x = 1 to tile-1 : For y = 1 to tile-1
x# = Sin( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x-1,y)-Get Matrix Height(1,x,y) )) )
y# = Cos( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x-1,y)-Get Matrix Height(1,x,y) )) )
z# = Sin( WrapValue(90-Atanfull( (size/tile)/10, Get Matrix Height(1,x,y-1)-Get Matrix Height(1,x,y) )) )
Set Matrix Normal 1, x, y, x#, y#, z#
Next y : Next x
Prepare Matrix Texture 1, 1, 1, 1
Update Matrix 1
EndFunction