Desper

Latest version: v1.1.1.post0

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.1.1

setup.py` changes for pipy conformity.

See [v1.1.0](https://github.com/Ball-Man/desper/releases/tag/v1.1.0).

1.1.0

New features:

* `Mat4.from_scale`, construct a Mat4 from x, y and z scale values.
* Version global attribute (`desper.version`).
* File extension filtering for `DirectoryResourcePopulator`: each `DirectoryPopulatorRule` can specify which extenion it accepts.
* File extension trimming for handles generated by `DirectoryResourcePopulator`: an optional parameter `trim_extensions` that can be specified during constructions as well as during call. If enabled, generated `Handle`s' names will not have the original file extension.

Fixes:

* Restored Python 3.9 compatibility (currently the minimum supported version).
* It is now possible to correctly install `desper` by using `setup.py` (there was a problem with package discovery).
* Transform type components now automatically convert the given values into Vec types (during construction).
* `Transform2D.rotation` now enforces modulo 360.
* `Mat4.look_at` and some Vec operations now behave consistently.
* `World` mistakenly scheduling `on_add` events on processors sometimes.

Other:

* Added CI through github actions
* Added API reference docs, which builds on [desper.readthedocs.io](https://desper.readthedocs.io/en/latest/).
* Removed `core` namespace.

1.0

The main differences with the 0.2 (alpha) version are:
- ECS precise type access has been entirely removed, in favor of a purely subclass aware system. This settles the internal debate on the architecture to adopt and collapses the hybrid format.

- Removed `glet` subpackage, a bridge with [pyglet](https://github.com/pyglet/pyglet). This library purely represents the core. A pyglet extension will probably be implemented on a separate repository.

- `GameModel` abstraction are replaced by `Loop` abstraction, and does not work as a master global object anymore. All its responsibilites have been delegated to smaller components: resources are directly contained into a dedicated `ResourceMap` object, and populating said maps is delegated to custom functions/objects (like `DirectoryResourcePopulator`)

- There is no event management in 0.2

- `Transform2D` and `Transform3D` are data objects in 1.0 that replace the old `glet.Position` in 0.2, expanding it to support simple vector algebra. Moreover, it encapsules values not only for position but also for scale and rotation.

- `desper.math` was added, which is a port of [pyglet](https://github.com/pyglet/pyglet)'s math module (actually, an older implementation).

- Better cross-component access thanks to the renewed `Controller` abstraction and related tools.

- ...

1.0.0

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.

1.0.0beta

0.2

First release for desper.

The whole project is still in alpha, which means that compatibility may be broken at any time in the master branch (and next releases).

Docs are being generated (at the time of this release, docstrings are present but sphynx docs haven't been generated yet).

Importing `desper` will include the core functionalities, which do not include any graphical environment. [pyglet]<https://github.com/pyglet/pyglet> support is given by the subpackage `desper.glet`.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.