[Suggestion] Pre-loading option

JamesKT

Boar
This was bound to happen. I try to lower loading times as much as possible before I do a speedrun and honestly, I just want to get in there with runs immediately however loading times often hinder that process. Perhaps a command to cache all the cutscene/area assets ahead of time or as a button on the main menu or something. Maybe even a loading string to do so? Sorry if this is asking for too much. <3
 

Teddy

Developer
Staff member
I actually think about this every once in a while, theorycrafting what the best and/or easiest implementation would be.

It seems that XNA has some black magic going on under the hood when it comes to caching, and I'm not 100 % sure how to control it. The main thing is that it seems that, for a texture to truly be loaded, it needs to have been rendered at least once. It can be loaded into RAM, but still create a little stutter the first time it actually gets rendered on screen. Perhaps it's moved to VRAM at that point and stays there until it's disposed.

If it's actually that simple, then the full-preload would be relatively simply to pull off, I think. I might use some of my "spare time" to prototype some kind of asset crawler that just wades through all the game's texture files, loads them into memory and renders them.

I'm rambling again :(

TL;DR: I agree! I want to add this in for speedrunners at some point - hopefully not in a too distant future (I imagine a forced 'practice run' gets more and more tedious the longer the game gets!)
 

GarlicJelly

Friendly Moderator (Formerly known as GoodStuff)
I actually think about this every once in a while, theorycrafting what the best and/or easiest implementation would be.

It seems that XNA has some black magic going on under the hood when it comes to caching, and I'm not 100 % sure how to control it. The main thing is that it seems that, for a texture to truly be loaded, it needs to have been rendered at least once. It can be loaded into RAM, but still create a little stutter the first time it actually gets rendered on screen. Perhaps it's moved to VRAM at that point and stays there until it's disposed.

If it's actually that simple, then the full-preload would be relatively simply to pull off, I think. I might use some of my "spare time" to prototype some kind of asset crawler that just wades through all the game's texture files, loads them into memory and renders them.

I'm rambling again :(

TL;DR: I agree! I want to add this in for speedrunners at some point - hopefully not in a too distant future (I imagine a forced 'practice run' gets more and more tedious the longer the game gets!)
Why just add this for speedrunners and not use it for everyone? Loading screens are boring. :p
 

The G-Meister

Giga Slime
It can be loaded into RAM, but still create a little stutter the first time it actually gets rendered on screen.
That is very true now you say it, there's often been times where I lose ~5-10 frames the first time I use a dodging strike in Arcade :p
 

Teddy

Developer
Staff member
Why just add this for speedrunners and not use it for everyone? Loading screens are boring. :p

Currently, all assets loaded into memory results in ~1.5GB, and takes a long time to load! The sound system also seems to get really confused by having that much stuff in memory and is prone to crashing the game? Kind of weird.

Anyways, yes, having everything loaded would be pretty nifty, but adding a compulsory load of everything in the game for someone starting the game up for just playing Arcade Mode, or finishing a single dungeon, or casually farming a thousand jars of honey... for those people, I'd just be needlessly wasting time!

I actually added a chat command last night that I think should simulate running through the game pretty well, and thus save @JamesKT some time. I made it unload everything after rendering, though, since somewhere around 1.3GB of memory usage XACT was prone to crashing.
 

JamesKT

Boar
Why just add this for speedrunners and not use it for everyone? Loading screens are boring. :p
Well if everything was loaded all at once I would imagine everything would merge into one horrible abomination. :p Honestly I think if the preloading went as far as all the areas of the game and not the enemies it could improve load speeds to a point where the transitions are less than a second.

I'm Curious to know what loads up in what order and how quickly each thing loads up. Perhaps the pre-loading could go as far as the longer loads while the quicker loads be left as is. Speculating & Ranting at this point.
 
Top