LoveJIT

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: LoveJIT

Post by Kadoba »

Boolsheet wrote:And it's targeting specific architectures and (generic?) PPC is not one of them.
There is a comparison chart for PPC/e500 machines on the LuaJIT site. Also, support for PPCs is going to be dropped from future versions of Love anyway.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: LoveJIT

Post by Boolsheet »

Kadoba wrote:There is a comparison chart for PPC/e500 machines on the LuaJIT site. Also, support for PPCs is going to be dropped from future versions of Love anyway.
The e500 CPU is not used in any apple computer and that's one of the reasons PPC gets dropped; to get LuaJIT into LÖVE.
Shallow indentations.
User avatar
xmagicx60
Prole
Posts: 3
Joined: Thu Jun 09, 2011 3:50 pm

Re: LoveJIT

Post by xmagicx60 »

I have a linux so if you can give me the source and tell me how to compile it, I probably will be able to do it for you...
For some reason, the .debs won't download at all once I open with the software center so I really need to know how to compile the source.

Also, first post :D
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveJIT

Post by bartbes »

Well, you download the source, then you run:

Code: Select all

sh platform/unix/automagic
./configure --enable-luajit
make
(that is, if you have the required libs, configure will complain otherwise)
User avatar
xmagicx60
Prole
Posts: 3
Joined: Thu Jun 09, 2011 3:50 pm

Re: LoveJIT

Post by xmagicx60 »

bartbes wrote:Well, you download the source, then you run:

Code: Select all

sh platform/unix/automagic
./configure --enable-luajit
make
(that is, if you have the required libs, configure will complain otherwise)
Does it require OpenGL or SDL?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveJIT

Post by bartbes »

Well.. yes, that's what love requires.
Magitek
Prole
Posts: 48
Joined: Sun Dec 13, 2009 2:23 am

Re: LoveJIT

Post by Magitek »

Loading times shrank by half using JIT! (very important issue in my game currently)
Unfortunately there seems to be a minor issue with arguments.. which breaks my entire project :(

main scope:

Code: Select all

print(arg[1]) 
result:
"C:\Love2d\Project\"
function scope with ordinary love 0.7.2:

Code: Select all

function where_are_arguments(...)

where_are_arguments(5,10)
result:
arg[1] = 5
arg[2] = 10
function scope with JIT (slimes version):

Code: Select all

function where_are_arguments(...)

where_are_arguments(5,10)
result:
arg[1] = "C:\Love2d\Project\"
arg[2] = nil
LuaJIT is taking arguments from the executable and is not interested in my local arguments.
Am I doing something wrong here or is this a bug?

Are there any newer compiled JIT versions around?
I'm keen on switching to JIT as I don't believe I can further optimize my map generator, and multithreading it would be incredibly difficult due to the fact that I am physically painting pixel for pixel on a partitioned map.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveJIT

Post by bartbes »

You are doing something wrong, arg is deprecated, use ... instead. For a table of extra arguments that would be {...}. (... acts like a function returning multiple return values, but it's not!)
Magitek
Prole
Posts: 48
Joined: Sun Dec 13, 2009 2:23 am

Re: LoveJIT

Post by Magitek »

I don't quite understand, just for clarification; how am I supposed to be referencing '...' arguments?

Code: Select all

function my_arguments(var1, ...)
print(arg[1])
print(arg[2])
print(arg[3])
end

my_arguments(5, {10,10,10})
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveJIT

Post by bartbes »

Code: Select all

function vararg(...)
    print(...)
end
--or
function vararg(...)
   local arg = {...}
   --then do what you normally would with arg
   for i, v in ipairs(arg) do print(v) end
end
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests