Skip to content

Excalibur v0.26.0 Release

Compare
Choose a tag to compare
@eonarheim eonarheim released this 21 May 00:49
· 723 commits to main since this release

image

This was a big release! We have a ton of new features and a lot of improvements to performance especially around Firefox

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

Added Features!

  • feat: Add arbitrary non-convex polygon support by @eonarheim in #2239

    • Added arbitrary non-convex polygon support (only non-self intersecting) with ex.PolygonCollider(...).triangulate() which builds a new ex.CompositeCollider composed of triangles.

      triangulation

  • feat: Fast BoundingBox overlap and transform by @eonarheim in #2241

  • perf: Add zIndexChanged$ + Improve pointer system perf by @eonarheim in #2242

  • feat: Implement IsometricMap & refactor TileMap with some perf boosts by @eonarheim in #2254

    • ex.TileMap now supports per Tile custom colliders!

      custom-colliders

      const tileMap = new ex.TileMap(...);
      const tile = tileMap.getTile(0, 0);
      tile.solid = true;
      tile.addCollider(...); // add your custom collider!
    • New ex.IsometricMap for drawing isometric grids! (They also support custom colliders via the same mechanism as ex.TileMap)

      isometic-tiled

      new ex.IsometricMap({
          pos: ex.vec(250, 10),
          tileWidth: 32,
          tileHeight: 16,
          columns: 15,
          rows: 15
        });
      • ex.IsometricTile now come with a ex.IsometricEntityComponent which can be applied to any entity that needs to be correctly sorted to preserve the isometric illusion
      • ex.IsometricEntitySystem generates a new z-index based on the elevation and y position of an entity with ex.IsometricEntityComponent
  • feat: Add pixelRatio override for Text rendering by @eonarheim in #2294

  • perf(motion): Improve capture transform perf by @eonarheim in #2278

  • perf(graphics): Implement sorted draw calls by @eonarheim in #2277

    • Added draw call sorting new ex.Engine({useDrawSorting: true}) to efficiently draw render plugins in batches to avoid expensive renderer switching as much as possible. By default this is turned on, but can be opted out of.
  • feat(graphics): [#2288] Implement SpriteSheet builder with custom sourceViews by @eonarheim in #2302

    • Added feature to build SpriteSheets from a list of different sized source views using ex.SpriteSheet.fromImageSourceWithSourceViews(...)
        const ss = ex.SpriteSheet.fromImageSourceWithSourceViews({
          image,
          sourceViews: [
            {x: 0, y: 0, width: 20, height: 30},
            {x: 20, y: 0, width: 40, height: 50},
          ]
        });
  • feat: FitScreenAndFill and FitContainerAndFill Display Modes by @Joshua-Beatty in #2272

    fitandfill

  • feat: [#2272] Add Fit Screen/Container and Zoom by @eonarheim in #2312

    fitandzoom

  • feat: [#2313] Add New Line Graphics Object by @eonarheim in #2314

    const lineActor = new ex.Actor({
      pos: ex.vec(100, 0)
    });
    lineActor.graphics.anchor = ex.Vector.Zero;
    lineActor.graphics.use(new ex.Line({
      start: ex.vec(0, 0),
      end: ex.vec(200, 200),
      color: ex.Color.Green,
      thickness: 10
    }));
    game.add(lineActor);
  • feat: Add Raster quality + lineCap by @eonarheim in #2315

    • Added new parameter to ex.Raster({quality: 4}) to specify the internal scaling for the bitmap, this is useful for improving the rendering quality of small rasters due to sampling error.
  • feat(graphics): Add canvas 2d fallback mechanism by @eonarheim in #2310

    • Added new performance fallback configuration to ex.Engine for developers to help players experiencing poor performance in non-standard browser configurations
      • This will fallback to the Canvas2D rendering graphics context which usually performs better on non hardware accelerated browsers, currently postprocessing effects are unavailable in this fallback.
      • By default if a game is running at 20fps or lower for 100 frames or more after the game has started it will be triggered, the developer can optionally show a player message that is off by default.
        var game = new ex.Engine({
          ...
          configurePerformanceCanvas2DFallback: {
            allow: true, // opt-out of the fallback
            showPlayerMessage: true, // opt-in to a player pop-up message
            threshold: { fps: 20, numberOfFrames: 100 } // configure the threshold to trigger the fallback
          }
        });
  • feat: Implement parallax motion component and system by @eonarheim in #2303

    • Added new ex.ParallaxComponent for creating parallax effects on the graphics, entities with this component are drawn differently and a collider will not be where you expect. It is not recommended you use colliders with parallax entities.

      parallax3

      const actor = new ex.Actor();
      // The actor will be drawn shifted based on the camera position scaled by the parallax factor
      actor.addComponent(new ParallaxComponent(ex.vec(0.5, 0.5)));
  • perf: Various performance improvements by @eonarheim in #2309

  • Added ex.Vector.min(...) and ex.Vector.max(...) to find the min/max of each vector component between 2 vectors.

  • Added ex.TransformComponent.zIndexChange$ observable to watch when z index changes.

Fixes

  • refactor: Rename multv/multm to multiply by @eonarheim in #2240
  • fix: #2263 keyboard wasPressed works in onPostUpdate lifecycle by @eonarheim in #2270
  • chore: Updates to improve test flakiness by @eonarheim in #2246
  • fix: [#2109] Replace the features link by @SulthanNK in #2299
  • fix: [#2300] CompositeColliders count as a whole for collisionstart/collisionend events by @eonarheim in #2301
  • fix(graphics): Large Text segments render properly by breaking them into smaller pieces by @eonarheim in #2295
  • fix: Tilemap incorrectly offscreen and update parallax to use Tiled formula by @eonarheim in #2316
  • fix: Tweak browser params to fix flaky test runner disconnect by @eonarheim in #2311

What's Changed

New Contributors

  • @SulthanNK made their first contribution in #2299
  • @Joshua-Beatty made their first contribution in #2272
  • @Joshua-Beatty - Big thanks for the FitContentAndFill, FitScreenAndFill implementation, and the zoom discussion!
  • @QuentinLeCaignec - Thank you for performance improvement assistance and debugging peformance issues on different platforms!
  • @airtonix - Thank you for the Line graphic improvement discussion!
  • @mephisto83 - Thank you for consulting on the performance fallback API!
  • @tfkfan - Thank you Tilemap Polygon Raster quality improvement discussion!
  • @SulthanNK - Thank you for the readme updates!
  • @yongsooim - Thank you for proposing Spritesheet creator for mulitple sized source views!
  • @Cretezy - Thank you for the Tiled collision discussion and assistance on fixes! excaliburjs/excalibur-tiled#344
  • @tenpaMk2 - Thank you for lots of Excalibur demos and sample games!
  • @KrzyZyb - Thank you for the running Excalibur in Angular discussion!

Full Changelog: v0.25.3...v0.26.0