Normally Leadwerks source should be put on the Leadwerks Werkspace, but as the EULA has no mention of this, I will make an exception to show how easy it is.
#include "leconstants.dba"
dummy = Initialize(0)
dummy = Graphics(640,480)
RegisterAbstractPath "C:/Leadwerks Engine SDK/"
fw = CreateFramework()
camera = GetLayerCamera(GetFrameworkLayer(0))
PositionEntity camera,vec3(0.0,2.0,-4.0),0
material = LoadMaterial("abstract::cobblestones.mat")
sphere = CreateSphere(32,0)
PaintEntity sphere,material,0
global sphere_body
sphere_body = CreateBodySphere(0.5,0)
PositionEntity sphere_body,Vec3(0.0,8.0,0.0),0
EntityParent sphere,sphere_body,0
SetBodyMass sphere_body,1.0
flr = CreateCube(0)
ScaleEntity flr,Vec3(100.0,1.0,100.0)
flrbody = CreateBodyBox(100.0,1.0,100.0,0)
EntityParent flr,flrbody,0
PaintEntity flr,material,0
Collisions 1,1,1
EntityType sphere_body,1,0
EntityType flrbody,1,0
light = CreateDirectionalLight(0)
RotateEntity light, Vec3(45.0,45.0,45.0),0
repeat
campos = entityposition(sphere_body,0)
positionentity camera,campos,0
moveentity camera,vec3(0,4,-16),0
if keydown(KEY_W)
AddBodyForce sphere_body,vec3(0,0,1),1
endif
if keydown(KEY_S)
AddBodyForce sphere_body,vec3(0,0,-1),1
endif
if keydown(KEY_A)
AddBodyForce sphere_body,vec3(-1,0,0),1
endif
if keydown(KEY_D)
AddBodyForce sphere_body,vec3(1,0,0),1
endif
UpdateFramework
RenderFramework
Flip 0
until AppTerminate()
dummy = Terminate()
end
If anything, I suppose it will just give Josh a little free advertising, lol.