Struct default constructor - need some kind of solution for C++ interop
Ethan Watson via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 10 01:22:59 PDT 2016
On Saturday, 10 September 2016 at 05:56:55 UTC, Marco Leise wrote:
> But what about the parts of the code that handle the game
> initialization before streaming starts? Is there no
>
> config = new GameConfig("settings.ini");
>
> or
>
> db = new AssetDatabase("menu.pkg");
>
> that perform I/O during construction and potentially display an
> exception error messages ?
Everything streams. No exceptions. The only file operations
provided to game code at run time are asynchronous operations.
And if you exploit that correctly, this is one of those things
that can increase boot times, actually. Create your
config/database/whatever objects, request files, instead of
initialising them all in order and slowing down because of
synchronous IO they all go to sleep and streaming system can
serve files up as quick as it gets them from disk.
More information about the Digitalmars-d
mailing list