Cocos2d-x Lua Text Underline: Draw a Reusable DrawNode Segment
Classify at:
Game Development
Add an underline beneath a Cocos2d-x Lua label with DrawNode and drawSegment by wrapping endpoints, color, width, scale, and positioning in a reusable helper.
Count Lua Table Fields: Length Operator, pairs and table.nums
Classify at:
Programming Languages
Understand why Lua's length operator applies to sequences, then count every non-nil array or keyed entry with pairs or a table.nums helper.
Get File Size in Cocos2d-x Lua with io.open, seek and Error Handling
Classify at:
Game Development
Open a file in Cocos2d-x Lua, seek to its end to obtain the size in bytes, close the handle reliably, and return false when the file cannot be opened.
Cocos2d-x Lua Degrees and Radians: Formulas and Helper Functions
Classify at:
Game Development
Convert degrees and radians in Cocos2d-x Lua with math.pi formulas and reusable helpers for node rotation, trigonometry, directions, and angle calculations.
Split Strings in Cocos2d-x Lua with Single or Multi-Character Delimiters
Classify at:
Game Development
Implement a Cocos2d-x Lua string-split helper with string.find and string.sub that treats single or multi-character delimiters literally and returns an array.
Open Facebook from Cocos2d-x Lua with Android Deep Link and Web Fallback
Classify at:
Game Development
Call Android Java from Cocos2d-x Lua, open a Facebook page through an app deep link when available, and fall back to the browser URL when necessary.
Java Conditional Statements: if, else if, Ternary and switch
Classify at:
Java
Learn Java if, else if, nested conditions, the ternary operator, and switch statements through syntax explanations and practical code examples.
Java Expressions, Statements and Blocks: Operators, Logic and Scope
Classify at:
Java
Learn how Java expressions produce values, statements perform actions, and braces create blocks, with arithmetic, Boolean, short-circuit, and scope examples.
Java Operators: Arithmetic, Comparison, Logic, Bits and Precedence
Classify at:
Java
Learn Java arithmetic, assignment, comparison, logical, bitwise, shift, conditional, and instanceof operators, including short-circuit evaluation and precedence.
