Verse (programming language)
This article needs additional citations for verification. (June 2024) |
Verse is a static typed object oriented programming language created by Epic Games. It was released alongside of UEFN in March of 2023 and was authored by Simon Peyton Jones, and Epic Games CEO Tim Sweeney. Verse is designed to interact with Fortnite Creative's existing devices system. As of June 2024, UEFN remains the only way to interpret, parse, compile or run Verse code; plans to implement the language into the release of Unreal Engine 6 have been discussed.[1]
Features
Modules and Importing
Verse supports modular programming, allowing developers to import specific modules required for their scripts. Commonly used modules include the API digests that are generated every time a project containing verse is opened. There is an API digest to access and interact with Fortnite objects, Verse objects, and Unreal Engine objects. Developers can also create their own modules and import them into scripts if needed,
Classes and Objects
Verse employs a class-based object-oriented programming model. Developers can define classes to represent various game entities and behaviors.
For example:
building_manager_device := class(creative_device)
The above code defines a new class inheriting from `creative_device`
Functions and Methods
Verse allows defining functions within classes. These can perform various operations, such as mathematical calculations, game logic, and more. The example below is a method to determine if a character is looking at a specific location.
IsLookingAtLocation(Character:fort_character, LocationToCheck: vector3, Threshold: float):logic
Event Handling
The language supports event-driven programming, where events like EliminatedEvent
and PlayerAddedEvent
can trigger specified functions. Events can also be subscribed to and listened for.
Mathematical and Spatial Operations
Verse supports various mathematical functions necessary for game development, such as calculating magnitudes, normalizing vectors, and converting rotations to direction vectors. The spatial math module provides classes and functions for vector and rotational math, essential for game development tasks like positioning and movement.Cos
, Normalize
, Distance , ArcTan
, and Lerp
are a few of the functions are available for mathematical operations.
Future Plans
Epic Games has described Verse as the programming language for the metaverse and has factored in mass scalability into it's development. Until the proposed convergence with Unreal Engine, it is yet to be seen how Verse will behave interacting with various systems and processes outside of the Fortnite ecosystem.
References
- ^ "VerseMetaVerse/UnrealVerse". Github. Retrieved 6 June 2024.