I would like to start playing around with implementing basic lobby functionality through Lua.
To my understanding, LuaLobby is going to be (or already is) deprecated and I should use LuaSocket instead.
Where can I find documentation about current (uberserver?) server-client protocol?
Lua Lobby / Socket
Moderator: Moderators
Re: Lua Lobby / Socket
http://springrts.com/phpbb/search.php?k ... mit=Search
Would've been the first hit before your post.
Would've been the first hit before your post.
Re: Lua Lobby / Socket
Thanks, can you please edit the link so it doesn't break forum layout?
How can I run a minimalistic spring instance, with the intent of only running my Lua code?
(not asking for an external Lua interpreter)
I would like to have the lobby run entirely from spring.
For future reference, this is the lobby protocol: http://springrts.com/dl/LobbyProtocol/
How can I run a minimalistic spring instance, with the intent of only running my Lua code?
(not asking for an external Lua interpreter)
I would like to have the lobby run entirely from spring.
For future reference, this is the lobby protocol: http://springrts.com/dl/LobbyProtocol/
Re: Lua Lobby / Socket
not sure if that is helpful:
http://pastebin.com/3xPn03Xd
you can type /luaui join and it will join a hardcoded lobby channel.
if you just type /luaui blablabla it will say "blablabla" in that channel.
it is a bit choatic because I was just testing around..still afaik only example of something a bit like lua lobby?
Somewhere I have a bit better version where you can also join battles and recieve the script.txt
Or maybe it got lost when clearing out all the springtest installs
So maybe just use a very small map and mod for now...
http://pastebin.com/3xPn03Xd
you can type /luaui join and it will join a hardcoded lobby channel.
if you just type /luaui blablabla it will say "blablabla" in that channel.
it is a bit choatic because I was just testing around..still afaik only example of something a bit like lua lobby?
Somewhere I have a bit better version where you can also join battles and recieve the script.txt
Or maybe it got lost when clearing out all the springtest installs

I think a mod and map always have to be loaded. (unless headless spring but then you have no graphics at all: can not draw chat, buttons etc)How can I run a minimalistic spring instance, with the intent of only running my Lua code?
So maybe just use a very small map and mod for now...
Re: Lua Lobby / Socket
Thanks, that is useful.knorke wrote:not sure if that is helpful:
http://pastebin.com/3xPn03Xd
you can type /luaui join and it will join a hardcoded lobby channel.
if you just type /luaui blablabla it will say "blablabla" in that channel.
it is a bit choatic because I was just testing around..still afaik only example of something a bit like lua lobby?
Somewhere I have a bit better version where you can also join battles and recieve the script.txt
Or maybe it got lost when clearing out all the springtest installs
I guess I will use a dummy mod/map then.knorke wrote:I think a mod and map always have to be loaded. (unless headless spring but then you have no graphics at all: can not draw chat, buttons etc)
So maybe just use a very small map and mod for now...
Is there a way to keep the socket and/or run lua code (to send ping/pong) after I call Spring.Restart?
Re: Lua Lobby / Socket
atm no..basically you lose everything at Spring.RestartIs there a way to keep the socket and/or run lua code (to send ping/pong) after I call Spring.Restart?
That was also my question in this thread:
http://springrts.com/phpbb/viewtopic.php?f=23&t=27683
Since lua socket is not 100% done yet (?) maybe that will eventually change?
For now the only way to keep data between restarting is writing/reading files or via script.txt and reinitiliaze everything.
Re: Lua Lobby / Socket
There's also the choice of making a separate application through which connection itself / socket is handled that communicates with spring's Lua via localhost.knorke wrote:atm no..basically you lose everything at Spring.RestartIs there a way to keep the socket and/or run lua code (to send ping/pong) after I call Spring.Restart?
That was also my question in this thread:
http://springrts.com/phpbb/viewtopic.php?f=23&t=27683
Since lua socket is not 100% done yet (?) maybe that will eventually change?
For now the only way to keep data between restarting is writing/reading files or via script.txt and reinitiliaze everything.
I guess I'll make it a standalone Lua lobby, i.e. not relying on spring at all, using only some Lua interpreter and libraries.
Re: Lua Lobby / Socket
My Lua lobby reinitilizes and connects nearly instantly so there is no much need for saving anything but the battle you were. Though it is heavily helped with C++ partially handling the commands. I handle some commands with Lua too.
- Attachments
-
- luaLobbyProto.lua
- (4.27 KiB) Downloaded 155 times