From logic to tuple, every Verse type has its own temperament — learn the faces before making friends.
logic · the boolean
Verse's boolean type, holding only true and false. But it's not what if eats — conditions want a failable expression, so a logic needs the query operator to get in: if (Flag?).
It's Blueprint's Boolean — only true and false. But careful: Verse's if is not a Branch that takes a Boolean straight in — it asks "does this go through". To use a logic as a condition, append a question mark: if (Flag?), translating "true / false" into "goes through / doesn't".
Lesson 7 · logic & enum →
int / float / rational · the number trio
int is a 64-bit signed integer; float is an IEEE double-precision float whose literals must carry a decimal point (write 1.0, not 1); the two never convert implicitly — mixing them is a straight compile error. int divided by int yields a third type, rational (an exact fraction) — use Floor or Ceil to get back to int.
Two kinds of numbers: int is a whole number (Blueprint's Integer pin), float is a decimal (the Float pin). Decimals must be written with the point (write 1.0, not 1) or they're read as integers. The two don't auto-convert for you the way Blueprint does — mix them in one calculation and it lights up red. Bonus trivia: integer ÷ integer yields a third, exact-fraction type called rational; to get back to a whole number use Floor (round down) or Ceil (round up).
Lesson 5 · int & float →
string · text
Under the hood, a type alias for []char; literals use double quotes. Braces interpolate: "Score: {Score}" — escape a literal brace as \{. Being an array, the whole array toolkit — Length, indexing, Slice — applies verbatim.
A run of text in double quotes (Blueprint's String). To embed a variable's value in the text, use braces: "Score: {Score}" — whatever's inside gets swapped for the actual value (like wiring a variable into a Format Text placeholder); to print an actual brace, escape it as \{. Under the hood it's an array of characters, so the array toolkit (length, index, slice) works on it as-is.
Lesson 6 · Strings & Interpolation →
enum · named options
A set of named values: card_suit := enum{Clubs, Diamonds, Hearts, Spades}, accessed as card_suit.Clubs. Members hide no integers underneath — no converting to int or string; branching goes to the case expression.
A set of well-named options — the Enumeration asset you create from the right-click menu in Blueprint, say "Clubs / Diamonds / Hearts / Spades". Pick one as "type name.member name" (like choosing from the enum dropdown). No integer hides behind a member — no converting to numbers or text; to handle each value separately, hand it to case (your Switch on Enum).
Lesson 7 · logic & enum →
array · the ordered list
An ordered list of same-typed elements: type []int, literal array{1, 2, 3}. Indexing starts at 0 and is a failable expression — out of bounds doesn't crash, it just fails; the array itself is an immutable value, so "modifying" really means replacing the whole thing.
A row of same-typed things in order — Blueprint's Array. Take items by index (counting from 0), but that step "might not go through" — an out-of-range index won't crash the game; the step just fails and takes the else. One temperament Blueprint doesn't have: Verse arrays are "read-only values", so "changing the array" actually means swapping the whole pack for a new one. Process them one by one with ForEach.
Lesson 12 · Arrays →
map · the lookup table
A key-value register: type [string]int, literal map{"a" => 1}. Keys must be subtypes of comparable; reads and writes are both failable — even set M[K] = V has to sit inside an if.
A "key → value" register (Blueprint's Map): look up a score by name, health by ID. Both lookups and writes "might not go through" — looking up a missing key fails — so even writing set M[K] = V has to sit inside an if. Whatever type you use as the key must come from the "can be compared for equality" family.
Lesson 13 · Maps →
weak_map · the save-game map
map's special cousin: no iteration, no Length — only per-key reads and writes. Module-scope vars must be weak_map types; a module-level weak_map keyed by player with persistable values is exactly the vehicle for cross-session saves.
A special relative of map: it can't be iterated as a whole and won't tell you its size — you read and write one key at a time. Its headline job is saving: put it "outside the class" (module level), key it by player, declare the value persistable, and you've got a per-player SaveGame that's still there after quitting and rejoining.
Lesson 22 · Persistent Data →
option · the maybe-box
The "might have a value, might be empty" box: the type is written ?int, the empty value is false, and values go in with option{42} (braces, not parentheses). Unwrap with the postfix ?, a failable expression; and option{...} is itself a failure context that turns failure into an empty box.
A little box that "might hold something, might be empty". The type is written ?int, the empty box is false, and things go in with option{42} (note the braces). To take the contents out, append a question mark — a step that "might not go through" (an empty box takes the else). And option{...} is itself a fault-tolerant spot: if the step inside fails, it doesn't error — it just hands you an empty box.
Lesson 14 · option & tuple →
tuple · the fixed bundle
A fixed-length, mixed-type group of values: type tuple(int, string), literal (1, "a"). Elements read with parentheses T(0) — the arity is settled at compile time, so access cannot fail, but the index must be a compile-time constant. Multiple return values ride on it.
A fixed few values, possibly of different types, bundled into one little pack — say "an integer + a piece of text". Pack with parentheses (1, "a"), and take the nth item with parentheses too: T(0) — how many items and each one's type are locked in at compile time, so reading can't fail, but the index has to be a hardcoded constant. When a Blueprint function wants to hand back several return values at once, this is how.
Lesson 14 · option & tuple →
class · data + behavior
A composite structure with reference semantics: my_class := class: defines fields and methods, with Self referring to the current instance inside method bodies. Single inheritance from one class plus any number of interfaces; overriding a member requires <override>, and the parent implementation is called as (super:)Method().
The Blueprint class itself — data (fields) and behavior (methods) packed into something you can stamp instances from over and over, with Self meaning "this instance of me" inside methods. It can claim only one parent class (inheriting like a Child Blueprint Class) but can sign up for several interfaces at once; overriding an inherited member must carry <override> (that Override dropdown in Blueprint), and calling the parent's original implementation is (super:)Method().
Lesson 16 · Classes & Inheritance →
archetype · instantiation, Verse-style
How Verse instantiates objects: there is no new — write my_class{Field := 3} directly, and the braces must assign every field that lacks a default. For more elaborate initialization logic, a <constructor> function is available.
How you "build an instance" in Verse: no new keyword like elsewhere — write my_class{Field := 3} and out one comes, with every field lacking a default filled in inside the braces (a bit like filling in the required fields in the Details panel before you can Spawn). To wrap up fancier initialization steps, there's also an optional <constructor> function.
Lesson 16 · Classes & Inheritance →
struct · plain data, copied by value
A value-semantics aggregate of pure data: assignment, parameter passing, and container storage all copy the whole thing. No var fields, no methods in the body (add behavior via extension methods); a regular at small data bundles and persistence.
The Structure asset from your right-click menu — a small bundle of pure data. It has "value" semantics: assign it to someone, pass it as a parameter, drop it in a container — each time the whole pack is copied (editing the copy never touches the original). House rules: no mutable var fields inside, no methods either (add behavior with extension methods); a regular for small data bundles and save data.
Lesson 17 · struct & interface →
interface · the contract
A behavioral contract of pure function signatures — no fields, no implementations. A class can implement several at once, providing each interface method with <override>; polymorphism across inheritance trees rides on it.
You know this one already — it's the Blueprint Interface (BPI): it only lists "which functions must exist", never how; whoever signs up for the interface has to fill those functions in themselves (each with <override>). Verse's interface is BPI in code form. One class can sign up for several at once, and you get one uniform way to call across different inheritance trees.
Lesson 17 · struct & interface →
comparable · allowed to ask "equal?"
The family of types that can be tested for equality with = and <>: int, float, logic, string, char, enums, plus any array / map / option / tuple whose elements are all comparable. Map keys must be subtypes of comparable — the admission check at the door.
The "can be tested for equality" family of types: integers, floats, Booleans, text, characters, enums, plus arrays / maps / options / tuples whose contents are all comparable. Why care? Because a map's key must come from this family — it's the entry ticket for being a key. Equal is =, not-equal is <>.
Lesson 13 · Maps →
unique · instances with identity
A class specifier: every instance of a <unique> class receives a unique identity at construction and compares by identity with =, which makes it comparable — this is precisely why player and agent can be map keys. Ordinary class instances have no identity and cannot be compared at all.
A label you hang on a class: <unique>. With it, every instance that rolls off the line carries a "one-of-a-kind ID card", so you can check by identity whether two are the same one — which also qualifies them as map keys. Players (player, agent) can be keys for exactly this reason. Ordinary instances without the label have no ID card and can't be compared at all.
Lesson 16 · Classes & Inheritance →