Search found 9 matches

by Wiwiums
Sun Dec 28, 2014 10:41 am
Forum: General
Topic: Parsing anonymous function as parameter
Replies: 7
Views: 4157

Re: Passing anonymous function as parameter

Okay thanks to both S0lll0s and rok my problem was fixed! I will post up the original ode if anyone is ever interested anyway (paraphrasing): button = {} function button.new(act) local self = {} ... if act ~= nil then local action = act else --throw exception end ... function self.action() action() ...
by Wiwiums
Sat Dec 27, 2014 2:01 am
Forum: General
Topic: Parsing anonymous function as parameter
Replies: 7
Views: 4157

Re: Parsing anonymous function as parameter

Oh god yeah I totally screwed that one up; I meant passing, not parsing. For some reason I had that in my head at the time of writing it and previously I had been parsing strings completely unrelated to this; I probably just need to stay away from computer things while on holidays. I have a feeling ...
by Wiwiums
Fri Dec 26, 2014 3:30 pm
Forum: General
Topic: Parsing anonymous function as parameter
Replies: 7
Views: 4157

Re: Parsing anonymous function as parameter

Ug yeah I guess this beach holiday is getting to my head; too much sunlight can't be good for you!
I'll actually paste the actual code when I get home, however I return in a day or so, so yeah.
Sorry about the completely unclear crap I wrote before :/
But thanks for the feed back so far anyway!
by Wiwiums
Fri Dec 26, 2014 4:37 am
Forum: General
Topic: Parsing anonymous function as parameter
Replies: 7
Views: 4157

Parsing anonymous function as parameter

So I have a problem with a function not being called after parsing it into a function. Essentially I am making a Simple button interface for my project, and thought it'd be simple enough to give the button an action as an anonymous function specified at creation. So essentially I have a button objec...
by Wiwiums
Wed Aug 13, 2014 1:22 pm
Forum: Support and Development
Topic: Changing to OOP, loosing performance?
Replies: 9
Views: 6939

Re: Changing to OOP, loosing performance?

Hm the memory was going up for me pretty fast (from 1000 to 2000 in 1 or 2 seconds). It was just a wild guess :) Glad you managed to fix it though. I love the isometric style! Ohh i guess i only did this after i changed the point at which i imported the tiles hehe, so i guess 90% of the workload wa...
by Wiwiums
Wed Aug 13, 2014 12:56 pm
Forum: Support and Development
Topic: Changing to OOP, loosing performance?
Replies: 9
Views: 6939

Re: Changing to OOP, loosing performance?

Thanks guys! davisdude had the right idea, that i accidentally put the 'import_tiles" function under love.draw, which of course was the function that imported all the different tiles i had, which was obviously hugely inefficient. Having moved that up it runs absolutely fine! It seems really sil...
by Wiwiums
Wed Aug 13, 2014 12:35 am
Forum: Support and Development
Topic: Changing to OOP, loosing performance?
Replies: 9
Views: 6939

Re: Changing to OOP, loosing performance?

Ohh wow okay that is probably it, i cant believe i actually did that.
i gather you meant to say love.load?
Man, i thought the issue was a whole lot deeper than that haha; but ill change it when i get home.
thanks guys!
by Wiwiums
Tue Aug 12, 2014 11:21 am
Forum: Support and Development
Topic: Changing to OOP, loosing performance?
Replies: 9
Views: 6939

Re: Changing to OOP, loosing performance?

Haha thanks!
I was expecting the performance to increase if anything, as i had a lot of globals floating around; so it was probably some terrible implementation on my behalf.
Thanks again~
by Wiwiums
Tue Aug 12, 2014 9:48 am
Forum: Support and Development
Topic: Changing to OOP, loosing performance?
Replies: 9
Views: 6939

Changing to OOP, loosing performance?

Helllllloooooooow!~ Yay first post~ Billionth visit to these forums, but first time requesting help. I've been using love on and off for a few months now and i think its totally great! So in my semester holidays i was playing around and decided to actually make a game, which I did, which was very po...