Developer postOriginal post (opens in a new tab)

Upcoming Startup Time Improvements

You may have noticed that the current release is taking unusually long (V0.8.0b8 came to the default branch more than a month ago, April 11th, we put a V0.8.0b9 on alpha and beta with a play area rotating feature a little later around that time). The reason is that I realized that I should do some major cleanup now as part of the UI polishing.

When I started creating Holodance, my primary concern were in-game loading times because it really sucks when you are in a game in VR, and then you load a level and it takes ages. In fact, back then, you'd even get severe hiccups while loading a level. So, there was a version where the first thing we did when you'd start up the game was load all environments. The benefit was that you could switch between environments blazingly fast - the obvious problem was that the startup time was fairly long, even with only few levels included.

That's a long time in the past and fairly soon after initial release into Early Access, environment loading was moved to how it's normally done (when you enter the environment), and I changed from loading all the music immediately to loading the music when it's needed. But "all the music" is still part of the "main scene", more on that in a moment.

A little more than a month ago, I realized that the loading helper class that comes from Valve with the SteamVR Unity plugin did something very nasty: It prewarmed all shaders. Now, prewarming shaders is a really good idea - but the way they do it does not prewarm just the shaders actually needed in the current scene but literally all shaders included in the build. This reduced the startup time from minutes (for some players), to usually less than a minute.

So, the current iteration is all about giving everyone a better experience when starting up and playing the game, and part of this is a much improved loading screen. It's the first "UI thing" you see when you play the game, so that's quite important.

It even goes a little farther back: The very first thing you see with Holodance is how long it takes to download the game and how much space it consumes on your harddrive. We have a lot of environments, so that means a lot of textures and some of those were not really optimized for small build sizes, resulting in more than 8GB for the full game. This is now down to 5GB.

And startup time ... while we obviously had the environments always in separate scenes, everything related to gameplay has always been in one rather large monolithic scene with all the songs for all of story mode included. This did have some advantages but we're now at a point in time where the disadvantages far outweighed those advantages.

So that's what we're currently doing: Breaking this huge scene apart. Interestingly, the UI update is a natural part of that because the UI was one area where we had lots of interdependencies. Technically, each UI screen is now its own Unity scene. Each level of Story Mode (that includes the music, in some cases multiple songs and the dragons) is one Unity scene. Each environment is one scene. In Story Mode, environments and levels belong together but in Free Mode, you always use one "player" (that's basically what is a song in story mode) with all environments.

So, what I'm working on right now (or will continue when I've finished this posting) is moving from being able to rely on all "levels / players" always being available because they were part of the monolithic "main scene" to loading both the level/player and environment, and then managing those things properly. For Free Mode, it's already working (except the osu-player does not quite behave, yet) and so I did a build yesterday, so I can share some first results.

These numbers are all on my development machine, and the game is stored on a regular harddrive (no SSD). Also, these are the initial startup times:

Current version from Steam (V0.8.0b8)

  1. VR-Splash-Screen at 0:08
  2. Loading Level Selection at 0:32
  3. Ready to play at 0:37

Current build after the cleanup

  1. VR-Splash-Screen at 0:06
  2. Loading Level Selection at 0:18
  3. Ready to play at 0:25

So that's 32 seconds until you get to see the actual game for the first time compared to 18, and 37 seconds until you can actually play compared to 25. Plus, the Holodance loading area now has a progress bar and much more interesting stuff to look at and listen to, so the waiting time is also more entertaining.

When you close and restart the game, it's always much faster (Windows seems to do some nice caching there which makes getting reliable numbers a little harder because I basically need to reboot the machine to see what you'll usually see as a player):

  1. VR-Splash-Screen at 0:05
  2. Loading Level Selection at 0:09
  3. Ready to play at 0:14

For comparison, the fastest you could ever get is about 4 seconds (this is a completely empty Unity project and scene). It seems that you get to see something in VR even faster than that - but that's very hard to measure.