Tools, other Objects and Helpers - Grisgram/gml-raptor GitHub Wiki

Beside all the subsystems and objects in raptor, as in any other platform, there are also some functions, scripts, and other helpers that can make your life easier.

I want to encourage you to take a look into the Tools folder of the project template inside the _gml_raptor_ folder. Almost all of the utils have a quite comprehensive File Comment Header at the top explaining what the class is used for.

To name the most useful contents of the Tools folder, here is a list of the most important helpers in alphabetical order, not in order of their importance:

Audio Background music, ambience, ui, sounds and voice channels
Broadcasting A message broadcasting system to track your achievements or to send out anything to the game
Buffers Buffer management, encrypting, hex-dumps for debugging and more
CanvasDrawer A wrapper object for the Canvas library by @tabularelf which draws a Canvas as if it were a sprite
Eye The Eye is an extremely useful object for camera control and multi-layer parallax scrolling effects in your game
Files A group of very handy helpers to load/save files with high performance due to buffer usage. This is one of the most important bases for the Savegame system.
LayerManager
TileScanner
Two utility classes that help you batch-set layer visibility of entire groups, change background color, scan tile layers, provide detailled tile information and allow you to modify tile layers at will
LinqArray If you know C#, then you know Linq. This is an array implementation that lets you work with methods like .Where(..).Skip(2).Select(...) as you know it from the .net world
ListPool A simple list extension with a process_all method. It's the base for the StateMachine and Animation pools of raptor
Little Helpers A group of functions that did not fit anywhere else, like is_any_of(..), is_between(..) and similar micro functions
ObjectPool Push/Pull instances instead of creating and destroying them
ParticleManager Helps in organizing particle systems, types and emitters
PopupManager A basic helper system for overlays and popups
RingBuffer A standard RingBuffer (wikipedia link) implementation, that keeps the last n entries of anything. Easy to use, very performant
SpriteDim var dims = new SpriteDim(sprite_index);
A small utility class, that reads the dimensions and nine-slice information from a sprite_index, fail-safe with defaults if anything does not exist
Strings String helper functions, like sprintf, starts_with, ends_with, skip_start, skip_end and many more
Structs Some struct enhancements for nested structs, like set_by_path, get_by_path, integrate, join...
TileScanner A powerful tool for modifying and analyzing tile layers, with a delta-mechanism to save and restore modified maps
UnitTest A complete unit testing suite for your data classes. Look into the _unit_tests_ folder to see how you can test your code!
⚠️ **GitHub.com Fallback** ⚠️