The big headline is the Asset Revamp. Instead of just passing around strings (and the whole resource path concept), actual
Asset objects are given to systems. (api reference,
As part of this, we’ve introduced the concept of a Virtual File System (VFS). The VFS allows assets to be loaded from the Python Path (
sys.path), using the same structure as python modules. This simplifies the usage of asset packs (like ppb-mutant) and allows assets not tied to a sprite (namely sound effects) to work.
As a quick example this v0.6 code:
class MySprite(ppb.BaseSprite): image = 'thingy.png' resource_path = 'resources/sprites'
becomes this v0.7 code:
class MySprite(ppb.Sprite): image = ppb.Image('resources/sprites/thingy.png`)
You may also notice that
ppb.Sprite. This is the result of a bunch of refactoring, and the old name is now deprecated and will be removed in a future release.
Also part of this effort is that there’s three generated image assets available:
ppb.Triangle. Instead of loading data from a file, these generate basic shapes in memory.
The lesser headline is the addition of sound effects! (
Note that the warning about PyGame and Python version compatibility from the v0.6 release notes still apply. In summary: Do not use PyGame 2 or Python 3.8 at this time.
ppb.vfsmodule - Enables loading of files from Python packages (#306)
ppb.Trianglegenerated images (#363)
ppb.Spriteis now the base sprite class (#357)
ppb.run()accepts arbitrary engine and subsystem arguments (#307)
ppb.BaseSpriteis now deprecated in favor of
__resource_path__()protocol removed in favor of
ppb.sprites.BaseSpritenow truly just a base class, using mixins to provide features. (#357)