Off topic I would like to say from what I've read while looking for an answer using the search function as well as other random browsing I really like the community here and am glad to be taking my first step to become a part of it.

Code: Select all
stars = {}
for i = 1,nStars do
stars[i] = {}
stars[i].x = math.random()*screenWidth
stars[i].y = math.random()*screenHeight
end
Code: Select all
starOffset = (starOffset + dt) % screenWidth
Code: Select all
for i = 1,nStars do
local thisX = (stars[i].x + Offset) % screenWidth
local thisY = stars[i].y
-- either draw an image:
love.graphics.draw(starImage,thisX,thisY)
-- or a circle
love.graphics.circle(fill,thisX,thisY,radius,segments)
end
Users browsing this forum: Bing [Bot] and 5 guests