Verse’s basic types fall into a clean set of primitives optimized for deterministic game logic in Unreal Editor for Fortnite (UEFN). This tutorial unpacks each primitive type and demonstrates how to apply them in real-world game scripts.
1. Numeric Types
Numbers form the foundation of gameplay logic—tracking positions, character stats, timers, and score thresholds.
A. int (Integer Numbers)
An
int represents a whole number that can be positive, negative, or zero. At runtime, Verse integers support arbitrary precision. However, when you write literal numbers directly in your source code, they must fit within a standard 64-bit signed range. Standard arithmetic applies (+, -, *), but standard division (/) yields a rational type instead of an int.B. float (Decimal Numbers)
A
float handles fractional and decimal numbers using 64-bit IEEE-754 floating-point math. It includes native support for special IEEE values like NaN (Not a Number) and infinity. Use floats for precision systems like speed scalars, game timers, vectors, and physics calculations.C. rational (Exact Fractions)
A
rational type represents an exact fraction. It is generated automatically when you divide one int by another. Because it preserves exact fractional mathematics, it avoids the rounding errors common to floating-point numbers. The runtime normalizes fractions automatically, and int acts as a natural subtype of rational.2. Logical Type
logic (Boolean Values)
The
logic primitive represents a boolean state: either true or false. It controls conditions, execution branches, and state checks within game rules.3. Text Types
Verse separates text into individual characters and full immutable strings.
A. char
A
char represents a single 16-bit UTF-16 code unit, ideal for standard alphanumeric symbols.B. char32
A
char32 represents a full 32-bit Unicode scalar value. Use this type when dealing with extended characters, such as complex symbols or emojis.C. string
A
string is an immutable sequence of UTF-16 code units. It handles player names, on-screen messages, and UI text layout. Strings fully support structural string interpolation using curly braces {}.4. Special Types
A. any
The
any type acts as the universal supertype for all types in Verse. While it can store any value, using it strips away compile-time type safety. It is primarily utilized when constructing highly generalized containers or abstract frameworks.B. void
The
void type represents an empty type containing no values. It is explicitly used to define functions that execute side effects but return no meaningful output data back to the caller.5. Intrinsic Functions
Intrinsic functions are low-level operations built directly into the Verse runtime rather than written in Verse code itself (e.g.,
Abs(), Floor()). Because they are bound directly to the runtime architecture, they cannot be stored inside variables or passed as functional parameters.Complete Blueprint: Combining Basic Types
The following script brings all of these fundamental primitive types together into a cohesive code snippet: