Schedule a repeated callback with framework.scheduler and cancel it through its returned handle.
Software notes and practical experiments
This is the English entry point to Nanfeng's development blog. The archive currently contains Chinese-language technical notes; English translations will be published progressively.
Controlling Node Order in Cocos2d-x Lua
Change the relative drawing order of sibling nodes with setLocalZOrder.
Truncating Long UTF-8 Label Text with an Ellipsis in Lua
Shorten a label string by Unicode character count and append an ellipsis when it exceeds a limit.
Wrapping Label Text in Cocos2d-x Lua
Prefer a bounded label width for automatic wrapping, with a UTF-8-aware manual fallback when necessary.
Diagnosing an “Argument Value Is Outside the Valid Range” Xcode Error
Trace a range error through nested macros after an Xcode upgrade and prefer an upstream compatibility fix over an unexplained constant edit.
Lua Threads, Coroutines, and Independent States in the C API
Understand cooperative Lua threads within one state, independent states for isolation, and the C API lifecycle rules around each model.
Useful Xcode Paths and Debugging Tools on macOS
A reference for common Xcode caches, archives, simulator data, provisioning profiles, and memory-debugging tools.
Managing Native Resources in a Lua C Module
Wrap a native parser in full userdata, validate its type, close it idempotently, and register __gc as a cleanup fallback.
Implementing a Custom Bit Array Type for Lua in C
Store Boolean values compactly in C userdata and expose safe indexed access, length, and string conversion to Lua.
Writing Better Lua C Functions: Arrays, Strings, and State
Practical techniques for manipulating arrays and strings and preserving state in Lua C functions.