This repository has been archived by the owner on Apr 15, 2022. It is now read-only.
Releases: PBS-KIDS/Platypus
Releases · PBS-KIDS/Platypus
Platypus v0.7.4
Minor Changes
- CollisionShape: Added recycling methods to this class for better memory management and added a
collides
method to check shape collisions. - AABB: Added a
collides
method to check for aabb collisions. - Vector: Added more efficient setters to bypass unnecessary checks for more streamlined performance:
setXYZ
,setArray
, andsetVector
for number coordinates, array, and vector parameters respectively. These match the three behaviors of the originalset
but do not perform its parameter type-checking. - HandlerCollision: Made several internal optimizations to reduce overall collision-checking time.
Bug Fixes
- CollisionBasic: Fixed a bug where a "collide-off" event would re-add the entity to the collision list for malformed trigger messages.
- Messenger: Fixed an issue where debugging an entity fails on iOS due to unavailable
window.performance
methods. - Mover: Fixed an issue with colliding entities in motion retaining incorrect velocities.
- Fixed an problem where entities and components could be destroyed more than once, causing various unwanted effects.
Platypus v0.7.3
Minor Changes
- Mover: Mover now allows manipulation of an entity's velocity outside of the entity itself and incorporates those changes into the entity's motion.
- Made several optimizations in core methods including vector/vector projections, object recycling, and triggering events.
Bug Fixes
- Mover: Moving an object into another object that's moving away from the first object no longer results in the first object stopping completely; instead, it now progresses at the same rate as the other object along the other object's movement vector.
- Orientation: Fixed a bug that caused an object's relative position while tweening its orientation to be incorrect.
- TiledLoader: Properties set on tile layers are now passed into the game as properties on the corresponding layer entity.
Platypus v0.7.2
Bug Fixes
- EntityContainer: Fixed issue where events attempt to trigger on the children of a destroyed EntityContainer component.
Platypus v0.7.1
Minor Changes
- Events triggered during Component constructors now postpone firing until the Entity finishes loading, but just prior to the "load" event. This is to allow components dependent on other components not missing events due to load order.
- Orientation: The "tween-transform" event handler now accepts "offset" and "anchor" properties to perform transforms apart from the entity's position. Also added support for "beforeTick" and "afterTick" methods to provide more control over entity orientation tweening. "onTick" has been deprecated.
- HandlerLogic: Added a
timeMultiplier
property to HandlerLogic to allow logic speed changes (useful for simulations) and analwaysOn
property to run logic on all entities in the world without regard to camera position. - Scene: Specific assets can now be listed explicitly in Scene definitions. Scene now triggers "scene-ended" on child layers before the
destroy()
call. - LogicDirectionalMovement: Added a "face" event handler to change the direction an entity is facing without moving in that direction.
- RenderSprite: Added "play-sprite" and "stop-sprite" event handlers to RenderSprite to start and stop a playing animation.
- Messenger: Added performance checks to Messenger. If
debug
is set on an event or entity, it will record the time elapsed for handling an event using the browser's performance API. - Added
setUP()
andrecycle()
methods to several extensively used objects to reduce garbage collection. Also added alternative methods for arrays to reduce Array creation.
Bug Fixes
- CollisionBasic: Fixed "collide-on" and "collide-off" to work for individual CollisionBasic components on an Entity.
- LevelBuilder: Fixed a bug that was preventing the LevelBuilder from loading its assets automatically. Also updated it to handle zlib compression.
- HandlerCollision: Fixed an issue where attempting to remove a non-existent type would break the game.
- EntityContainer: Fixed a bug causing child events to be incorrectly prioritized.
- PIXIAnimation: Fixed a few caching issues that were causing memory leaks.
Platypus v0.7.0
Major Changes
- Scene: Platypus now supports Spring Roll states rather than its own scene management model and
platypus.Scene
now extendsspringroll.State
. For more information on states, check out the Spring Roll documentation. - Game: Per the above change,
platypus.Game
no longer handles scene transitions, but can still optionally load new scenes (using thespringroll.State
model internally). - Platypus no longer requires explicit listing of assets to load. The scene determines the assets to load automatically with each component reporting to the scene the assets it requires.
Minor Changes
- The entity definitions folder can have sub-folders containing entities. Note that this is for folder structure convenience and all entities are still compiled into a single key/value object in game (
platypus.game.settings.entities
) so each entity still needs a unique id and file name. - Platypus no longer maintains its own list of assets. It now employs the Spring Roll
assetManager
for functionality. - Platypus now uses
springroll.EventDispatcher
for event handling.platypus.Messenger
extendsspringroll.EventDispatcher
. - AABB: Added a method to return the intersection area of two aabb's.
- Added support for Tiled 0.15.0, including both the JSON level format with default zlib compression and JSON tileset format.
- Component: Created a
platypus.Component
class extended byplatypus.createComponentClass()
. - Camera: The camera now supports panning by mouse.
- The Platypus configuration can be stored in the configuration path at '/platypus/', but if not found, it searches for a game configuration in the root folder.
- Array: A
union()
mixin is now added towindow.Array
to merge two arrays. This is used internally, primarily to handle asset lists coming from various components and entities to prevent duplicates. - CollisionBasic: "collide-on" and "collide-off" can now apply to an individual component rather than the entire Entity.
Bug Fixes
- RenderTiles: Fixed a bug where the component was not relinquishing all of its resources on
destroy()
. - RenderSprite: A
RenderSprite
component can now be provided ahitArea
property to define a rectangular hit area. This is broken in 0.6 due to an EaselJS implementation not compatible with pixi.js.
Platypus v0.6.8
Bug Fixes
- CollisionBasic: Fixed margins on collision areas.
- RenderDebug: Correctly positions debug shapes to outline an entity's collision shape.
- RenderTiles: Fixed parallax scrolling for certain types of cached backgrounds.
- Motion: Made this component correctly handle instant events like jumping.
- ComponentSwitcher: Component-switching now takes place within the game loop just prior to "handle-logic" to provide more consistent behavior than the original
setTimeout
method. - LogicWindUpRacer: Now applying delta time to movement values.
Minor Changes
- Motion: Deprecated inconsistent syntax and put in event handlers to replace original syntax.
- Mover: Replaced "handle-logic" with a "handle-movement" listener to separate movement from other Entity logic.
- Mover: Inverted
friction
anddrag
values so that none is0
rather than1
for clarity. - Mover: Updated
maxMagnitude
to accept an object describing magnitudes for particular directions. Added amaxMagnitudeDelta
property to constrain a change in magnitudes if needed. - Mover: Added "pause-movement" and "unpause-movement" event listeners to
Mover
. - ComponentSwitcher: Added an event when the
ComponentSwitcher
has successfully removed and/or added components to an Entity. - HandlerLogic: Added two event triggers to precede and follow the "handle-logic" event: "prepare-logic" and "handle-movement" respectively.
- EntityController: Vastly improved this component's handling of controls across an Entity's various states. This is useful for blocking or adding certain inputs if, for example, a character is stunned or gains a new ability. Additionally, multiple mappings to the same behavior now provide a consistent response. For example, if both "z" and "spacebar" cause a player to jump, both must be released before the controller triggers "released". A new ActionState object has been created to encapsulate the input and state relationship.
- Camera: Deprecated the "camera-stationary" message in favor of "camera-update" with a new
stationary
Boolean property.
Platypus v0.6.7
This release fixes several outdated component behaviors and introduces a few minor features.
Bug Fixes
- Camera: Fixed offsetX and offsetY behavior for camera movement mode "forward".
- VoiceOver: Now correctly passes along
offsetZ
property when creating theRenderSprite
component. - RenderSprite: Masks set on component as a string value are parsed correctly for
PIXI.Graphics
. - LogicDirectionalMovement: Removed this component's undocumented ability to pause the entity and put in a fix so that it maintains the entity's heading when swapped out using
ComponentSwitcher
. - CollisionGroup and LogicTeleportee: These two components no longer reset an entity's z to 0.
- LogicImpactLaunch: Fixed this component to work correctly with the
Mover
component. - LogicRotationalMovement: This component now manipulates the
rotation
property rather than theorientation
property of the entity.
Minor Changes
- Console only outputs the game configuration on start-up when the game is in debug mode.
- Pixi.js's console "hello" has been replaced with additional game information including game and framework versions.
PlatypusPlugin
accepts two options (author
andhideHello
) to customize this output. - Improved browser detection for MS Edge, available at
platypus.supports.edge
as a Boolean value. - EntityController: Added a
stateMaps
property to this component to allow for state-specific controls on an entity. - HandlerLogic: Checking whether to pause logic has moved inside the logic cycle loop for more accurate behavior.
- Motion: Added event listeners to replace the more confusing properties currently on this component.
Platypus v0.6.6
This release includes better memory management for PIXIAnimation
as well as documentation updates.
Bug Fixes
- Fixed a
Vector
bug where setting a 3D vector with a 2D array caused the 3D vector to lose its Z value. PIXIAnimation
now caches texture lists for each unique animation so that additional animations using the same texture sequences use much less memory per animation.
Minor Changes
- Documentation added for
NodeMap
,RandomEvents
, andRelayParent
; and improved inter-linking of documentation pages. TiledLoader
now accepts a "spriteSheet" property for defining a specific sprite sheet to use for rendering tiles.
Platypus v0.6.5
This release provides some minor optimizations as well as fixes for some rendering issues.
Bug Fixes
- Put in a workaround to avoid using
PIXI.ParticleContainer
inRenderTiles
if the canvas renderer is being used.PIXI.ParticleContainer
does not correctly handle scale with the canvas renderer. RenderSprite
andRenderTiles
now perform a more aggressive clean up ofPIXIAnimation
andPIXI.Sprite
objects to better conserve memory usage.- The
NodeResident
component no longer changes the entity's state to "moving" if the entity's speed is zero.
Minor Changes
- Made the
Camera
component's "transitionX" and "transitionY" properties available on the entity for real-time manipulation. NodeMap
now keeps an internal map of node ids to make node retrieval by id much faster for large maps.
Platypus v0.6.4
This release fixes a few bugs and adds a few small features as listed below.
Bug Fixes
- Fixed an event listening bug wherein an event handler could add additional event handlers to the currently processing event handler list resulting in an endless loop.
- Additional
Vector
bug fixes for assignment and addition (both fixes to original v0.6.2 overhaul due to incorrect iOS Safari behavior). - Fix to
CollisionTiles
wherein adding un-instantiatedAABB
's did not increment the storedAABB
index. - Fix to
RenderSprite
'svisible
property so that it toggles appropriately for static cameras.
Minor Changes
- Implemented
PIXI.ParticleContainer
forRenderTiles
to further optimize map draws. - Added a
tileCache
property to theRenderTiles
component. It defaults totrue
, but if explicitly set tofalse
, visible map tiles and cachedRenderSprites
are not cached but instead rendered directly to the canvas.