Category:Type

Category page
Revision as of 23:17, 13 April 2024 by TheAutopilot (talk | contribs) (started with the plan to just fix the description of what types actually are, hopefully kept it understandable for non-scientists, definitely failed to avoid spending hours in researching the Resonite data model)

A type describes a range of possible values. This includes numbers or other primitive types, but also more abstract concepts ranging from text, users, join requests up to just “parts of a world”.

Categorization

Types can be split into different categories. In many situations there is some kind of distinction between “simple” and “complex” types.

The specifics are dependent on the context you are talking about.

ProtoFlux

Execution of ProtoFlux is a local phenomenon that runs on the computer that started it. In fact the ProtoFlux implementation has been designed to be independent of FrooxEngine.[Citation needed]


In summary it stays close to the underlying C# standards. C# differentiates types based on where the value is stored:

Category (ProtoFlux) Category (C#) Description
Value Type Value Type The value is stored directly within the variable/property.
Object Type Reference Type The value exists somewhere in memory. Variables/properties contain a reference to the memory location.

Also see: Enums, a subcategory of value types.

World Model

The world model of Resonite needs to be kept consistent for multiple users. Where a value is stored locally is far less important than how it is communicated across the network.

In effect this means that when dealing with components and their properties one has to differentiate among the following categories:

Category All Types Description
Values Value Types, strings, URIs, Nullable and IEncodable The value will be written into and read from a network message as-is.
References IWorldElement and all its derivatives (e.g. Slot) The referenced object can be uniquely identified by a RefID which will be sent via the network. The receiver will then do a lookup to determine their own instance of that object.
Types Type Types aren't just used in properties. They are also very important internally to inform other users of newly created components. Therefore they are preferrably encoded as a simple number to avoid wasting network traffic. If such a shorthand is not yet available the full type name will be transmitted instead.
As of 2024.4.3.1170 the shorthand is lazily and asynchronously generated by the host. There is one lookup-table per Session.
(Speculation: The requirement of session information may be the reason why this has a separate implementation to values.)
Delegates WorldDelegate Delegates reference a method of a specific object instance. The network message contains the RefID to identify the instance and the name/declaring type of the method.
Be aware that strings, URIs and Nullable are objects in ProtoFlux but values for the world model!

This is especially visible when working with Dynamic Variables.

Subcategories

This category has the following 2 subcategories, out of 2 total.

E

V

Pages in category "Type"

The following 200 pages are in this category, out of 224 total.

(previous page) (next page)
(previous page) (next page)