Changelog
Release notes for PyKraken.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning when possible.
[1.6.1] - No Release Date
Added
- New
mixersubmodule for advanced audio management. AudioPriorityenum for managing hardware track acquisition (MUSIC, UI, SFX).- Support for polyphonic sound effects via the
Sampleclass andmax_polyphonyattribute. - Priority-based track stealing: high-priority sounds can now interrupt lower-priority ones if the 64-track limit is reached.
- Global master volume control via
mixer.set_master_volume.
Changed
- Refactored the audio backend to use SDL3_mixer.
- Renamed
Audioclass toSample(for short sound effects). - Renamed
AudioStreamclass toStream(for long music files).
- Renamed
- Audio loading functions moved to
mixer.load_sampleandmixer.load_stream. Stream.loopingis now an RW property instead of just a setter method.Streamplayback position renamed fromcurrent_timetoplayback_pos.
Removed
- Removed
rewindmethod from audio stream class (useseek(0)or restart playback). - Removed
miniaudiodependency.
[1.6.0] - 2026-01-29
Added
- Added
Vec2.ZERO,Vec2.UP,Vec2.DOWN,Vec2.LEFT, andVec2.RIGHTconstants for common vector directions. - Added the ability to multiply two
Vec2objects element-wise using the*operator. - New
transformsubmodule withcomposeandcompose_chainfunctions for parenting transforms. - New
draw.circlesfunction for drawing multiple circles in a single call (~3.5x faster than multipledraw.circlecalls in testing). - New
draw.polygonsfunction for drawing multiple polygons in a single call. - Added
texture.clip_areaproperty for getting/setting the texture's clipping area. - Added
draw.geometryfunction for drawing arbitrary vertex geometry, optionally with a texture. - New
Vertexclass representing a single vertex with position, color, and texture coordinate attributes.
Changed
Vec2boolean conversion now checks for both components being exactly zero, rather than using a tolerance.fx.move_tofunction now requires aVec2for theposparameter instead of accepting an optional argument of any object type.- Greatly improved quality and performance of
draw.circleanddraw.polygonby switching to a GPU-based rendering approach. - Animation controller's
load_sprite_sheetmethod renamed toadd_sheetandclipproperty renamed toframe_area. renderer.drawfunction now accepts optionalanchorandpivotparameters for specifying the drawing anchor and pivot points, both ofVec2type.- Both text and pixel array drawing functions now accept an optional
anchorparameter ofVec2type for specifying the drawing anchor point. Anchorenum changed to a class with static constants for common anchor points represented asVec2objects.- Renamed tilemap layer
rendermethods todrawfor consistency with other drawing functions.
Removed
- Implicit conversians from sequences to
Vec2,Rect,Line,Color, andPolarCoordinatehave been removed for better type safety. Use explicit constructors instead. - Removed
srcparameter fromrenderer.drawfunction. - Removed
clipattribute fromSpriteclass. Transformclass no longer containspivot,size, oranchorattributes.- Removed most opaque list types except for tilemap related ones due to... uselessness.
[1.5.0] - 2025-12-31
Added
- Added
build.pyscript for automating build and compilation tasks. - Added
tilemapsubmodule for working with tile maps. - Added
Vec2methodsmove_towardand non-mutatingmoved_towardfor moving a vector towards a target vector by a specified maximum distance.
Fixed
- Most evident with animations and tilemaps, fixed a visual artifact where textures would render slightly offset when using the camera. The fix? Flooring the camera's position before rendering.
Changed
- Completely reworked tile maps in Kraken, supporting:
- Tile, Object (of all kinds), and Image layers
- Terrains in tilesets
- More than one tileset per map
- Text properties
- Binded functions that return or accept references to list types no longer make copies of the list, but use opaque references to the original list.
- Improved error handling in rendering and draw functions.
- Rendering and draw operations now properly cull objects outside the current viewport; zero-opacity objects are also culled.
- Moved
mathfunctions toVec2class methods:math.scale_to_length->Vec2.scaled_to_lengthmath.normalize->Vec2.normalizedmath.rotate->Vec2.rotated
Removed
- Removed
<,>,<=,>=operators fromVec2class due to ambiguity with element-wise comparisons. - Removed
from_polarfunction from themathsubmodule (see "Changed" for other math functions).
[1.4.2] - 2025-12-21
Added
renderer.set_target(target: Texture)function for setting/unsetting render target textures.TextureAccessenum for specifying texture access modes (STATIC/TARGET).TextureScaleModeenum for specifying texture scaling modes (LINEAR/NEAREST/PIXEL_ART).- New
Textureconstructor that only requires size for creating render target textures. renderer.set_default_scale_mode(scale_mode: TextureScaleMode)andrenderer.get_default_scale_mode()functions for managing default texture scale modes.
Changed
renderer.get_res()renamed torenderer.get_target_resolution().window.create(title, resolution, scaled)parameters changed towindow.create(title, size).- All
Textureconstructors updated to haveTextureAccessandTextureScaleModeparameters.
Removed
- Removed
AnimationController.textureproperty. - Removed unused
Animationstruct binding. - Removed
file_pathparameter fromAnimationController.load_sprite_sheetmethod.