Loading screens

Loading screens

Requests for features in the spring code.

Moderator: Moderators

User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Loading screens

Post by very_bad_soldier »

Sorry, MTR incoming, but what would it take to have better loading screens?
At least BA's loading screens look quite ugly at the moment and I think they give a real bad first impression since its the first "ingame" stuff a new player encounters.
Is the image resolution limited or is BA just using such low-res images?
Loading screens without stretching (correct aspect ratio) and in native resolution would be great. We could do some really fancy loading screens giving the player a "WOW" instead of an "Oh dear" when starting the game.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Loading screens

Post by smoth »

I have asked them to add support for loading images to preserve aspect ratio but it has fallen on deaf ears.
jeykey
Posts: 136
Joined: 28 May 2009, 16:24

Re: Loading screens

Post by jeykey »

+1
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Loading screens

Post by Master-Athmos »

When talking about this topic I'd also like a revamp of that loading procedure. I'd like to have a loading bar that fills up at the bottom of the screen instead of a huge and ugly white font right in the middle of the screen (where depending on the loading screen it even isn't readable at all). A loading bar is way more convenient (and if wished the text could still be on top of it) and you'd finally be able to deliver some nice bitmaps the player actually can fully enjoy instead of having a big, ugly and "flickering" (i.e. changing) text on top of it...

The ultimate way of win of course would be the possibility to let a video play (afaik someone even said he wanted to do something in that direction at some point) or have some other kind of influence on something dynamic that is shown during loading (like the ultimate Flash / Peewee Benny Hill style hallway door chase or something)...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Loading screens

Post by Forboding Angel »

+1 Athmos
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Loading screens

Post by Argh »

+1, this is one area of Spring that still looks very un-polished atm.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Loading screens

Post by Das Bruce »

-5 Athmos, that's a generic and boring idea, definitely better than the current setup but hardly "ultimate way of win".
Ideally you'd be able to control loading display behaviour with lua.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Loading screens

Post by Master-Athmos »

Actually what you say is the
Master-Athmos wrote:or have some other kind of influence on something dynamic that is shown during loading
:-)

That of course would require way more head scratching than the load bar or even the video playback... :wink:
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Loading screens

Post by Das Bruce »

I missed that bit, you should have made it bold since that would have made all your other suggestions possible as well.
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Loading screens

Post by Master-Athmos »

So we have video playback with Lua available right now? I thought you only could do that cheatish playback by reading some jpegs containing lots of different frames you then switch through (and let a music file play)...
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Loading screens

Post by SpliFF »

The obvious issue with Lua or video playback during loading is that you're simply adding to the loading time. You're also trying to do things that require a lot of CPU and IO at exactly the same time you're stressing both. The result is generally stutter.

Progress loading can be a bit of a hassle too since you really need to predict in advance how long things take (does loading a file count as one pixel on the bar or 2, etc..). In truth a progress bar tells you absolutely nothing.

I see no harm in having a load screen configuration file though, something like:

Code: Select all

screens = {
  [1] = {
    images = {
      [1] = {
        file="screen1.dds",
        opacity=0.5, -- alpha
        posX='left', -- 'right','center','Npx','N%'
        posY='center', -- 'top','bottom','Npx','N%'
        tileX=true,
        tileY=false,
        stretchX=false, -- stretch to fill remaining screen space
        stretchY=false,
        shrinkX=false, -- shrink if screen space is smaller than needed
        shrinkY=false,
        anchorX='top', -- where image is anchored relative to pos
        anchorY='center', 
       },
       ...
     }, -- end images

     labels = {
      [1] = {
        text="Welcome to my Mod",
        color="50 30 20", -- RGB
        opacity=0.5, -- alpha
        ... same positional attributes as image
       },   
     }, -- end labels
  }, -- end screen 1

  [2] = {
  },
  ...
}
So for each random load screen you can have one or more images and labels with independent control over placement, stretch etc. For simplicity default to the image centered and not stretched (though will be shrunk if too big).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Loading screens

Post by Tobi »

Personally I think an approach with some new Lua state that is called into at least once every loading step would be good (e.g. a call-in LoadingProgress(message : string). The function that is called would get the load message as argument and can render some arbitrary stuff.

Maybe it could be combined with some function that is called at a regular rate so animation / videos are possible, but as SpliFF said, any animation done in that can be expected to stutter etc. as Spring tries to dedicate all CPU to actually loading useful stuff.

A default copy of this Lua file(s) could just implement the current behavior (i.e. use a random image from bitmaps/loadpictures).
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Loading screens

Post by Master-Athmos »

SpliFF wrote:Progress loading can be a bit of a hassle too since you really need to predict in advance how long things take (does loading a file count as one pixel on the bar or 2, etc..). In truth a progress bar tells you absolutely nothing.
Well it imo doesn't need to exactly give a clue in terms of how long things are going to take (when do you actually see a bar that behaves that way at all?). But with every step during loading that is done and which get switched through now anyway as the text changes for each step you might want to add a bit to the loading bar. You then could weight every step if you want which already would lead to a nice result (I mean you probably know that loading trees won't take very long and leads to like a 5% increase while the pathing part makes up like 30% to just give some random numbers)...
Tobi wrote:Maybe it could be combined with some function that is called at a regular rate so animation / videos are possible, but as SpliFF said, any animation done in that can be expected to stutter etc. as Spring tries to dedicate all CPU to actually loading useful stuff.
So would any multithreading magic be possible here without a huge hassle which just adds an own thread during loading which is e.g. about video playback? As except for pathing there is no multi-core use afaik you could keep the idling core(s) a bit busy...
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Loading screens

Post by jK »

Tobi wrote:Personally I think an approach with some new Lua state that is called into at least once every loading step would be good (e.g. a call-in LoadingProgress(message : string). The function that is called would get the load message as argument and can render some arbitrary stuff.
My idea was always to create a separate thread so loading and rendering won't happen on the same thread, this would make the window more responsive during that time and it would allow smooth animations via a new Lua_State. But it don't have any idea of c++ thread handling, so i don't know how to load c++ class/objects in a separate thread (the rendering etc. must happen in the mainthread).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Loading screens

Post by Tobi »

*If* the loading code was cleaned up quite a bit it wouldn't be really hard, as the threads barely need to access each other. Just need one threadsafe FIFO for sending calls from the loading thread to the Lua-while-loading thread.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Loading screens

Post by Jazcash »

Even better, hide the loading screens from view and let the players scream at each other just that little longer. Then chuck all players into the game at once when they've all loaded.
User avatar
zCram
Posts: 8
Joined: 22 Aug 2009, 20:56

Re: Loading screens

Post by zCram »

Can we have a blank, uninteresting loading screen? Maybe colour it black, so it looks more cool
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Loading screens

Post by CarRepairer »

JAZCASH wrote:Even better, hide the loading screens from view and let the players scream at each other just that little longer. Then chuck all players into the game at once when they've all loaded.
That's not a bad idea, with modifications. Let people connect to host and start chatting first, then load them up in the background while they chat instead of being in limbo for those painful 10-60 seconds of loading (that sounded sad, I know).
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Loading screens

Post by Neddie »

Master-Athmos wrote:So we have video playback with Lua available right now? I thought you only could do that cheatish playback by reading some jpegs containing lots of different frames you then switch through (and let a music file play)...
What do you think a video is? But yes, you can only really do that in said format right now.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Loading screens

Post by Forboding Angel »

Yes, but videos are generally in a single file... not several.
Post Reply

Return to “Feature Requests”