release-v4000-alpha-27 featured image github v4000 Alpha 27

KAPLAY v4000 Alpha 27

lajbel, 05/15/2026, in Mark’s house

Hey! lajbel here. It was a huge time off without new alphas! And also without new blogs. So, before going with the changelog let’s see how to install the new version:

npm i kaplay@next
# If you want to use specifically this alpha
# npm i kaplay@4000.0.0-alpha.27.1

Please note that this blog covers 2 versions, alpha 27 and alpha 27.1 with some fixes and changes related to the changes in alpha 27.

[4000.0.0-alpha.27] - 2026-03-19

Added

  • Added debug.warn() to log warning messages (#1028) - @lajbel
  • Added debug.logMessage() to log a messagesa array with a wrapping style (warn, error, info) (#1028) - @lajbel
  • Added KAPLAYOpt.topMostOnlyActivate option. When true, only the topmost object will receive clicks. This avoids problems in a UI where elements overlap - @mflerackers
  • Added KAPLAYOpt.fontFilter to separate rasterization filter applied to fonts of the filter applied to sprites (#1050) - @dragoncoder047
  • Added LoadFontOpt.filter and LoadSpriteOpt.filter to override the global filter for fonts/sprites (#1050) - @dragoncoder047
  • Added tileMode option to 9-slice sprites with four tiling strategies: 'none' (stretch all), 'edges' (tile edges only), 'center' (tile center only), and 'all' (tile both edges and center) (#996) - @JustKira
  • Added a calculate() method to the internal FPS counters, so advanced users can access them to create their own FPS monitor (#1010) - @dragoncoder047
  • Added Intl.Segmenter-based grapheme splitting for proper Indic language support, via the locale option in DrawTextOpt (#1013) - @shajidhasan
  • Added a fill() component - @mflerackers
  • Added lerpAngle() helper function to interpolate between clamped angles, preventing 360° spins during transitions from 180 to -180 (#1054) - @imaginarny
  • Added piecewiseBezier() and piecewiseCatmullRom() to evaluate curves with multiple points - @mflerackers

Removed

  • (!) The texture uv coordinates for primitives (solid- or gradient-filled circles, rectangles, lines, and polygons) have now been changed to (1, 1) instead of (0, 0), so shaders written for primitives will need to be updated. (#1021) - @dragoncoder047

Changed

  • (!) The global onDraw() handler’s no-tag form now always draws before all game objects are drawn, regardless of whether it was attached after game objects were added (#977) - @lajbel
  • (!) The sprite data format has been changed to allow individual frames to be on different GPU textures. Now SpriteData.tex doesn’t exist, and SpriteData.frames is a list of Frames instead of a list of Quads. A Frame contains tex and q (quad) properties that contain that data. (#1021) - @dragoncoder047
  • Updated the texture packer to use a new packing algorithm which may get more sprites onto the same texture, improving graphics batching performance (#1011) - @dragoncoder047
  • Updated all sprite and font loading to pack everything in the same texture to allow it to all batch together, for speed and efficiency (#1021) - @dragoncoder047
  • Added spritesheet repacking, so spritesheet images that contain lots of blank space don’t waste texture memory (#1021) - @dragoncoder047

Fixed

[4000.0.0-alpha.27.1] - 2026-05-12

Added

Changed

Fixed

  • Updated texture packer refreshing to only refresh when a sprite is actually requested to be drawn, to reduce the number of times the texture is synced to the GPU, which is slow (#1058) - @dragoncoder047
  • Fixed loadBitmapFontFromSprite() so that the font drawn using it is drawn with the correct scale, as one would expect (#1063) - @dragoncoder047
  • Added exists() which also checks whether the object is not undefined. This should temporarily fix the problem with undefined objects during collision due to iterators being invalidated by destroy. - @mflerackers
  • Fixed broadphase event duplication on scene switch, causing repeated broadphase object registrations, which resulted in a performance drop (#1074) - @imaginarny, @mflerackers
  • Fixed broadphase objects cleared on scene switch including those with stay() (#1077) - @imaginarny, @mflerackers

What’s Changed

New Contributors

Thank to all contributors, donors and mantainers who contributed in this release!

kaplay logo