Amateur 2D Game Engine written in C++ 14 & modern OpenGL with SDL2 and scripting in lua
Simple moving script supported by Cerium
local speed = 100
-- Function running once, at start of game
function init()
end
-- Function running non-stop
function update(deltaTime)
if eventManager.isKeyPressed(KEY_RIGHT) then
this.move(vec2.new(speed * deltaTime, 0))
elseif eventManager.isKeyPressed(KEY_LEFT) then
this.move(vec2.new(-speed * deltaTime, 0))
elseif eventManager.isKeyPressed(KEY_UP) then
this.move(vec2.new(0, -speed * deltaTime))
end
end
Coming soon!
To see the license of Cerium, open LICENSE file.
Logo created by Vunny (Rafał Michałuszek)