Hey all,
This is mostly a debug feature and has to be manually enabled via config.
The way it works is that orx can now monitor for on-disc resources modifications. When modifications are detected, it'll reload those resources and update some of the content in realtime.
It's currently hooked for textures, config files and sounds (samples, not streams as those can't be modified while orx is using them anyway).
For example, if you modify a texture on disc, orx will then immediately reload it and modify update it in-game, showing the result on screen right away.
This system has some limitations (like changing the size of a texture will not change the size of the body attached to an object, for example), but it still pretty handy.
In addition to those basic resource types, if you ask for config file monitoring, some orx structures will be updated on the fly if they were defined in a config file that just got reloaded. Those structures are:
- shaders (very useful)
- spawners
- fonts
- texts
- sounds
In order to use that feature, simply use the config property WatchList in the Resource section:
[Resource]
WatchList = Texture # Config
Will result in the resource groups "Texture" and "Config" to be monitored, whereas the resource type "Sound" won't.
NB: The resource groups are case sensitive! ie. Texture and not texture.
You can, of course, use it for your own resource groups if you ever have some. In that case you'll get an orxEVENT_TYPE_RESOURCE event with IDs letting you know what happened: orxRESOURCE_EVENT_UPDATE/orxRESOURCE_EVENT_ADD/orxRESOURCE_EVENT_REMOVE, but that's pretty advanced use of the resource system. :)
As usual, if you have any questions, please don't hesitate! =)
Cheers,
Rom