Search found 17 matches

by SynfigMaster91
Sat Dec 16, 2017 2:41 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

here's the file. It's out there. Thanks. 10 if love.keyboard.isDown("right") then 11 10 + 40 * dt 12 end So you changed all variables to static numbers and also didn't tell lua how it should use the results of your calculations. How should LÖVE/Lua know what these calculations are for? As...
by SynfigMaster91
Fri Dec 15, 2017 7:59 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

xNick1 wrote: Fri Dec 15, 2017 7:56 pm
SynfigMaster91 wrote: Fri Dec 15, 2017 7:39 pm here's the file. It's out there.squaremoving.love

Wrong file name mate. It's square not moving xD
Ok I'm bad, I'm sorry xD
Please, check it out for me. I'm not in the mood right now.
by SynfigMaster91
Fri Dec 15, 2017 7:39 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

here's the file. It's out there.
squaremoving.love
(792 Bytes) Downloaded 196 times
by SynfigMaster91
Fri Dec 15, 2017 7:21 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

... I did as you said, but... ... Not sure if he is trolling!? No you didn't. My attached example is almost the same as your code, and it works. So try to unpack my .love file and look at the code, compare it to your code and find the problem. Also, the error handler tells you exactly where you nee...
by SynfigMaster91
Fri Dec 15, 2017 7:00 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

xNick1 wrote: Fri Dec 15, 2017 6:58 pm I'm sorry man, I don't really know how to help you.
Please consider following some tutorials.
Sheepolution has some good ones on his website, they helped me a little when I started around a year ago.
Sigh...

Fine, but if it doesn't work... I'll kiss Lua and LÖVE goodbye for good.
by SynfigMaster91
Fri Dec 15, 2017 6:55 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

... local square = {} speed = 40 function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown("left") then square.x = square.x - speed * dt end if love.keyboard.isDown("up") then square.y = square.y - s...
by SynfigMaster91
Fri Dec 15, 2017 6:52 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

... local square = {} speed = 40 function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown("left") then square.x = square.x - speed * dt end if love.keyboard.isDown("up") then square.y = square.y - s...
by SynfigMaster91
Fri Dec 15, 2017 6:44 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

Now you're using the table again, so it's square.x in your draw callback etc Please consider following a tutorial about variables and tables I know about variables, but I'm doing this. local square function square.update( dt ) if love.keyboard.isDown("right") then square.x = 10 + 40 * dt ...
by SynfigMaster91
Fri Dec 15, 2017 6:34 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

I said "or even". You either use square.speed or use speed and declare the variable. Please consider using some Lua tutorial: http://tylerneylon.com/a/learn-lua/ You won't have such issues anymore! Nah man, love is user friendly. It's just picky about who his friends are I did this: local...
by SynfigMaster91
Fri Dec 15, 2017 6:14 pm
Forum: Support and Development
Topic: Game with separate files tryout
Replies: 32
Views: 18234

Re: Game with separate files tryout

I said "or even". You either call square.speed or call speed and declare the variable. But I did so! local square = {} speed = 40 And changed this! function square.update( dt ) if love.keyboard.isDown("right") then square.x = square.x + speed * dt end if love.keyboard.isDown(&qu...