--Hephaestus Pong like example pongScene = scene:new() --Create a new scene paddle = sprite:new("textures/paddle.png") --load a sprite, the paddle paddle:reParentTo(pongScene) --The root node in the scene graph will --be the pongScene paddle:setScale(1.0, 1.0) --Set the scale of the sprite, completely optional paddle:setPosition(10, 10) --Offset by it's parent. (x, y) coords position = 10 --Remember, this is global without the "local" keyword function movePaddle() paddle:setPosition(paddle:currentX() + position, paddle:currentY()) position = position + 1 end pongScene:addTask("movePaddle") --Add's a task to the pongScene's task --queue. Every iteration of the scene --every task in the queue will be called once --per frame or at specific intervals game:pushScene(pongScene) --Game is the global game engine. This pushes the --game state "pongScene" onto the game state machine's --stack. We might want to make this an iterated queue --at some point if we need multiple states to run --concurrently. Something to think about.