Releases: B4uti4github/choppy-js
Releases · B4uti4github/choppy-js
v2.1
Added
- Physics Integrity Shield (
clampPause): Implemented a per-layer safety mechanism that prevents logical corruption during extreme frame-rate fluctuations (Lag Spikes). - Self-Healing Loop: The engine now automatically suspends execution of layers marked with
clampPauseifdeltaTimeexceeds 100ms, effectively preventing "tunneling" or physics clipping. - State-Aware Initialization: Added protection to ensure
initScriptexecution is never bypassed by the clamping logic, maintaining object lifecycle consistency.
Changed
- Time Handling: Transitioned from "Fixed Delta Clamping" to "Dynamic Frame Suspension". The engine now preserves real-time fidelity (
window.deltaTime) while shielding sensitive logic layers. - Z-Stack Optimization: Refactored the core loop to a boundary-checked linear iteration for maximum performance.
Fixed
- Lag-Induced Clipping: Solved the "Geometry Dash" like issue where high lag spikes caused objects to pass through boundaries.
v2.0
Added
- Layer Stacking: Sequential execution of multiple active scenes (Z-Order).
- Instance-Based Logic: Scenes are now
ChSceneinstances with privatethiscontext. - DNA Mutation (The "Blueprint" Trick):
- You can define
new ChScene()molds as "blueprints" and store them without adding them to the engine. - These blueprints consume zero CPU/Execution time until you decide to inject their scripts into a live layer.
- You can define
- Dynamic Hot-Swapping: Use
changeLayer()to swap the logic (Init, Scene, End) of a live layer using a blueprint's DNA. - Self-Management: Built-in
pause(),run(),reset(), andkill()for every layer. - DeltaTime Clamping: Lag protection capped at 100ms.
Changed
- High-Level Orchestration: Refactored from a simple drawing manager to a framework-agnostic logic orchestrator.
- Execution Context: Scripts run via
call(window, this), allowing professional OOP patterns and "Hot-Swapping" logic.
Deprecated
- Numeric Indexes: Removed scene selection by number. Management is now strictly name-based and layer-oriented for professional scalability.
v1.5
What is new?
The new here in version 1.5 is that we've added a quality-of-life improvement suggested by FuukoTaki: now you can set a scene using its name. We also added support for other frameworks and the init function. This function runs once when the scene is created to initialize variables, while the main loop handles the logic :DDD.
Note for WebGL/Frameworks: If you use OpenFL, set the third argument to true. If you use WebGL, set the second argument to true (recommended only with OnlyFrameMode).
Remeber that in Openfl or other frameworks with an system of charcaters, delete the global characters in the init of the next scene of that charcaters
v1.1
- From EscenaActual to actualScene.
- Added examples, feel free to use these examples for your projects, more examples soon 😉.
- Added Changelog.
v1.1a
- From EscenaActual to actualScene.
- Added examples, feel free to use these examples for your projects, more examples soon 😉.
- Added Changelog.
Fix
- Docs fixed.
v1.0
- first commit :D