Yue
New member
- Joined
- Jun 21, 2017
- Messages
- 1

Hello, I present my prototype video game engine for Windows operating systems. Which the user can program with Lua Scripts.

Code:
--******************************************
--| Fichero : Main.lua / Gear3D
--| Nota : Fichero de entrada Script.
--| No cambiar el nombre Main.lua
--******************************************
-- Módulos.
KeyCode = require "Scripts.Modulos.KeyCode"
teapot = 0
True = 1
False = 0
sun = 0
CSystem.fullScreen = False
CSystem.G3D(800,600)
camara = CCam.CreateCamera()
CControl.SetPosEntity( camara, 0, 0, -5.0 )
sun = CLight.CreateLight(1)
teapot = CMesh.LoadMesh("Teapot.b3d")
CControl.SetPosEntity ( teapot,0, 0, 0)
CControl.SetRotEntity ( teapot, 10, 10, 10 )
CControl.SetColorEntity( teapot, 255, 255, 0 )
function Update()
if CInput.KeyDown( KeyCode.W() ) == True then
CControl.TranslateEntity( teapot, 0, 0, 1.0 )
end
if CInput.KeyDown( KeyCode.S() ) == True then
CControl.TranslateEntity( teapot, 0, 0, -1.0 )
end
if CInput.KeyHit( KeyCode.Escape() ) == True then
CSystem.Close()
end
CControl.TurnEntity ( teapot, 1, 1, 1,1 ) -- Turn teapot.
end
Last edited by a moderator: