enigma-dev / enigma-dev

The Extensible Non-Interpreted Game Maker Augmentation.
http://enigma-dev.org
344 stars 117 forks source link

Reorganize resources storage structures #1125

Open JoshDreamland opened 6 years ago

JoshDreamland commented 6 years ago

The resource storage scheme is sort of everywhere, and is requiring us to compromise on STL includes in SHELLmain.

  1. We should probably create a special folder for resource containers and functions. The folder can be under UniversalSystem, or we may want to put multiple folders under, eg, Graphics and Audio_ systems (so that, for instance, the sounds headers could be under Audio_Systems/Resources/).
  2. We should create a separate source file in which to include the IDE_Edit_ resource headers (these headers include initializer lists for the internal containers).
  3. We should be more consistent about the containers we use. Maybe even a typedef (or template using) is in order. There's not a compelling reason, at this point, not to use an STL container instead of doing everything out custom.
  4. We should think about integrating the preloading system offered by Game Maker. In Game Maker, you can keep resource metadata loaded without loading the memory-intensive data associated with it. It might be useful to integrate this and offer an unload mechanism as well.
    • As I've mentioned in the Wiki, a resource usage profiler could help us figure out how to combine resource storage, and which resources should be keep loaded.
RobertBColton commented 5 years ago

The AssetArray has finally been merged in #1767. Other than a few minor setbacks like #1800 and possibly some unforeseen ones, we'll be good to go. Time to spread this to other systems!