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
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
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
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
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
Learn Java arithmetic, assignment, comparison, logical, bitwise, shift, conditional, and instanceof operators, including short-circuit evaluation and precedence.
Java Primitive Data Types: Ranges, Defaults, Literals and Examples
Understand all eight Java primitive types—byte, short, int, long, float, double, char, and boolean—with ranges, literals, defaults, and examples.
Java Variables: Declaration, Scope, Fields and Constants
Learn Java variable declaration, initialization, naming, types, scope, and lifetime, including local variables, parameters, instance fields, static fields, and constants.
Java Syntax Basics: Classes, main, Identifiers, Comments and Keywords
Learn Java syntax through HelloWorld, including class and source-file structure, the main method, case sensitivity, identifiers, comments, keywords, and naming conventions.
Java System.out.print vs println: Line Breaks, Formatting and Examples
Compare Java System.out.print and System.out.println, including automatic line breaks, consecutive output formatting, string concatenation, and runnable console examples.