Releases: Kraken-Engine/PyKraken
Kraken Engine v1.5.0
The "Tilemap Update"
This update completely reworks how tile maps function in the Kraken Engine. By replacing the 2-year-old custom XML parser with the third-party tmxlite library, Kraken gains broad, first-class support for nearly all TMX map features while improving correctness and performance.
What's New
tilemapsubmodule containing the following classes:Map(the only instantiatable one)ImageLayer(extendsLayer)ObjectGroup(extendsLayer)MapObjectTextProperties
TileLayer(extendsLayer)TileLayer.Tile
TileSetTileSet.TileTileSet.Terrain
- New
Vec2methods:move_towardandmoved_towardscaled_to_lengthnormalizedrotated
Breaking Changes
- Removed several
mathsubmodule functions (see "What's New" above for replacements):math.scale_to_lengthmath.normalizemath.rotate
- Removed the
from_polarfunction from themathsubmodule which asked for aPolarCoordinateobject since that object already has a method to convert to Cartesian coordinates. - Removed
<,>,<=, and>=operators from theVec2class due to ambiguity with element-wise comparisons.
Bug Fixes
- A visual artifact where textures would render slightly offset when using the camera has been fixed by flooring the camera's coordinates before rendering.
- Improved performance when passing arrays between Python and C++:
- Kraken now correctly handles pybind11 reference semantics to avoid unnecessary copying.
- Affected APIs are typically exposed as classes ending in "List".
Full Changelog: v1.4.2...v1.5.0
Kraken Engine v1.4.2
This update introduces the abilities to make render target textures and control the scaling method of textures. With render target textures come functions to set and unset them.
What's New
TextureAccessenum for choosing the access type of a texture:STATICfor your usual texture (read-only).TARGETfor a texture to draw onto, good for pixel artists and shader work.
TextureScaleModeenum for choosing the scale mode of a texture when rendering:LINEARfor linear scaling, good for high-resolution games.NEARESTfor nearest neighbor scaling.PIXEL_ARTfor a special scaling method that looks best with pixel art games.DEFAULTfor the default scaling mode set via therenderer.set_default_scale_modefunction.
- New
Textureconstructor for making a render target texture of a given size and scaling mode. renderer.set_targetadded for setting/unsetting a render target texture to render to.renderer.set_default_scale_modeandrenderer.get_default_scale_modefunctions for setting/getting the program's default texture scale mode to mitigate repetitive code.
Breaking Changes
renderer.get_resfunction renamed torenderer.get_target_resolution.window.createfunction params changed to justtitleandsize.- Removed
AnimationController.textureproperty. - Removed the
file_pathparameter from theAnimationController.load_sprite_sheetmethod.
Full Changelog: v1.4.0...v1.4.2
Kraken Engine v1.4.1
Minor Update
- New
rotate_byfunction in thefxsubmodule to rotate by delta in a direction.rotate_torotates in a given direction now too.
Textobjects now haveshadow_colorandshadow_offsetproperties for rendering a drop shadow.- Shadows will only be drawn if shadow color isn't completely transparent and if the offset isn't zero.
renderer.drawhas improved draw logic, where size is determined in an order an fallbacks, in this order:- Transform size
- Source rectangle's size
- Full texture size
Full Changelog: v1.4.0...v1.4.1
Kraken Engine v1.4.0
What's New
Orchestratorclass for timeline-based transform animations.- With this comes the
fxsubmodule which needs to be explicitly imported from pykraken, - Each effect function returns an
Effectobject to give the orchestrator via itsnextorparallelmethods.
- With this comes the
Transformobject encapsulating position, size, scale, angle, positional anchor, and rotational pivot.- Inheritable
Spriteclass for drawable game objects, encapsulates:- Attributes for texture, transform, velocity, and an optional "clip" (src) rect.
- Methods for updating (must be implemented), drawing, and moving.
logsubmodule for logging errors, warnings, and general information.kn.init's new optionaldebugparameter must be set toTruefor log messages to output.- Enabling debug mode includes logging of device information on launch.
- Added new event types for pinch gestures, screen keyboard showing/hiding, and if display's usable bounds were changed.
SheetStrips can now accept floats for fps values.event.start_text_inputandevent.stop_text_inputnow available for use with theTEXT_INPUTuser event.- The window is now resizable during runtime.
Breaking Changes
Frameobject (fromAnimationController.current_frame) removed.- This means each animation in the controller holds a list of src rects instead of frames.
AnimationController[.texture/.clip]takes the place ofAnimationController.current_frame[.tex/.src], respectively.
- The two old
renderer.drawfunctions have been replaced with a unified one, utilizing theTransformobject. - Old
transformsubmodule functions for manipulatingPixelArrayobjects have moved to thepixel_arraysubmodule.
Bug Fixes
- Creating a window of equal size as the display while having
scaledset toTrueno longer makes a 0x0 window. Texture'sangleproperty moved to theTransformobject.AnimationController.progresscan now reach1.0when not looping.Rect.clampwould squish the rect when clamped, now fixed.- If a
Text's internal font pointer goes out of scope or was unset, the text throws an error instead of silently failing. - When window is fullscreen, the mouse coordinates are now returned correctly adjusted to the visual dimensions.
Full Changelog: v1.3.1...v1.4.0
Kraken Engine v1.3.1
Highlights
- New ellipse draw function in the
drawsubmodule. - New
scrollmethod forPixelArrayfor offsetting the pixel content.
Breaking Changes
EasingAnimationno longer accepts start and end positions for its constructor, but are instead now properties able to be changed at any time.- Renamed
cancel_scheduledtounschedulein theeventsubmodule.
Bug Fixes
- Tiles still held onto rotation angle in degrees, causing rendering bugs. Now changed to radians.
- Text rendering wasn't affected by camera offset, now fixed and with slightly more accurate positioning.
Full Changelog: v1.3.0...v1.3.1
Kraken Engine v1.3.0
Highlights
- New
viewportsubmodule for rendering only in portions of the screen, with alayouthelper function to generate split-screen viewports (2-4 screens only). Fontclass now has properties for height, descent, ascent, line spacing, outline, and kerning.eventsubmodule contains new functions for creating and scheduling custom user events.
Breaking Changes
- Removed
sampler_countparameter fromShaderStateconstructor (for the time being). Anchorenum constants are no longer global and must be accessed explicitly (e.g.kn.Anchor.BOTTOM_RIGHT)
Bug Fixes
draw.circlewas having the camera position offset applied to it twice, making it "move" twice as fast than other rendered objects when the camera moves.- Some objects didn't have their
copymethods binded, but now are. - A couple event types weren't completely given all their attributes, fixed.
- (Probably) fixed builds for linux distros using Wayland
Full Changelog: v1.2.1...v1.3.0
Kraken Engine v1.2.1
Minor Update
Vec2class now has adistance_squared_tomethod and alength_squaredpropertymathsubmodule now has arotatefunction for non-mutating vector rotationsAnimationControllercan append more than one sprite sheet again
Full Changelog: v1.2.0...v1.2.1
Kraken Engine v1.2.0
Highlights
- New
Textclass to separate logic fromFonts AnimationController.load_sprite_sheetnow loads animation texture atlases- New
SheetStripclass for the aforementioned method update Polygons now have properties for getting perimeter, area, centroid, bounds, and some transformation methods
...and extra properties for AudioStream and AnimationController
Breaking Changes
AnimationController.load_sprite_sheetchange means all related animations must be put into one large texture atlas (may change in the future)- The separation of
FontandTextcould be problematic
Bug Fixes
- Text would "squish" to the right of its width, fixed
- Internal font now is shut down after text objects are freed
- Internal audio buffers and streams are freed before audio engine is shut down
- Shader states are now freed before the backend shuts down
Thanks to @mayamayomaya for the extra Polygon functionality and @Lookey-Lookey for finding the now-resolved text rendering bug.
Full Changelog: v1.1.1...v1.2.0
Kraken Engine v1.1.1
Hotfix Release
pydantic wasn't marked in pyproject.toml as a dependency, but now is.
🖼️ Kraken Engine v1.1.0 💥
Highlights
- New
ShaderStateandShaderUniformclasses for applying fragment/pixel shaders to rendered textures! - New
collisionsubmodule for checking overlap and containment between two shapes Colorobject instances can now be negated, multiplied, and divided by scalar valuesTileLayerobjects now haveget_from_areaandget_tile_atmethods for fast tile indexing and iteration
Breaking Changes
RectandCircleno longer have their collision checking methods as they've been moved to thecollisionsubmoduleLayerhas been renamed toTileLayer
Bug Fixes
Tile.colliderwith undefined behavior fixed due to minor typo- Game crashing with undefined user events fixed as now all modern key pressed have been added to API
Full Changelog: v1.0.0...v1.1.0


