Completely revisited version of the library. Most of the existing alpha stage features have been refurbished. More empirical usage is necessary before declaring this stable, but all the designed features are currently implemented and (unit) tested.
Going through the entire changes is not tractable, as most modules have been partially or completely rewrited. Here is a short overview of the library's achitecture. About logic interaction:
- `World`s are the main logic container, in a game development perspective, a `World` is a scene. They contain entities. Entities are made up by components: simply Python objects which may represent simple stored data or some interactive logic. By querying a `World` object it is possible to obtain information about which entity holds which components.
- `Processor`s are another kind of object that can be found into a `World`. A `Processor` simply encapsulates a function that shall be called at each frame. `Processor`s query their `World` to retrieve entities and components, and manage them to obtain the desired result. Some utility processors are shipped directly with Desper.
- Components can be defined as event handlers. `World`s can be used to dispatch events on the handlers they contain (global event dispatching).
- `Loop` objects encapsulate the main application loop, executing a `World` logic frame per frame, providing delta time and occasionally *switching* between them (changing scene).
About model/resource management:
- `ResourceMap`s represent resource trees, and can be used to organize assets like textures, sounds, etc. `World` are treated as resources as well. Typically, an application or game requires one big map, which branches out into submaps. `Handle`s are the leaves of this tree. Desper ships with a default way of populating a map from a directory hierarchy (`DirectoryResourcePopulator`).
- `Handle`s are the leaves of a `ResourceMap`. They encapsulate one single resource, lazy loading it (potential support for dynamic loading of the resources, etc.). A `Handle` does not necessarily encapsule a resource on a file system, custom resources can be software generated or pulled from an online stream.