github excaliburjs/Excalibur v0.25.2
Excalibur v0.25.2 Release

latest releases: 0.30.0-alpha.1271+c855d89, 0.30.0-alpha.1270+760739f, 0.30.0-alpha.1269+548b085...
2 years ago

image

What's Changed

See migration guide for v0.25.x -> v0.25.2

Plugin Updates!

  • Excalibur Dev Tools for game debugging!
    image
  • Lots of quality of life improvements in the Tiled plugin
    • Tiled data is added to corresponding Entities via TiledObjectComponent and TiledLayerComponent
    • Tiled name's become excalibur Entity names
    • Layers and object use Tiled Z-indexing by default

Added Features

  • feat: [#577] [#1170] Implement new Clock API by @eonarheim in #2122
    • Added new Clock api to manage the core main loop. Clocks hide the implementation detail of how the mainloop runs, users just knows that it ticks somehow. Clocks additionally encapsulate any related browser timing, like performance.now()
      1. StandardClock encapsulates the existing requestAnimationFrame api logic
      2. TestClock allows a user to manually step the mainloop, this can be useful for frame by frame debugging #1170
      3. The base abstract clock implements the specifics of elapsed time
  • Added a new feature to Engine options to set a maximum fps new ex.Engine({...options, maxFps: 30}). This can be useful when needing to deliver a consistent experience across devices.
  • feat: Post Processing Improvements + Pre-multiplied alpha by @eonarheim in #2142
    • New ex.ScreenShader helper for building custom shader based post processors, read docs for more info
  • feat: Support image filtering modes on ImageSource & Raster Graphics by @eonarheim in #2168
  • feat: Fixes and updates to support @excaliburjs/dev-tools by @eonarheim in #2169
  • feat+refactor: Renderer simplification and Render plugins by @eonarheim in #2185
    • Added ability to build custom renderer plugins that are accessible to the ex.ExcaliburGraphicsContext.draw<TCustomRenderer>(...) after registering them ex.ExcaliburGraphicsContext.register(new LineRenderer())
    • Added ability to draw circles and rectangles with outlines! ex.ExcaliburGraphicsContext.drawCircle(...) and ex.ExcaliburGraphicsContext.drawRectangle(...)
  • Added ex.CoordPlane can be set in the new ex.Actor({coordPlane: CoordPlane.Screen}) constructor
  • Added convenience feature, setting the color, sets the color on default graphic if applicable
  • Added support for different webgl texture blending modes as ex.ImageFiltering :
    • ex.ImageSource can now specify a blend mode before the image is loaded
    • ex.ImageFiltering.Blended - Blended is useful when you have high resolution artwork and would like it blended and smoothed
    • ex.ImageFiltering.Pixel - Pixel is useful when you do not want smoothing aka antialiasing applied to your graphics.
  • Excalibur will set a "default" blend mode based on the ex.EngineOption antialiasing property, but can be overridden per graphic
    • antialiasing: true, then the blend mode defaults to ex.ImageFiltering.Blended
    • antialiasing: false, then the blend mode defaults to ex.ImageFiltering.Pixel
  • Pointers can now be configured to use the collider or the graphics bounds as the target for pointers with the ex.PointerComponent
    • useColliderShape - (default true) uses the collider component geometry for pointer events
    • useGraphicsBounds - (default false) uses the graphics bounds for pointer events
  • Added new measureText method to the ex.SpriteFont and ex.Font to return the bounds of any particular text

Breaking Changes

  • ex.Util.extend() is removed, modern js spread operator {...someobject, ...someotherobject} handles this better.
  • Excalibur post processing is now moved to the engine.graphicsContext.addPostProcessor()
  • Breaking change to ex.PostProcessor, all post processors must now now implement this interface
    export interface PostProcessor {
      intialize(gl: WebGLRenderingContext): void;
      getShader(): Shader;
      getLayout(): VertexLayout;
    }
  • Excalibur ex.EventEmitter on longer overrides the this parameter in callbacks
    // change this type of code
    this.on('precollision', this.onPreCollision);
    
    // to this
    this.on('precollision', (evt) => this.onPreCollision(evt));

Deprecated

  • The static Engine.createMainLoop is now marked deprecated and will be removed in v0.26.0, it is replaced by the Clock api
  • Mark legacy draw routines in ex.Engine, ex.Scene, and ex.Actor deprecated

Bug Fixes

  • fix: Performance improvements avoid expensive calculations by @eonarheim in #2197
    • Big improvement v0.25.0 on the left and v0.25.2 on the right! We stay above 30fps @ 4000 actors! More to come in the future!
    • image
  • fix: Arcade Solver Jitter on stacked/overlapped tiles by @eonarheim in #2104
  • fix: [#2106] Safari 13.1 Does not boot + Safari Pointers by @eonarheim in #2107
  • fix: Prevent pair generation for composite colliders by @eonarheim in #2131
  • fix: Clock runs game simulation too fast sometimes when limiting fps by @eonarheim in #2162
  • fix: Prevent SpriteFonts from logging excessive warnings by @eonarheim in #2163
  • fix: [#2152] SpriteFont and Font alignment by @eonarheim in #2153
  • fix(tsconfig): restrict types array by @kamranayub in #2160
  • fix: [#1815] TileMap tiling artifact by @eonarheim in #2146
  • fix: CircleCollider now handles transforms properly by @eonarheim in #2191
  • fix: [#2192] Actor.center returns global position by @eonarheim in #2193

Changed/Refactor

Docs

Build Dependencies Updated

Contributors

Big thanks to all the people who have helped out this iteration!

@ivasilov
@luttje
@tsanyqudsi
@lampewebdev
@joshuadoan
@berkayyildiz
@simon-jaeger
@YJDoc2
@JumpLink

Full Changelog: v0.25.1...v0.25.2

Don't miss a new Excalibur release

NewReleases is sending notifications on new releases.