All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Dynamic Memory Pool: Replaced fixed hard-coded 2048 animation slot limit with a dynamic vector-based pool that grows automatically on demand, eliminating memory waste and hard slot limits
- Configuration System: Added
config.jsonsupport for customizing component behavior:easing.update_rate_fps: Control animation framerate (default: 30)easing.batch_process_limit: Tune max animations per update tick (default: 100)easing.expected_players: Memory pre-allocation hint (default: 512)easing.initial_capacity: Starting animation pool size (default: 64)easing.callback_reserve: Pre-allocated callback buffer (default: 128)
- Generation-based ID System: Animation IDs now encode generation counters, preventing stale ID aliasing when slots are recycled
- New Animation Functions:
PlayerText_MoveLetterSizeX(): Animate letter width separatelyPlayerText_MoveLetterSizeY(): Animate letter height separatelyPlayerText_MoveTextSizeX(): Animate text width separatelyPlayerText_MoveTextSizeY(): Animate text height separately
- Silent Animation Tracking: New
silentAnimationsstat inGetAnimationStats()to monitor callback-less animations - Improved Build Pipeline:
- Visual Studio version auto-detection via vswhere
- Support for VS 2019, VS 2022, and VS 2026
- Build workflow now triggers on all branches and pull requests
- Added MSBuild setup automation
- Default Parameters: All animation functions now have sensible defaults:
durationdefaults to1000mseaseTypedefaults toEASE_NONEsilentdefaults tofalse
- Memory Layout Optimization: Changed animation collection from fixed array to vector with free-list recycling for O(1) allocation/deallocation
- Batch Processing: Improved round-robin animation processing to honor batch limits without dropping animations - every animation still progresses even under heavy load
- Performance Metrics: Update time now uses exponential moving average instead of overwriting each tick
- Color Helper Improvements:
- Renamed
GetColorRGBA()toGetColorFromRGBA()(with backward compatibility via conditional define) - Added new
GetRGBAFromColor()function for color decomposition - Added proper bit masking to handle out-of-range values safely
- Renamed
- Code Structure: Moved main source file from
main.cpptosrc/main.cpp .gitignoreUpdates: Addedpawn-easing-functions.incto ignore list
- Animation Aliasing: Generation counters prevent reused slots from accepting commands meant for old animations
- Active List Management: O(1) removal from active animations list using stored position instead of linear search
- Player/TextDraw Validation: Proper null checking for player and textdraw state before updates
- Update Cursor: Added bounds checking to prevent cursor overflow when animations are removed
- Hard-coded
MAX_ANIMATIONS = 2048constant - Direct array-based animation storage
- Dynamic memory pool reduces memory footprint significantly (starts at 64 slots, grows on demand)
- O(1) animation lookup and removal instead of linear searches
- Hash-set based textdraw batch deduplication for large-scale updates
- Conditional configuration allows tuning for various server sizes
- Animation IDs are now opaque handles: Do not use as array indices or assume sequential numbering
GetAnimationStats()now has 4 parameters (addedsilentAnimationsas 4th parameter with default 0)PlayerText_MoveLetterSize()andPlayerText_MoveTextSize()split into X/Y variants for finer controlGetColorRGBA()renamed toGetColorFromRGBA()(old name still available via conditional compilation)
If upgrading from 1.0.2.0:
- Update includes to use
#include <omp_easing> - Replace
GetColorRGBA()calls withGetColorFromRGBA()(or use the compatibility macro) - Update any
GetAnimationStats()calls to handle the 4th parameter - If using
PlayerText_MoveLetterSize()orPlayerText_MoveTextSize(), split into X/Y variants:// Old: PlayerText_MoveLetterSize(playerid, td, 0.5, 1000, EASE_OUT); // New: PlayerText_MoveLetterSizeX(playerid, td, 0.5, 1000, EASE_OUT);
- Add
easingconfiguration block toconfig.jsonif you want to customize performance tuning
Initial release with fixed 2048 animation slots and basic easing functionality.