These pages describe the Verse programming language and its syntax. Spend time getting familiar with the language, then use these pages as reference.
If this is your first time using Verse, or if you're learning programming for the first time, make sure to check out Programming with Verse to help you get started. You'll also find a useful onboarding guide.
What Is Verse?
Verse is a programming language developed by Epic Games that you can use to create your own gameplay in Unreal Editor for Fortnite, including customizing your devices for Fortnite Creative.
Verse’s primary design goals:
- Simple enough to learn as a first-time programmer.
- General enough for writing any kind of code and data.
- Productive in the context of building, iterating, and shipping a project in a team setting, and integrating code and content.
- Statically verified to catch as many categories of runtime problems as possible at compile time.
- Performant for writing real-time, open-world, multiplayer games.
- Complete so that every feature of the language supports programmer abstraction over that feature.
- Timeless — built for the needs of today, and for foreseeable future needs, without being rooted in the past artifacts of other languages.
The design goals above informed key features of the Verse programming language:
- Strongly typed to minimize opportunities for uncaught errors in development or deployment and support static checking.
- Multi-paradigm to use the best of functional programming, object-oriented programming, and imperative programming, such as being as deterministic as possible. One example of this is that data is immutable by default, and given the same code and data, results will always be exactly the same.
- There is no distinction between statements and expressions. In Verse, everything is an expression, which means that everything has a result.
- Failure is control flow. Instead of using true / false values to change the flow of your program (such as with decision points), Verse uses failable expressions, which produce a value if they succeed or don’t if they fail. Failable expressions can only be executed in failure contexts, such as
if
expressions. - The ability to do speculative execution within failure contexts, meaning you can try out actions without committing them. When an expression succeeds, the effects of the expression are committed, but if the expression fails, the effects of the expression are rolled back as though the expression never happened. This way, you can execute a series of actions that accumulate changes, but those actions will be undone if a failure occurs in the failure context.
- **Concurrency at the language level so you don’t need to rely on system-level threads across multiple processors to perform actions simultaneously. You can author time flow the same as you do control flow by using built-in concurrency expressions in the language.
Epic Games is continuing to develop the Verse programming language and add more features. For Verse code that you write today, you can expect Verse to provide backward compatibility and continue to work with future updates to the language.
Explore the Language
Use the following pages as a reference for the Verse programming language.