I just merged the new initialization
branch to RLTK. Previously, you fired up RLTK with a simple - but not self-explanatory - context request:
|
|
There’s nothing really wrong with this. You’re asking for an 80x50 terminal, specifying a title, and the location of the assets it uses. Only the assets system has changed, and “resources” might actually be embedded into your executable. Or you might want to specify more complex initialization, and suddenly you are obtaining a mutable context and modifying it a lot.
I looked at how other systems handle initialization, and decided to adopt the builder model (don’t worry, the old code still works - but has a deprecation warning now). With the builder model, the simplest initialization (but still adding a title) looks like this:
|
|
You might decide to be fancy, and utilize a second sparse layer with the baked-in VGA font:
|
|
That’s quite readable! You might even want a really complicated setup with tiles:
|
|
I think this is much more readable and intuitive for the user. You can still specify resource directories if you don’t want to embed content, but it’s generally handled for you.