Hi there.
I didn't run Löve on a linux system yet. My server for my game running on XP takes quite some CPU ressources, without doing much.
Is there some way seting up a console server with löve?
Sparx
Console server
Re: Console server
can I sue LUBE with it?
Because my server uses it right now...
Because my server uses it right now...
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Console server
I believe so, I don't think I use any love-specific features, if for some reasons you do get errors when running LUBE on lua+LuaSocket just contact me, I'll be happy to recreate these functions in another way. (After all, I provide support )
Re: Console server
it's very hard getting my luacode to run somwhow without löve....
Now i did using luabinaries but compiling is to much for me...
Isn't there a way I can tell love to be just a console programm... if not maybee in 0.6?
I'm looking fo an easy way running the lua programm i am writing on my windows machine on a linux server starting it via console.
Now i did using luabinaries but compiling is to much for me...
Isn't there a way I can tell love to be just a console programm... if not maybee in 0.6?
I'm looking fo an easy way running the lua programm i am writing on my windows machine on a linux server starting it via console.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Console server
If you want a fast windows install of lua (including a few libs, one of those is LuaSocket) try this url: http://luaforwindows.luaforge.net/index.html#Download
Re: Console server
Ported the server to luaforwindows.
This is my main routine:
and i replaced all love.timer.getTime() with socket.gettime()
the server is up and running and i can connect but alot goes very wrong, having problems with timing. And sometimes if i connect the luac file is still running but the server doesn't respond to the client....
This is my main routine:
Code: Select all
load()
require "socket"
time=socket.gettime()
while(1==1) do
update(socket.gettime()-time)
time=socket.gettime()
end
the server is up and running and i can connect but alot goes very wrong, having problems with timing. And sometimes if i connect the luac file is still running but the server doesn't respond to the client....
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Console server
I can't really tell what the problem is, but you might consider adding a socket.sleep at the end, is going to save you a lot of CPU time at worst, at best it also solves your other problems.
Re: Console server
That helped... awesome! CPU usage 0% while doing a lot of stuff....
Somehow my ping is either 0, 16 or 32..... so there is still some timing issue here. (using socket.sleep(0.001))
Now can you tell me how "require" LUBE.lua.. just now I replaced it by the actual lube code =)
And coudl you replace the 4 love.filesystem. in Lube by a lua native one?
And is there some tutorial how to port this to a linux server accessable via console?
Somehow my ping is either 0, 16 or 32..... so there is still some timing issue here. (using socket.sleep(0.001))
Now can you tell me how "require" LUBE.lua.. just now I replaced it by the actual lube code =)
And coudl you replace the 4 love.filesystem. in Lube by a lua native one?
And is there some tutorial how to port this to a linux server accessable via console?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Console server
Code: Select all
require "LUBE"
Code: Select all
require "LUBE"
love = { filesystem = { function exists() return false end } }
And what do you mean by porting?
EDIT: FAIL I did mess up the code, anyway, this should work
EDIT2: Let me explain why you can just skip that elseif. That's because it is for a rarely used feature, to be precise, loading new protocols, however, I have yet to see anyone do that.
Who is online
Users browsing this forum: Google [Bot] and 3 guests