SpringLobby: simple frontend / customization

SpringLobby: simple frontend / customization

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

SpringLobby: simple frontend / customization

Post by koshi »

simple.jpg
(166.09 KiB) Downloaded 38 times
skirmish_lin.jpg
(154.33 KiB) Downloaded 26 times
skirmish_vista.png
skirmish_vista.png (236.61 KiB) Viewed 8277 times
What it is: alternative startmode for SL, mainly intended for singleplayer usage while full SL interface is still available

What it does: 1. load LobbyOptions.lua from a given game archive (command line param)
2. load background image, app icon, etc as defined in that file
3. load any number of skirmish defintion files listed in the table, present those as choices on the skirmish screen

Example LobbyOptions.lua
Example skirmish definition

This is not in mainline SL yet, but anyone can test it either by building my simple_interface branch or using this win build.
It needs a recent unitsync to function ( anything after 7d29956c7ab172959d236db90e0107810ee4d991 is fine ).
Run it from cli via ./springlobby -s -c "modShortname" (beware it's currently 0 fault tolerant)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: SpringLobby: simple frontend / customization

Post by imbaczek »

doubleplusawesome. props for using *Options.lua pattern.
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

Woot! Way to go. This has been just what I've been looking for for quite some time now, beautiful polish for Spring!
User avatar
clericvash
Posts: 1394
Joined: 05 Oct 2004, 01:05

Re: SpringLobby: simple frontend / customization

Post by clericvash »

SeanHeron wrote:Woot! Way to go. This has been just what I've been looking for for quite some time now, beautiful polish for Spring!
Agreed well done, i take it since it that this will work well under Linux too since it is using SL :D

Argh could even use something similair for P.U.R.E to help him support Linux finally :D
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

clericvash wrote: Agreed well done, i take it since it that this will work well under Linux too since it is using SL :D
yeah, if SL runs on the platform, so does this
clericvash wrote:Argh could even use something similair for P.U.R.E to help him support Linux finally :D
all it really needs imo is a desktop launcher / wrapper script that calls SL with the right parameters

some notes:
1) next step will be adding a screen similar to skirmish to launch missions. Since my abundant free time is pretty much running out today tho, I cannot give an eta.
2) the window resizes itself to size of the defined background image
3) the button row will always be h and v centered, the skirmish panel h-centered and might stretch in h direction
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

I wanted to test, got the win-build, current S44 SVN and ran Springlobby through a link with the commands you specified [(C:\Programme\Spring\springlobby.exe -s -c "S44") in this case].

Now what I don't know is if I have a Unitsync that is recent enough - my installation is older. Would it be enough to take a recent installer (ie S44 Lyuban), or would I have to build Unitsync myself? (as Springlobby currently gives an error and doesn't start).
Thanks! Sean.

Edit: P.S. I made sure there is only one mod named "S44" as shortname as well (ie moved my other S44 .sdz elsewhere).
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

the command would be C:\Programme\Spring\springlobby.exe -s -c "Spring: 1944 SVN", the shortname is not determined by the archive name

as for unitsync, grab an installer/archive from #buildserv, the current stable is not new enough
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: SpringLobby: simple frontend / customization

Post by Argh »

That looks very interesting. I'll look at it in depth tomorrow.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: SpringLobby: simple frontend / customization

Post by Licho »

Looks interesting, I plan similar feature for winter, but I wanted to store game-specific definitions on some web location instead of inside mod.

Reason for this is to support easilly updatable campaigns/missions which can be added independently of the mod.
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

Okay, thanks for the hints - got it running now and it looking very good! Had a quick round of "medium" and it worked fine (while playing around a few times, I did get one crash, but it wasn't reproducable).

Just dumping in the current unitsync didn't work for me, so I made a full install and that worked.
Also, perhaps I'm getting mixed up, but I had looked into the modinfo.lua, and is stated "Name=Spring: 1944 SVN", while shortname (which I though you had referred too) was S44 - so at least to me the info you gave in your first post was a bit confusing (as Spring: 1944 SVN is what works, like you said).

Image

And by the way, I'd never realised installing the current source build is so easy! I'd never known where from either till today...
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

sorry, shortname / name was indeed my mixup
glad to see it works for someone else on win too
did springlobby crash or was it the game?
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

It was SpringLobby that crashed. I wanted to say it's not happened since, but I just messed around with it and it did again.
[strike]I have the feelings it happens when I launch applications through it (I selected: Help ->browser); then go to skirmish; change settings there; then select "Advanced setup"; close that (it keeps the Singleplayer Springlobby open for me when it launches Springlobby "standard" as Advanced setup); then select Multiplayer and it closed citing an error (and asked if I want to inform Microsoft - fat chance - would have liked to paste the info here, but the Window it's displayed in does not allow copying...).

Will play around some more to see if I can reproducably get it to crash - and will look into activating logging so Springlobby might say some more about what's going wrong.
[/strike]

Edit: Okay I've nailed it: it happens every time I:
  • - select "Advanced setup" from skirmish (which opens a seperate instance of SpringLobby);
    - then close that instance;
    - then select Multiplayer (or "Advanced setup" again, just tested)
    -->crash
If I keep the "Advanced setup" instance running and then select Multiplayer, everything is fine (and it ends up having just one instance of Springlobby running).

Will look into getting a log now.

P.S. No problem on the mixup - could easily happen to me! Maybe edit the opening post accordingly ?

Edit 2:
Hmm, console log doesn't work for me (here in WinXP), and with guilogging, it actually crashes faster... Attached a log of me just starting the SinglePlayer lobby version, maybe there's things I'm missing that might be the reason for the crash (it certainly complains about some stuff...)
log.txt
(2.25 KiB) Downloaded 30 times
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

the crash is pretty understandable, as the user wasn't actually supposed to be thrown back to the simple interface when the 'real' SL closes.
While it's possible to make that work, it's a bit of work I won't invest just now. Instead I've made the simpleinterface shutdown properly when it was supposed to.

As for console logging, yupp windows is pretty much fucked there. You'll have to pipe output to a file to get it: 'springlobby.exe -cl > log.txt'

I've uploaded a new build with the changes: http://springlobby.info/temp/builds/kos ... erface.zip

Could you please try that one? I'm especially interested if gui logging still crashes. That might be a bug in its own right. (don't use -gl with -l X where X > 3, that is known to crash)

edit: I also made it more fault tolerant towards passing wrong arguments, it'll now exit gracefully after displaying an error instead of simply crashing
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

Very nice - I was starting to get the hunch that it wasn't supposed to have both "real" Springlobby and the "Singleplayer" window open. So your solution is fine, for sure (and works fine as well!).

On logging, your hunch was right! I had tried default (no -l), and -l=5, and it was crashing upon launch of "real" Springlobby with both - as you're saying expectedly (obviously the default is either 4 or 5 :P).

Well, everything seems fine to me now, I guess it's just to wait till this is in the main branch now (or - gasp, have a look at the code and try to give you a hand with the other things you were thinking about... afraid my C++ skills aren't really up to that I don't think though :/ )! Thanks for putting your time into this!

Sean
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

SeanHeron wrote:obviously the default is either 4 or 5
you're right, it was supposed to be 3 tho. Fixed now.
SeanHeron wrote:Well, everything seems fine to me now, I guess it's just to wait till this is in the main branch now (or - gasp, have a look at the code and try to give you a hand with the other things you were thinking about... afraid my C++ skills aren't really up to that I don't think though :/ )
It will be in next release. Don't let lack of c++ experience stop you tho, the code's comparatively simple.
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: SpringLobby: simple frontend / customization

Post by SeanHeron »

Hey, I just put together my own customization, and so I have some more feedback :) !
First of all, great to hear this will be in the next release (haven't got round to doing any testing for that yet though...)!

Anyway, after some trial and error (and cleaning up my "skirmish" files on the way), I found out that Springlobby needs to be called not with the argument "game" (ie game in the modinfo), but with the name that SpringLobby displays a game as - which is "Game"_"version".
The argument I have to use is "Battle for Busan alpha" - game being: "Battle for Busan" and version being: "alpha". So it'd be good if you could either change that, or make sure it's clear in any documentation (ie your first post in this thread).

Oh, and may I say again that it looks really spiffy :D !?

Edit: um, yeah, coding - perhaps next week ;P
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SpringLobby: simple frontend / customization

Post by zwzsg »

koshi wrote:SpringLobby's simpleinterface. Been available for well over 8 months now. 0 interest to use it from game developers, so I stopped advancing it a while back.
I remember it, you issued it right after I posted about my S44 simple skirmish launcher frontend (which generated subzero interest!).

At one pointed I wanted to make sure KP was compatible with bothe TASClient's single player menu and SpringLobby's single player menu. But when I tried to make TASClient's single player menu works, I hit bugs which Satirik related to javascript & internet explorer, until we dropped it. And I forgot about using SpringLobby's SP afterward.

Anyway I don't need it, as I already coded two skirmish frontend in addition to lobbies. But the more the merrier, so why not make KP compatible with koshi's frontend if it's little work. So I wanted the reference manual of what I need to provide for koshi's frontend to run. There's none :( , but a link to the S44 exemple. However the links are dead. :( Thanksfully it was easy to navigate to the proper link: LobbyOptions.lua, easy.lua
You still might want to edit your post though, I suspect getting 404 could be a turn off to other potentially interested modders.


In easy.lua, all those keys=0 confuse me. When listing sides or maps, why can't I juse use {'System','Hacker','Newtork'} and have instead to put up with the verbosity of {{key="0",name="System",desc=""},{key="0",name="Hacker",desc=""}{key="0",name="Network",desc=""} ? Would be also nice to have one entry per AI, defining teamID, side, and ai shortName, instead of having to spread them out to three list with key number used to match them.


Anyway, so I edited those files to adapt it to KP, then want to try. The links to your two builds are dead. :( But you write somewhere in a further post that it's now in mainline SpringLobby, so I try with current mainline SpringLobby. I get: Unknown option 's' :( Thanksfully I get then a list of option, by reading them I see 's' is not there but 'c' is still there. Well, I try -c "KP", then -c "C:\A\Jeux\RTS\Spring\Run\Spring New KP\mods\Kernel_Panic_4.15.sdd", then --customize="C:\\A\\Jeux\\RTS\\Spring\\Run\\Spring New KP\\mods\\Kernel_Panic_4.15.sdd", then eventually --customize="Kernel Panic 4.15" which appears to be what it needs. You might still want to edit your post with the proper commandline syntax to use it, I suspect having to trial and error in the dark to find it could be a turn off to other potentially interested modders.

So, with what I hope is the correct options, it loads for a bit then nothing happens :( (exit silently before opening any first window). I try with --file-logging="SpringLobbyLog.txt", but the file SpringLobbyLog.txt remains empty. Yep, "it's currently 0 fault tolerant" like you said. :( There's probably something wrong in my lua files, but I have no clue what to fix. You might want to give a bit more debug info, I suspect having no clue what's wrong could be a turn off to other potentially interested modders.

So I go try with S44, because apparently S44 is the only mod to have such a SpringLobby SimpleInterface. I download S44v15_MarketGarden.sdz then go try springlobby -s --file-logging="SpringLobbyLog.txt" --customize="Spring: 1944 v1.5 Operation Market Garden" It loads for a bit and then, I have a standard SpringLobby. :( Well, on the plus side, it didn't exit silently like with my KP config. But on the minus side, the only customisation I see is that the SpringLobby SunSmiley icon has been replaced by a S44 icon. I was expecting a frontend like that, instead I get the regular ugly grey messy SL menu. You might want to fix it, I suspect having zero working exemple could be a turn off to other potentially interested modders.


Do you provide support, or is that whole mod-customised simpleinterface springlobby thing just a dead endeavour I should forget about?
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: SpringLobby: simple frontend / customization

Post by koshi »

I've removed this front end a while ago. I have however started on a replacement that already is far superior in visuals. This time around I'm planning to have this working and deployed in one game before opening it to the general public.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: SpringLobby: simple frontend / customization

Post by zwzsg »

OK, so, I just pause my attempts for now, and wait for the new version.
Post Reply

Return to “Engine”