Skip to content

Releases: ppb/pursuedpybear

v0.9.0b1: More Rendering Options

23 May 17:07
bedc185
Compare
Choose a tag to compare
Pre-release

Better Rendering

The biggest feature of note is that we now support Text rendering! As part of supporting that, we did a full revamp on the asset loading pipeline, improving the background loading and processing and allowing assets that depend on other assets (ChainedAsset).

We also spend some time fixing the Camera API: You no longer need to calculate your pixel ratios directly! Tell the camera how many game units you want visible in frame and it'll handle the rest. A last minute addition to the feature list is support for opacity and tint on sprites!

Sprites received a long waiting refactor and now we can support both square shaped sprites and rectangle shaped sprites. This means we have ppb.sprites.Sprite and ppb.sprites.RectangleSprite as concrete options when building your games. We removed the Sides magic object that supported Sprite.top.left and replaced it with a more pythonic Sprite.top_left and similar. Our root shape mix-in now is RectangleShapeMixin, but our default sprite is still a square and Sprite.size still works as expected.

Outside of those things, we spent a lot of effort on improving our documentation: a lot more detail on a bunch of new pages. We also added default sprite behaviors in features which allow you to do basic motion without writing your own handlers.

This release is the feature freeze for v0.9.0, no new features will be accepted and only fixes to features included in this release can be accepted.

New

  • Chained Assets (#436)
  • Fonts and Text assets (#443)
  • TargetSprite (#456, #458)
  • RectangleShapeMixin (#376)
  • Ordinal direction named unit vectors (#463)
  • Added Hypothesis profiles for local testing. (#469)
  • Rectangular sprite rendering (#466)
  • Support for Sprite.opacity and Sprite.tint in Renderer (#474)

Changed

  • Assets API changed to support better background loading. (#432)
  • Shape assets now setup in the background (#435)
  • Camera interface has had an entire overhaul. (#439)
  • SquareShapeMixin now extended RectangleShapeMixin (#376)
  • Replaced github actions with Binny (#465)
  • sprite_in_viewport replaced with sprite_in_view (#467)
  • Switched from time.monotonic to time.perf_counter across the library. (#431)
  • We now treat sphinx warning as errors. This should mean less time with broken docs. (#476)

Removed

  • Sides interface (#376)
  • Stale changelog removed from README.md (#472)
  • DoNotRender flag (#477)
  • ppb.BaseSprite finally removed! (#478)

Fixed

  • Asset loading when using REPLs or Jupyter notebooks fixed. (#446)

Docs

  • Better docs about the core ppb name space, including run and make_engine (#451)
  • Text rendering docs (#454)
  • Specific install instructions for RHEL and derivatives. (From a new contributor!) (#455)
  • Improved Event docs (#459)
  • Improved Sprite docs (#471)

Dev Release: v0.9.0a1 Text and a new Camera!

02 May 20:40
b4569e4
Compare
Choose a tag to compare

This is a development release. All APIs subject to change. If you want to help test, you can target the latest alpha release to test new features.

Since v0.8.0:

The big change is that PPB now supports basic text rendering (no wrapping, single style). This is available via the ppb.Text and ppb.Font assets. (docs)

As part of this, the asset framework underwent significant refactoring. The data flow is now much simpler, many of the aspects have been turned into mixins, and we've added support for chained assets: assets which do additional background processing after other needed assets are loaded.

The other major feature change that you need to worry about is the Camera. The important details are that the idea of a viewport has gone away. The camera's borders (left, right, top, bottom) will match the edge of the screen. Additionally, the Camera does not initialize with the wrong aspect ratio. To do this, we have the Renderer insert the camera on_scene_started. If you do any initial positioning of the Camera, do it in the scene or a sprite on_scene_started handler. If all of your camera manipulation happens in on_pre_render this detail won't affect you.

New

  • Chained Assets (#436)
  • Fonts and Text assets (#443)

Changed

  • Assets API changed to support better background loading. (#432)
  • Shape assets now setup in the background (#435)
  • Camera interface has had an entire overhaul. (#439)

Docs

  • Better docs about the core ppb name space, including run and make_engine (#451)
  • Text rendering docs (#454)
  • Specific install instructions for RHEL and derivatives. (From a new contributor!) (#455)

v0.8.0: Spring 2020 Release

20 Apr 00:34
6e6cafb
Compare
Choose a tag to compare

This release does only two things: dramatically optimizes event dispatch and replaces PyGame with PySDL2.

First, the simple one: event dispatch performance was dramatically optimized, because the performance of the previous method was just bad.

The big thing is that PursuedPyBear no longer depends on PyGame and uses PySDL2 instead. This was done because PyGame has never supported Python 3.8 in a final release, despite 3.8 being released in October, 2019. We are now using PySDL2 instead. This should require no changes from our uses, although Linux uses will require additional steps to install the SDL libraries (Debian: libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0).

Additionally, a pass was made at improving the docs: Double checking the accuracy of existing documentation, adding detailed documentation to ppb.engine.GameEngine and adding our first discussion pages. One discussing the design and constraints of the Asset system and another outlining the principles of ppb as a project.

We anticipate this release to have no impact on the vast majority of users, and minimal impact on the rest.

Added:

  • Python 3.8 is now supported
  • Asset.free(): Function that can be called by __del__() to release resources held. (#387)
  • Sounds now supports .wav, AIFF, VOC, OGG (Vorbis & Opus), MP3, and FLAC, as well as potentially more depending on the system configuration. (#387)
  • Documentation pages. (#416, #375, #423)

Fixed:

  • The initial scene now gets its SceneStarted event (rolled in to #387, 6e96280)

Changed:

  • BadEventHandlerException was moved from ppb.eventlib to ppb.errors. (#402)
  • Documentation updates (#404)
  • Various performance improvements. (#402, #415)

Removed:

  • ppb.eventlib, EventMixin, and __event__(). Everything they used to do has been inlined into the Engine. (#402)

Internal:

  • The release process was changed to be more automatic with significantly fewer human steps. (#380)
  • One of the visual tests wasn't working. It was an error with the test, now fixed. (#434)

v0.8.0 Release candidate 2

18 Apr 04:16
6e6cafb
Compare
Choose a tag to compare
Pre-release

This release does only two things: dramatically optimizes event dispatch and replaces PyGame with PySDL2.

First, the simple one: event dispatch performance was dramatically optimized, because the performance of the previous method was just bad.

The big thing is that PursuedPyBear no longer depends on PyGame and uses PySDL2 instead. This was done because PyGame has never supported Python 3.8 in a final release, despite 3.8 being released in October, 2019. We are now using PySDL2 instead. This should require no changes from our uses, although Linux uses will require additional steps to install the SDL libraries (Debian: libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0).

Additionally, a pass was made at improving the docs: Double checking the accuracy of existing documentation, adding detailed documentation to ppb.engine.GameEngine and adding our first discussion pages. One discussing the design and constraints of the Asset system and another outlining the principles of ppb as a project.

We anticipate this release to have no impact on the vast majority of users, and minimal impact on the rest.

Added:

  • Python 3.8 is now supported
  • Asset.free(): Function that can be called by __del__() to release resources held. (#387)
  • Sounds now supports .wav, AIFF, VOC, OGG/Vorbis, MP3, and FLAC, as well as potentially more depending on the system configuration. (#387)
  • Documentation pages. (#416, #375, #423)

Fixed:

  • The initial scene now gets its SceneStarted event (rolled in to #387, 6e96280)
  • One of the visual tests wasn't working. It was an error with the test, now fixed. (#434)
  • Sound volume controls require integers, we now cast the value you provide to an integer. (#427)

Changed:

  • BadEventHandlerException was moved from ppb.eventlib to ppb.errors. (#402)
  • Documentation updates (#404)
  • Various performance improvements. (#402, #415)

Removed:

  • ppb.eventlib, EventMixin, and __event__(). Everything they used to do has been inlined into the Engine. (#402)

Internal:

  • The release process was changed to be more automatic with significantly fewer human steps. (#380)

v0.8 release candidate 1: PySDL

16 Apr 01:19
faaaeca
Compare
Choose a tag to compare
Pre-release

This release does only two things: dramatically optimizes event dispatch and replaces PyGame with PySDL2.

First, the simple one: event dispatch performance was dramatically optimized, because the performance of the previous method was just bad.

The big thing is that PursuedPyBear no longer depends on PyGame and uses PySDL2 instead. This was done because PyGame has never supported Python 3.8 in a final release, despite 3.8 being released in October, 2019. We are now using PySDL2 instead. This should require no changes from our uses, although Linux uses will require additional steps to install the SDL libraries (Debian: libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0).

Additionally, a pass was made at improving the docs: Double checking the accuracy of existing documentation, adding detailed documentation to ppb.engine.GameEngine and adding our first discussion pages. One discussing the design and constraints of the Asset system and another outlining the principles of ppb as a project.

We anticipate this release to have no impact on the vast majority of users, and minimal impact on the rest.

Added:

  • Python 3.8 is now supported
  • Asset.free(): Function that can be called by __del__() to release resources held. (#387)
  • Sounds now supports .wav, AIFF, VOC, OGG/Vorbis, MP3, and FLAC, as well as potentially more depending on the system configuration. (#387)
  • Documentation pages. (#416, #375, #423)

Fixed:

  • The initial scene now gets its SceneStarted event (rolled in to #387, 6e96280)

Changed:

  • BadEventHandlerException was moved from ppb.eventlib to ppb.errors. (#402)
  • Documentation updates (#404)
  • Various performance improvements. (#402, #415)

Removed:

  • ppb.eventlib, EventMixin, and __event__(). Everything they used to do has been inlined into the Engine. (#402)

Internal:

  • The release process was changed to be more automatic with significantly fewer human steps. (#380)

v0.8 beta 1: PySDL

30 Mar 02:08
991680f
Compare
Choose a tag to compare
v0.8 beta 1: PySDL Pre-release
Pre-release

This release does only two things: dramatically optimizes event dispatch and replaces PyGame with PySDL2.

First, the simple one: event dispatch performance was dramatically optimized, because the performance of the previous method was just bad.

The big thing is that PursuedPyBear no longer depends on PyGame and uses PySDL2 instead. This was done because PyGame has never supported Python 3.8 in a final release, despite 3.8 being released in October, 2019. We are now using PySDL2 instead. This should require no changes from our uses, although Linux uses will require additional steps to install the SDL libraries (Debian: libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0).

We anticipate this release to have no impact on the vast majority of users, and minimal impact on the rest.

Added:

  • Python 3.8 is now supported
  • Asset.free(): Function that can be called by __del__() to release resources held. (#387)
  • Sounds now supports .wav, AIFF, VOC, OGG/Vorbis, MP3, and FLAC, as well as potentially more depending on the system configuration. (#387)

Fixed:

  • The initial scene now gets its SceneStarted event (rolled in to #387, 6e96280)

Changed:

  • BadEventHandlerException was moved from ppb.eventlib to ppb.errors. (#402)

Removed:

  • ppb.eventlib, EventMixin, and __event__(). Everything they used to do has been inlined into the Engine. (#402)

Internal:

  • The release process was changed to be more automatic with significantly fewer human steps. (#380)

Fall Release: Assets and Sound!

24 Sep 23:54
f76bc6e
Compare
Choose a tag to compare

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) These are a mechanism for eager background loading of data.

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.BaseSprite became 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.Circle, ppb.Square, and ppb.Triangle. Instead of loading data from a file, these generate basic shapes in memory.

The lesser headline is the addition of sound effects! (api reference) These are just simply signal(ppb.events.PlaySound(ppb.Sound('path/to/sound.ogg'))). Other types of sounds (namely background music) and more advanced control will come in future releases, as we develop the APIs.

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.

Changes since v0.6:

Added:

  • ppb.vfs module - Enables loading of files from Python packages (#306)
  • Asset system - Enables eager, background loading of assets (#306)
    • AbstractAsset ABC (#329)
    • AssetLoaded event (#315)
    • Loading Screen feature (#336)
  • Two Phase Update feature (#273)
  • Sound! (#326)
  • Sprite Layering! (#350, #322)
  • Add ppb.Circle, ppb.Square, and ppb.Triangle generated images (#363)
  • ppb.Sprite is now the base sprite class (#357)
  • ppb.run() accepts arbitrary engine and subsystem arguments (#307)

Changed:

  • ppb.BaseSprite is now deprecated in favor of ppb.Sprite (#357)
  • Deprecate string filenames in favor of assets (#306)
  • Significant file rearrangement. (#316)
  • Animations now based on Asset system. (#308)

Removed:

  • __resource_path__() protocol removed in favor of ppb.vfs (#306)

Invisible:

  • ppb.sprites.BaseSprite now truly just a base class, using mixins to provide features. (#357)
    • ppb.sprites.SquareShapeMixin (#357)
    • ppb.sprites.RenderableMixin (#357)
  • Accept only stable versions of ppb_vector (#303)
  • Renderer no longer tracks resources (#306)
  • Tolerances on Camera dimensions loosened. (#319)
  • Manual Tests (#328)
  • Updated Contributing.md (#324)

Fall Release: Assets and Sound! Beta 1

20 Sep 21:48
dc5a007
Compare
Choose a tag to compare
Pre-release

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, ) These are a mechanism for eager background loading of data.

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.BaseSprite became 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.Circle, ppb.Square, and ppb.Triangle. Instead of loading data from a file, these generate basic shapes in memory.

The lesser headline is the addition of sound effects! (, ) These are just simply signal(ppb.events.PlaySound(ppb.Sound('path/to/sound.ogg'))). Other types of sounds (namely background music) and more advanced control will come in future releases, as we develop the APIs.

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.

Changes since v0.6:

Added:

  • ppb.vfs module - Enables loading of files from Python packages (#306)
  • Asset system - Enables eager, background loading of assets (#306)
    • AbstractAsset ABC (#329)
    • AssetLoaded event (#315)
    • Loading Screen feature (#336)
  • Two Phase Update feature (#273)
  • Sound! (#326)
  • Sprite Layering! (#350, #322)
  • Add ppb.Circle, ppb.Square, and ppb.Triangle generated images (#363)
  • ppb.Sprite is now the base sprite class (#357)
  • ppb.run() accepts arbitrary engine and subsystem arguments (#307)

Changed:

  • ppb.BaseSprite is now deprecated in favor of ppb.Sprite (#357)
  • Deprecate string filenames in favor of assets (#306)
  • Significant file rearrangement. (#316)
  • Animations now based on Asset system. (#308)

Removed:

  • __resource_path__() protocol removed in favor of ppb.vfs (#306)

Invisible:

  • ppb.sprites.BaseSprite now truly just a base class, using mixins to provide features. (#357)
    • ppb.sprites.SquareShapeMixin (#357)
    • ppb.sprites.RenderableMixin (#357)
  • Accept only stable versions of ppb_vector (#303)
  • Renderer no longer tracks resources (#306)
  • Tolerances on Camera dimensions loosened. (#319)
  • Manual Tests (#328)
  • Updated Contributing.md (#324)

Fall 2019: Assets and Sound! Alpha 1

09 Sep 17:31
745c28b
Compare
Choose a tag to compare
Pre-release

The big headline is the Asset Revamp. Instead of just passing around strings (and the whole resource path concept), actual Asset objects and given to systems. (api reference, ) These are a mechanism for eager background loading of data.

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.BaseSprite became 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.Circle, ppb.Square, and ppb.Triangle. Instead of loading data from a file, these generate basic shapes in memory.

The lesser headline is the addition of sound effects! (, ) These are just simply signal(ppb.events.PlaySound(ppb.Sound('path/to/sound.ogg'))). Other types of sounds (namely background music) and more advanced control will come in future releases, as we develop the APIs.

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.

Changes since v0.6:

Added:

  • ppb.vfs module - Enables loading of files from Python packages (#306)
  • Asset system - Enables eager, background loading of assets (#306)
    • AbstractAsset ABC (#329)
    • AssetLoaded event (#315)
    • Loading Screen feature (#336)
  • Two Phase Update feature (#273)
  • Sound! (#326)
  • Sprite Layering! (#350, #322)
  • Add ppb.Circle, ppb.Square, and ppb.Triangle generated images (#363)
  • ppb.Sprite is now the base sprite class (#357)
  • ppb.run() accepts arbitrary engine and subsystem arguments (#307)

Changed:

  • ppb.BaseSprite is now deprecated in favor of ppb.Sprite (#357)
  • Deprecate string filenames in favor of assets (#306)
  • Significant file rearrangement. (#316)
  • Animations now based on Asset system. (#308)

Removed:

  • __resource_path__() protocol removed in favor of ppb.vfs (#306)

Invisible:

  • ppb.sprites.BaseSprite now truly just a base class, using mixins to provide features. (#357)
    • ppb.sprites.SquareShapeMixin (#357)
    • ppb.sprites.RenderableMixin (#357)
  • Accept only stable versions of ppb_vector (#303)
  • Renderer no longer tracks resources (#306)
  • Tolerances on Camera dimensions loosened. (#319)
  • Manual Tests (#328)
  • Updated Contributing.md (#324)

Summer 2019

07 Jul 18:27
Compare
Choose a tag to compare

The Summer Solstice 2019 release has finally come! 🎉 🎊

Note that because of incompatibilities, PyGame 1 and Python 3.6 & 3.7 are the only supported versions. Neither Python 3.8 nor PyGame 2 are supported in this release. (This will hopefully be fixed for our Fall Equinox 2019 release, but its largely out of our hands.)

New since 0.5.1

  • Online docs! https://ppb.readthedocs.io/ (#195)
  • Sprites can rotate (#214)
  • An Idle event has been added, fired each iteration through the event loop (#221)
  • An animation feature has been added (#230) and an example (#235)
  • A title argument has been added to ppb.run() (#258)
  • ppb.make_engine() has been added to simplify customization (#255)
  • GameEngine.loop_once() has been added to allow for external loops (#255)
  • The sprite sides API now implements full numerical methods (#272)
  • GameEngine() now accepts systems and basic_systems arguments (you probably want the former) (#295)

Breaking Changes since 0.5.1

  • The Y axis has been flipped so that +Y is up (#237, #275)
  • ppb.Vector has changed significantly; see the ppb-vector changes (#204, #280)
  • The deprecated scene change API (Scene.running, Scene.next) has been removed (#259)
  • System.activate() has been removed (#221)
  • GameEngine.register() now accepts callables instead of simple values (#228)
  • ppb.abc has been completely removed (#284)

Fixes since 0.5.1

  • ppb.utils.LoggingMixin now works with subclasses (based on the file the calling code is in) (#202)
  • StartScene no longer requires an empty kwargs when passed a scene class (#236)
  • GameObjectCollection (and its subclass Scene) work correctly with subclasses of children (#241)
  • Simplified the rendering event flow (#256)
  • Sprite.size of less than or equal to 0 no longer causes error (#262)
  • Defining sprites in a REPL no longer causes problems (#270)
  • Camera data is updated before PreRender fires (#274)

Development changes