Skip to content

Instantly share code, notes, and snippets.

@walesmd
Created October 8, 2010 16:12
Show Gist options
  • Select an option

  • Save walesmd/617043 to your computer and use it in GitHub Desktop.

Select an option

Save walesmd/617043 to your computer and use it in GitHub Desktop.
directions = {up = {x = 0, y = -1}, down = {x = 0, y = 1}, left = {x = -1, y = 0}, right = {x = 1, y = 0}}
function love.load()
game = {}
game.width = love.graphics.getWidth()
game.height = love.graphics.getHeight()
player = {}
player.x = game.width / 2
player.y = game.height / 2
player.color = {255, 255, 255}
love.graphics.setBackgroundColor(0, 0, 0)
end
function love.update(dt)
end
function love.draw()
love.graphics.setColor(unpack(player.color))
love.graphics.point(player.x, player.y)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment