Roomy

Latest version: v0.12.0

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

Scan your dependencies

Page 1 of 3

0.12.0

- Reworked `Config.UPDATES_PER_FRAME` into `CONFIG.TICK_RATE`
- The main game loop has been refactored to facilitate the change to using tick rate, and now also has logic which facilitates ticks and frames 'catching up' when they are falling behind.
The implementation used for each of these is different, and explained in detail in the code comments
- Renamed `GameEventKey` to `GameEventType` to distinguish the enum's values from event keys, which can contain other data along with the event type
- Added an event for when the screen is rendered to
- Renamed listener names related to GameEventHandler to callback names, to reflect that they may modify event data if necessary rather than only reading it
- Entity's abstract properties may now return any Stat objects, not just GenericStat objects
- Various internal variable renames
- Reordered internal attributes for ease of reading
- Type hint fixes
- Added and edited docstrings and comments

This release features breaking changes, specifically the changes to `Config`, `GameEventKey` and `GameEventHandler`.

0.11.0

- Decoupled Room and Entity. Room no longer requires its occupants to be subclasses of Entity. Entity objects are now Hitboxed, and no longer tightly coupled to Room
- Room now overwrites the virtual methods provided by Hitboxed
- Renamed OccupantDataKey to RoomOccupantDataKey for clarity
- Added RenderableHitboxTag to store hitbox tags, and added new hitbox tags
- Animated classes now set their surface for the first time at the bottom of their constructor, rather than at the bottom of their first update (this fixes a bug where the surface was not set during the first round of Renderable updates, and would cause a crash if its attributes needed to be inspected at this point)
- Updated docstrings

This release features various breaking changes as indicated above.

0.10.0

- Added 'update' event to game event handler
- The game's event handler will now notify listeners stored under `'<event type>'` even if the event is handled using the `('before', '<event type>')` and `('after', '<event type>')` contextmanager
- RecurfaceHitbox can now be inverted, so that the collision area is outside the Recurface bounds rather than inside
- Screen is now able to receive a custom surface again if necessary, and the hard-coded dev colour background as a surface is instead only applied to World (since it will be covered by the Room rendered on top)
- Added a hitbox to Room. Moved `._load_room()` back into constructor - delaying some initialisation is only necessary in the Screen object
- Added `AnimationHandler.preload_frames()`
- Misc. minor code abstractions and internal refactoring, fixed type hints
- Updated dependency. World now makes use of new optimisation tools from Recurface

No breaking changes.

0.9.0

- Fixed logic for accessing child recurfaces in Renderable
- Updated dependency
- Updated docstrings

No breaking changes.

0.8.0

- `CustomClassHandler.register()` now receives `**kwargs` rather than a single `dict` parameter
- Additions and edits to docstrings

This release features minor breaking changes to `CustomClassHandler`.

0.7.0

- World now generates a room on the first call to .update() and not in the constructor, so that the World instance is correctly assigned to Game.screen by the time the room is being initialised (and this allows any Entity instances being initialised in the room to access self.game.screen)
- Room now loads its contents in the first call to .update() rather than in the constructor (similarly to the changes made to World)
- Renderable.update() can now receive generic *args and **kwargs params to allow passing custom info down this lifecycle method
- Added wrapper method for pygame.image.load() to provide a more informative error message when the file is not found
- AnimationHandler is now an instanced class rather than a singleton
- Split Animation class out into Animation and subclass FileAnimation
- Animation classes now use `fps` rather than `frame_duration`
- Animation._update() now receives `elapsed_ms` from .update()
- Hitbox now exposes an abstract class property (.COLLISION_CHECKERS) which should be overridden to return a `dict` registry of collision checkers for collisions between an instance of the specific subclass of Hitbox in question and another hitbox of varying type
- Added RecurfaceHitbox
- Added empty default value for tags param on Tagged and its subclasses
- Moved more values into Config (e.g. `Constants.RESOURCE_FOLDER_PATH`)
- Instances of resource file access have been refactored for more consistency - any dynamic resource file access is now relative to the resource folder path specified in the game's config
- Misc. minor variable/parameter renames
- Misc. minor fixes
- Docstring edits
- Corrected type hints
- Updated dependencies

This release features substantial breaking changes as detailed above.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.