Search found 5 matches

by jthistle
Sun Oct 22, 2017 4:11 pm
Forum: Support and Development
Topic: OOP in Love2D
Replies: 5
Views: 5070

Re: OOP in Love2D

Sorry zorg, I can't seem to find it. It was quite an old non Love-related OOP tutorial in Lua though, so I doubt it would be changed now.
by jthistle
Sat Oct 21, 2017 5:47 pm
Forum: Support and Development
Topic: OOP in Love2D
Replies: 5
Views: 5070

Re: OOP in Love2D

Ah, thanks bartbes, that worked great. Yes, you're right, I got it from a tutorial - evidently not a very good one. Thanks!
by jthistle
Sat Oct 21, 2017 11:12 am
Forum: Support and Development
Topic: OOP in Love2D
Replies: 5
Views: 5070

OOP in Love2D

I'm having some trouble with writing a class in Lua with Love2D. I use the following code for my class: Planet = { bgColour = {0,0,0}, landColour = {0,0,0}, size = 100, landPoints = { } } -- the class table function Planet:new() self = setmetatable({}, self) self.__index = self -- failed table looku...
by jthistle
Sun Dec 04, 2016 2:46 pm
Forum: General
Topic: How can I smoothly lerp between two values?
Replies: 7
Views: 19550

Re: How can I smoothly lerp between two values?

Ah, flux works really well. Thanks very much!
by jthistle
Sun Dec 04, 2016 8:39 am
Forum: General
Topic: How can I smoothly lerp between two values?
Replies: 7
Views: 19550

How can I smoothly lerp between two values?

Hi, I'm try to smoothly lerp between two coordinates with the formula: function lerp(a,b,t) return a * (1-t) + b * t end However, this formula just makes the movement instant and with a constant velocity. Does anyone know how I can get a smooth start and a smooth end, a bit like Unity's lerp functio...