I started to get know the engine. But i have problems.
For example: Can't save the "log.txt",
and what i don't understand in this code: why the cubes move away?
Source code: http://pastebin.com/iKDmysDe
love.graphics.rectangle("fill", x, y, 10, 10 )
The loop runs at 20 times (this is OK), but why the cubes move?
I want only to draw a straight line, about cubes.
Sorry for my bad englisth.
Cubes
Re: Cubes
Code: Select all
Windows XP: C:\Documents and Settings\user\Application Data\LOVE\ or %appdata%\LOVE\
Windows Vista and 7: C:\Users\user\AppData\Roaming\LOVE or %appdata%\LOVE\
Linux: $XDG_DATA_HOME/love/ or ~/.local/share/love/
Mac: /Users/user/Library/Application Support/LOVE/
As for why the cube moves away, in your love.draw function:
Code: Select all
while i <= 20 do
i = i + 1
x = x + 10
love.graphics.rectangle("fill", x, y, 10, 10 )
love.graphics.print("In x varible: "..x, 400, 10)
end
Re: Cubes
If you look at the code, every single frame you increase the x position 20 times (10 * 20 = 200 pixels). So within 10 frames (1/6th of a second), your object is pretty much guarenteed to be off the screen.naburus wrote:You right, file saving works but another directory. Ty
Sry my cubes dont moving, only missing. When my loop finish, all cubes gone. Why?
Who is online
Users browsing this forum: Bing [Bot] and 0 guests