Learn Verse, Fortnite’s programming language
When you learn Verse, you unlock everything devices can’t do in UEFN (Unreal Editor for Fortnite). Epic Games designed the language with rules of its own: conditions are built on failure, functions declare their effects, and waiting is handled without callbacks. Here are the ideas to grasp, an annotated example and a path to get better.
What is Verse?
Verse is UEFN’s programming language, introduced by Epic Games alongside the editor at GDC in March 2023 (Epic). Epic describes it as a language designed with video games and real-time 3D experiences in mind (Epic). It blends functional, logic and imperative programming (Book of Verse).
In UEFN, you mostly write Verse devices: classes you place in the level like any other device, and which drive the others. Verse is also used to build components for the Scene Graph, Epic’s entity system.
Learning Verse pays off beyond Fortnite. In June 2026, Epic announced Unreal Engine 6, which merges Unreal Engine 5 and UEFN into a single product, with Verse and the Scene Graph at its core; Early Access is planned for the end of 2027 (GamingOnLinux).
Failure contexts: the idea that surprises everyone
In most languages, a condition is a boolean, true or false. In Verse, many expressions can fail: a comparison that doesn’t hold, an out-of-bounds array access, an integer division by zero. Failing isn’t an error: the expression simply produces no value (Book of Verse).
An expression that can fail has to sit in a failure context, such as the condition of an if or the domain of a for (Epic). In practice, that means:
- Array access is checked as it happens: if (Value := Scores[2]): only runs the block if that element exists.
- A function that can fail carries the <decides> effect and is called with square brackets: FindPlayer[Name] instead of FindPlayer(Name).
- Changes are rolled back on failure: if an expression fails inside an if block, variable changes made earlier in that block are undone.
This one mechanism replaces null checks, bounds checks and some exceptions. It feels odd at first, then quickly becomes second nature.
Effect specifiers: what a function is allowed to do
Every Verse function declares its effects, the categories of behavior it can exhibit (Epic). The compiler checks that it does nothing beyond what it declares. The most common ones:
| Effect | Meaning | In practice |
|---|---|---|
| <decides> | The function can fail | Called with square brackets, inside a failure context |
| <suspends> | The function can pause and resume later, across frames | Required for Sleep, waiting on events, or using race and sync |
| <transacts> | Its actions can be rolled back | Epic’s docs state that a <decides> function must also have it |
| <computes> | Pure computation, no side effects | For stateless helper functions |
Two rules to remember: effects propagate, so a function that calls a <suspends> function must itself be <suspends> (Book of Verse); and <decides> and <suspends> can’t be combined on the same function (Book of Verse).
Concurrency in Verse: spawn, race, sync, rush and branch
Games spend most of their time waiting: for a countdown to end, a button press, a player elimination. Verse builds that waiting into the language: a <suspends> function can call Sleep(5.0) or wait for an event, and dedicated expressions run several tasks at once (Book of Verse).
| Expression | What it does |
|---|---|
| sync | Starts all its branches together and waits until every one has finished |
| race | Starts its branches together; the first to finish wins and the others are canceled |
| rush | Like race, but the other branches keep running in the background |
| branch | Starts a block in the background and moves on immediately; it’s canceled when the enclosing function exits |
| spawn | Starts an independent task that can outlive the code that created it |
The first four are structured: their lifetime is tied to the enclosing block, which prevents forgotten tasks. spawn is the escape hatch, best kept for tasks that genuinely need to keep running on their own. Be especially wary of spawn inside a loop: if it starts functions that never end, it keeps creating them until a runtime error occurs (Epic).
An annotated Verse example
This device prints the first answer from a list, then gives a player ten seconds to press a button. It ties together the three ideas above. The file starts with the three using lines generated by the Verse Device template: using { /Fortnite.com/Devices }, using { /Verse.org/Simulation } and using { /UnrealEngine.com/Temporary/Diagnostics }.
| Code | What it does |
|---|---|
| quiz_device := class(creative_device): | Declares a Verse device. Once built, it shows up in the Content Browser and can be placed in the level. |
| @editable | Makes the next field editable in the editor’s Details panel. |
| Button : button_device = button_device{} | A button from the level, which you’ll assign in the editor. |
| Answers : []string = array{"Red", "Green", "Blue"} | An array of strings. |
| OnBegin<override>()<suspends>:void = | Runs when the game starts; <suspends> allows it to wait. |
| if (First := Answers[0]): | Array access inside a failure context: the block only runs if element 0 exists. |
| Print("First answer: {First}") | Writes the value to the log, using string interpolation in braces. |
| Winner := race: | Starts the next two blocks at once and keeps the value of whichever finishes first. |
| block: | First contender… |
| Sleep(10.0) | …waits ten seconds… |
| "timed out" | …then returns this text. |
| block: | Second contender… |
| Button.InteractedWithEvent.Await() | …waits for a player to press the button… |
| "button pressed" | …then returns this text. The losing block is canceled. |
| Print("Result: {Winner}") | Prints “timed out” or “button pressed”. |
To try it, run Verse > Build Verse Code, place quiz_device in the level, pick a button from the level for its Button field, then click Launch Session and open Island Settings > Log in game (Epic).
How to start learning Verse: a learning path and official resources
- Basics, no prerequisites. Epic’s official series Learn the Basics of Writing Code in Verse is aimed at people who have never programmed: nine lessons of 3 to 10 minutes, each followed by an exercise (Epic).
- Your first program. The Modify and Run Your First Verse Program tutorial shows how to create, build and run a Verse device in UEFN (Epic).
- Feature Examples. In UEFN’s Project Browser, these sample projects show a feature or a Verse technique, ready to take apart (Epic).
- The language reference. The Book of Verse, published by Epic on GitHub, covers the language in depth. It tracks the main development branch, so some features it describes may not be in UEFN yet (Epic).
- The API reference. For Fortnite devices and functions, use the Verse API reference.
- Small devices of your own. A countdown, a scoreboard, a code-locked door: one project per concept, then combine them.
Keep Epic’s Verse glossary close by to look up terms along the way.
Common mistakes when learning Verse
- Calling a <decides> function outside a failure context. The compiler reports “This invocation calls a function that has the 'decides' effect”. Put the call inside an if, or provide a fallback value with or (Epic forums).
- Mixing up parentheses and brackets. A function that can fail is called with square brackets, all others with parentheses.
- Forgetting <suspends>. Any function that calls Sleep, Await or race must be <suspends>, and the effect travels up the call chain.
- Mixing int and float. No conversion is implicit: multiply an int by 1.0 to get a float, and use Floor, Round, Ceil or Int the other way, with square brackets, because these conversions can fail. Dividing two ints can also fail, and returns a rational (Book of Verse).
- Forgetting set. A variable declared with var is changed with set, as in set Score = Score + 1; without set, = is just a comparison (Book of Verse).
- Assuming code that builds is code that works. An infinite loop can build without errors, then cause a runtime error, and a runtime error stops all Verse code on the island (Epic).
- Debugging blind. Print writes to the log and the screen; Verse loggers write only to the log, with a channel and a severity level, which keeps things readable.
Learning Verse with AI: what actually helps
General-purpose AI assistants are good at explaining a concept or an error message. When it comes to writing Verse, they have a weak spot: the language is young, its API keeps changing, and they happily invent a function or signature that doesn’t exist. You only find out when you build.
So the rule is simple: only the compiler has the final word. Ask for code, build it, read the diagnostics, and have each error explained rather than patching it blindly. Reading those diagnostics is what makes failure and effects click.
That’s how Island Pilot’s Verse Coder works: it writes code in your project’s real files, builds it through the editor, fixes it from the real diagnostics UEFN returns, then shows you every change to approve. Reading its changes, you learn on your own game. The details are on the Verse code page.
FAQ
Is Verse hard to learn?
The basics (variables, functions, conditions) are approachable. What takes some getting used to are the ideas unique to Verse: failure contexts, effects and concurrency. Small projects make them feel natural.
Can I learn Verse if I’ve never programmed?
Yes. Epic offers a series of short lessons written for people with no programming experience at all, with an exercise after each one.
Do I need Verse to publish a Fortnite island?
No. Fortnite Creative and UEFN devices are enough for many game modes. Verse becomes useful for custom mechanics: see How to make a Fortnite game with UEFN.
Which editor should I use to write Verse?
Visual Studio Code: in UEFN’s Verse Explorer, double-clicking a .verse file opens it in VS Code. You build from the editor’s Verse menu.
Is Verse used outside Fortnite?
Today, Verse runs in UEFN. In June 2026, Epic announced that Unreal Engine 6 will merge Unreal Engine 5 and UEFN around Verse and the Scene Graph, with Early Access targeted for the end of 2027.
Can AI write Verse for me?
Yes, as long as a build checks it: code that hasn’t been compiled is only a suggestion. Island Pilot’s Verse Coder builds through the editor and reads the real diagnostics before handing control back to you.