pH Reference Guide
Tired of creating dozens of rough placeholders by hand, one by one by one? Wish you could just focus on programming now, and worry about art assets later? Enter pH, a fast and smart solution for creating placeholders in real-time! Placeholders created with pH are treated exactly like sprites, except they'll never clutter up your resource tree.
Creating placeholders is simple. All you need is a single function: ph_create
. This script can be run directly within regular sprite functions (e.g. draw_sprite
) or assigned to a variable so that the generated placeholder can be re-used later. However, thanks to a smart caching system, pH always re-uses existing placeholders when available, regardless of whether a corresponding variable exists or not! Because of this, it's almost never necessary to clear generated sprites from memory, but in cases where large amounts of placeholders are used, it is also possible to purge them with the ph_free
function. This ensures pH never interferes with performance or memory usage statistics.
In this reference guide, we'll examine each function in detail.