for every 20 pixel draw picture?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
for every 20 pixel draw picture?
its been awhile since ive had programmed lua and im making a game about space and i want it to draw a star for every 20 - 30 pixel how do i do that?
Re: for every 20 pixel draw picture?
every 20 - 30 pixels..
You could use one or two for loops.
but this does not look like space at all
Maybe you want to set the positions randomly with math.random().
You could use one or two for loops.
Code: Select all
function love.draw()
for y = 1, love.graphics.getHeight() / 20 do
for x = 1, love.graphics.getWidth() / 20 do
love.graphics.rectangle( "fill", 20 * x, 20 * y, 5, 5 )
end
end
end
Maybe you want to set the positions randomly with math.random().
Re: for every 20 pixel draw picture?
yes gonna look at it later thanks
Who is online
Users browsing this forum: Bing [Bot] and 5 guests