Repository navigation
v4.0.0
What's Changed
Breaking Changes & Migration
- Moved SPX to the v4 module and runtime boundary: update Go imports to
github.com/goplus/spx/v4and use runtime4.0.0with runtime ABI4.
#2138 by @joeykchen - Removed legacy runtime APIs and the unused engine backend: retired
XGot_Game_Reload,CurrentFrame,AtFrame, and thepure_enginebackend.
#2111 #2143 by @joeykchen - Corrected the integer random overload's return type:
Rand__0(from, to int)now returnsint; callers requiring floating-point values should convert explicitly withfloat64(...).
#2108 by @go-wyvern and #2110 by @joeykchen - Raised the Go requirement to 1.26: updated the module minimum to Go
1.26.0and aligned generation and runtime builds on Go1.26.5.
#1941 by @dependabot[bot] and #1964 by @joeykchen
Scratch Compatibility & Interaction
- Preserved script order across nested broadcasts: corrected
BroadcastAndWaitordering and reduced scheduler overhead when dispatching large groups of handlers.
#2121 by @joeykchen - Aligned motion and glide behavior with Scratch: normalized invalid motion inputs and multi-revolution headings, corrected animated turns, and completed non-positive-duration glides immediately.
#2081 by @songweijun1203 and #2086 #2095 #2105 by @joeykchen - Improved monitors, questions, and speech bubbles: prevented monitor click-through, stale input after reset, text overflow, and timed-bubble flicker; questions now display correctly for hidden sprites.
#2080 #2097 #2100 #2118 by @songweijun1203 - Aligned sound controls with Scratch: corrected mute behavior and volume, pan, and pitch ranges; applied pitch changes without restarting playback and added sprite-local
ClearSoundEffects.
#2104 by @joeykchen - Added NaN-safe division:
Div(a, b), exposed asdiv(a, b)in scripts, converts NaN results to zero while preserving infinities.
#2145 by @go-wyvern
Runtime Reliability & Performance
- Strengthened startup, shutdown, and game ownership: kept startup responsive, isolated game state, and simplified coroutine cancellation and lifecycle handling.
#1898 #1907 #1908 #2106 by @joeykchen - Synchronized physics, scripts, and callbacks at frame boundaries: prevented stale sprite state from overwriting physics updates, allowed callbacks to wait across frames, and corrected timer dispatch precision.
#1971 #2119 #2137 by @joeykchen - Reduced work in runtime hot paths: optimized targeted event dispatch, pixel queries, named touching queries, layer sorting, and physics position synchronization.
#1962 #1963 #1965 #1967 #1968 by @joeykchen - Improved input recording and replay consistency: dispatched live and replay input in frame batches, preserved recording data shapes, and reduced replay copying and input-query allocations.
#2094 #2096 #2133 #2135 by @joeykchen - Simplified Godot integration and resource ownership: integrated the SPX Godot module, clarified manager and node lifetimes, and consolidated SVG, font, audio, and sprite preparation responsibilities.
#1925 #1921 #1923 #2024 #2131 by @joeykchen
Rendering, Physics & Animation
- Preserved stage proportions and background colors: corrected stage letterboxing and retained the frozen frame's aspect ratio during Web resets.
#1927 #1972 by @joeykchen - Improved costume rendering and geometry: preserved fractional SVG dimensions, used nearest-neighbor filtering for bitmaps and linear filtering for SVGs, and ignored stale rotation centers on frames without pixels.
#2085 by @joeykchen and #2122 #2124 by @songweijun1203 - Corrected pen stamping and color sensing: preserved stamp effects, included pen pixels in color queries, and adjusted the
touchingColorthreshold.
#1930 by @joeykchen and #2123 by @songweijun1203 - Stabilized collision updates: applied collider shape changes atomically and preserved collision layers and disabled state across cloning, synchronization, and shape refreshes.
#1938 #1957 #1958 by @joeykchen - Hardened animation and audio playback lifecycles: validated tweens before activation, committed segment endpoints before advancing, cleaned up interrupted animations, preserved completion identity, and kept paused audio alive.
#1932 #2010 #2018 #2019 #2091 by @joeykchen
Web, Bindings & Code Generation
- Improved Web startup and recovery: overlapped required downloads, preserved retry state after asset synchronization failures, and recovered the task queue after failed work.
#1966 #1973 #1974 by @joeykchen - Isolated Web state across sessions and callbacks: separated contact batches and array borrows, handled reentrant callbacks, and invalidated input caches at session and snapshot boundaries.
#1915 #2008 #2014 #2056 #2057 by @joeykchen - Streamlined native and Web bindings: passed scalar values directly across Web boundaries, made string ownership explicit, shared binding templates, and generated native callbacks from ABI definitions.
#1905 #1920 #1924 #1993 #2129 by @joeykchen - Separated base and AI interpreter packaging: moved Builder AI into
cmd/ispx/aiand switched official Web and npm assets to the base interpreter, while retaining local profile selection.
#2138 by @joeykchen
Assets, Packaging & Tooling
- Strengthened project loading and resource isolation: prepared and validated project data before applying engine effects, propagated sprite and stage loading errors, and prevented resource lookup from falling back to a previous game's asset directory.
#2089 #2095 #2140 by @joeykchen - Hardened downloads, caches, and process cleanup: rejected insecure release-download redirects, reserved cache lock names, preserved active build locks, and ensured supervised child processes are terminated correctly.
#2007 #2011 #2015 #2017 #2116 by @joeykchen - Simplified CLI, export, and archive workflows: avoided duplicate desktop library builds, used project names in desktop titles, shared archive validation, and improved export failure handling and retry behavior.
#2054 #2084 #2130 #2132 #2140 by @joeykchen
Testing & Maintenance
- Expanded regression coverage and consolidated test suites: strengthened runtime, rendering, input, filesystem, launcher, and tooling coverage; centralized CI test execution and aggregated coverage reporting with Codecov.
#2078 #2109 #2115 #2144 by @joeykchen and #2114 by @songweijun1203 - Updated dependencies and interpreter support: upgraded ixgo to
v1.2.6, optimized script event callbacks, and refreshed Go dependencies and GitHub Actions.
#2099 #2142 by @joeykchen and #1883 #2102 by @dependabot[bot]
Full Changelog: v3.3.0...v4.0.0