Example of Game (Lua + Löve2D)
...
function love.draw()
for i = 1, numStars do
love.graphics.setColor(255 - stars[i].speed,
2
1
55 - stars[i].speed/2,
50, stars[i].speed*0.9)
love.graphics.draw(star_image, stars[i].x,
stars[i].y, 0, stars[i].speed/255 + 0.55)
end
love.graphics.setColor(255, 255, 255)
if spaceship_isBoosted == false then
love.graphics.draw(spaceship_image_normal,
spaceship_x, spaceship_y)
else
love.graphics.draw(spaceship_image_boosted,
spaceship_x, spaceship_y)
end
local totalLaserBeams = table.getn(lasers)
for i = 1, totalLaserBeams do
love.graphics.draw(laser_image, lasers[i].x,
lasers[i].y)
end
end
...