Make games on your phone.
Get the app!
AndroidiOS
Castle
play5.6k
132
19 Comments
Next up
3D shapes ai test
More from @LusoR ↓
Bro can create 4D on castle 2 years larer
fire2Reply
THIS LOOKS SO 3D
Reply
Bro used witchcraft in a 2d app-
Reply
This is very geometry maybe we could dash?
Reply
If you want to use these models, you just need to look at the game's source code and grab the codes for each object you want.
Reply
local rx = 0 local ry = 0 function onCreate() my.variables.rotSpeedX = math.random() * 2 + 1 my.variables.rotSpeedY = math.random() * 2 + 1 my.variables.colorR = math.random() * 0.3 + 0.3 my.variables.colorG = math.random() * 0.3 + 0.6 my.variables.colorB = math.random() * 0.2 + 0.8 end function onUpdate(dt) rx = rx + (my.variables.rotSpeedX or 1.2) * dt ry = ry + (my.variables.rotSpeedY or 1.8) * dt end function onDraw() local size = 0.45 local rawVerts = { {0, -size, 0}, {0, size, 0}, {-size*0.7, 0, -size*0.7}, {size*0.7, 0, -size*0.7}, {size*0.7, 0, size*0.7}, {-size*0.7, 0, size*0.7} } local rotVerts = {} for i, v in ipairs(rawVerts) do local x, y, z = v[1], v[2], v[3] local cy, sy = math.cos(ry), math.sin(ry) local x1 = x * cy + z * sy local z1 = -x * sy + z * cy local cx, sx = math.cos(rx), math.sin(rx) local y2 = y * cx - z1 * sx local z2 = y * sx + z1 * cx rotVerts[i] = {x1, y2, z2} end
Reply

More from @LusoR

See all from @LusoR →