After a weekend of intent work, the resources and mods systems are well underway and are nearing completion. By making resource classes generic and applying what are internally called "fields" to the class, I've managed to make a system where adding new resource types (including the GUI to modify / manage them) can be done extremely quickly without any upgrades to the editor (which automatically understands how to produce an interface for modifications). I'll explain a little more about that at the end of the post as it is similar to what will be done with game object components.
Work completed this weekend:
- Brushed up on the editor GUI itself and fully completed docking functionality; windows can be docked on any part of the screen or even docked in other windows. The GUI for TEE3Edit is completely customizable.
- Implemented field-based data system for resources, so that for each given ResourceType I can describe what data it contains and have the various frontends generated automatically. This is opposed to my previous methods of writing save/load and a custom GUI for each one, saving many, many hours. With this system, the resource itself, the GUI for modifying it, saving, and loading can all be done automatically based on the defined fields. In fact I added a "Spritesheet" resource yesterday that contains an image, frame width and frame height. It took me 10 minutes to add the resource type, after which point it was already saving, loading and showing up in the editor. This saves a ton of time, but will save literal hundreds of hours when we get to game components.
- Completed saving / loading for resources and a mod based system that allows for multiple mods to be loaded (further extending / changing resources)
- Completed GUI generation for resources and a basic property editor system that integrates with the "fields" of the resources
- Completed frontend for 3 field types: text, integer, file (which implements a customizable file open dialog)
- Completed custom resource browser in editor, which takes mods into consideration. This is a huge improvement over the last editor; allowing you to browse resources via a folder based system. On the previous engine, resources were all just one giant list.
- Completed basic selection of resources so that they can be modified, duplicated, removed, etc.
- Implemented Texture, Tilesheet, Spritesheet, Mesh, Sound and Music resources

The work completed here will save me well over 100 hours when compared with the previous system. Previously when I had to create a new resource type for some new feature, I'd have to:
- Make the resource class
- Make an editor interface (so that you have controls to modify the resource)
- Saving routine (serialize data to JSON)
- Loading routine (reserialize data from JSON)
- Integrate into engine (autoload resource so that it's available, load modded versions of resources, etc.)
Now? I create the resource class (including a field register function that describes the resource data), and with one line of code I can "register" it to the resource manager, and it takes care of the interface, saving, loading and engine integration. This is similar in nature to what will be done with game object components as well, and is a big reason for why this iteration of the engine will develop quickly (many fewer thousands of lines of code and fewer troubleshooting hours).
With multiple scenes at once now being possible, each resource now also keeps track of usage. Later down the line this will evolve into a system that loads/unloads resources as needed. Each resource is effectively two things: the resource "record", which is always loaded and contains the minimal data needed to describe it, and then the resource itself. For example, a Texture resource contains the record (a path to the texture) and the resource (the actual image loaded into memory). The records are always available and the resources themselves will load/unload as needed.
It can't be exciting for many of you to read this, but as a developer I'd say this weekend was a success! I'm looking forward to continuing with this new style of development that sees me doing more of the fun stuff, and far less of the repetitive stuff.