ËNVY (LÖVE Framework)
- Garotas*Gostosas
- Prole
- Posts: 41
- Joined: Fri Apr 03, 2009 12:15 am
Re: ËNVY (LÖVE Framework)
downloaded "envy" on the wiki and it doesn't work (mac os x 10.5). what am i doing wrong?
I LOVE GAME, YEAH!
Re: ËNVY (LÖVE Framework)
I had the same issue. Through some extensive debugging I finally found that the vector library was confusing the local variable with the class function. I don't know if this is a bug in LOVE or LUA? or even begin to explain the why, yet.
I had to change all the vector library class functions to a different name from the local variable being passed in. Works now. Thanks so much for the vector library, I spent a week trying to remember math from 10 years ago doing it myself before I found this.
I suspect that the return statement was running the local vector's new() function instead of the "top level" class? Not sure but I found something that works.
example of the change.
from--
function vector.class:distance(vector,k)
return vector:new(vector.x - self.x, vector.y - self.y):length();
end;
To...
function vctr.class:distance(vector,k)
return vctr:new(vector.x - self.x, vector.y - self.y):length();
end;
Test code I tossed into the function and put the function call into the main.lua:draw()
love.graphics.draw("v.x:"..vector.x.." self.x:"..self.x.."vector.y:"..vector.y.."self.y:"..self.y ,1,12+(k*10)) -- test 1, raw inputs
test = vector:new(vector.x - self.x, vector.y - self.y) -- test actual new vector creation, broke here before the change...
love.graphics.draw(tostring(test:length() ),1,12+k,0,2/32,2/32) -- display data
I had to change all the vector library class functions to a different name from the local variable being passed in. Works now. Thanks so much for the vector library, I spent a week trying to remember math from 10 years ago doing it myself before I found this.
I suspect that the return statement was running the local vector's new() function instead of the "top level" class? Not sure but I found something that works.
example of the change.
from--
function vector.class:distance(vector,k)
return vector:new(vector.x - self.x, vector.y - self.y):length();
end;
To...
function vctr.class:distance(vector,k)
return vctr:new(vector.x - self.x, vector.y - self.y):length();
end;
Test code I tossed into the function and put the function call into the main.lua:draw()
love.graphics.draw("v.x:"..vector.x.." self.x:"..self.x.."vector.y:"..vector.y.."self.y:"..self.y ,1,12+(k*10)) -- test 1, raw inputs
test = vector:new(vector.x - self.x, vector.y - self.y) -- test actual new vector creation, broke here before the change...
love.graphics.draw(tostring(test:length() ),1,12+k,0,2/32,2/32) -- display data
- Garotas*Gostosas
- Prole
- Posts: 41
- Joined: Fri Apr 03, 2009 12:15 am
Re: ËNVY (LÖVE Framework)
DAMN!"...all the above..."
you're genius! I know it sounds lazy, but could you post the code? could you talk with the generator about this issue, so he could update envy officially? I'm gonna send him a privat message right now... 8-)
I LOVE GAME, YEAH!
-
- Prole
- Posts: 5
- Joined: Thu Jun 11, 2009 2:26 am
Re: ËNVY (LÖVE Framework)
The download link you got there dosen't work anymore, but after meesing around I found the link that dose work: http://kuromeku.com/dump/lua/envy/ for people that don' want to go in circles just to get the frame work.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: ËNVY (LÖVE Framework)
Hi everyone,
I'd like to have a look at this lib, but it seems it has been removed from kuromeku's place.
Could someone post it somewhere else? (I'd suggest the wiki, github.com or code.google.com)
Thanks and regards!
I'd like to have a look at this lib, but it seems it has been removed from kuromeku's place.
Could someone post it somewhere else? (I'd suggest the wiki, github.com or code.google.com)
Thanks and regards!
When I write def I mean function.
-
- Prole
- Posts: 3
- Joined: Fri Dec 11, 2009 6:30 am
Re: ËNVY (LÖVE Framework)
I am trying to create a "bat" type weapon... however I am really lost, because all the other weapons are projectile based. I don't know lua enough to actually know what I am looking at.
Re: ËNVY (LÖVE Framework)
All the links that included in this subject are dead now. Sorry to say that
Who is online
Users browsing this forum: No registered users and 3 guests