Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.39 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.39 KB

Amateur 2D Game Engine written in C++ 14 & modern OpenGL with SDL2 and scripting in lua

Lua scripting example

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

Installation

Coming soon!

Third parts

Licensing

To see the license of Cerium, open LICENSE file.

Logo

Logo created by Vunny (Rafał Michałuszek)