Charizmare (talk | contribs) m Corrected a grammatical mistake. |
m comment second list item about compatibility |
||
(12 intermediate revisions by 9 users not shown) | |||
Line 45: | Line 45: | ||
<!--T:8--> | <!--T:8--> | ||
Solutions for this area: | Solutions for this area: | ||
* Use the [[:Category:ProtoFlux:UserRoot|User Root Nodes]] to locate a user's slot. | * Use the [[:Category:ProtoFlux:Users:UserRoot|User Root Nodes]] to locate a user's slot. | ||
* Use the [[:Category:ProtoFlux:Users|User Nodes]]. | * Use the [[:Category:ProtoFlux:Users|User Nodes]]. | ||
Line 75: | Line 75: | ||
* Assuming the setup of the world is standard in terms of hierarchy for things like spawn or lights etc. | * Assuming the setup of the world is standard in terms of hierarchy for things like spawn or lights etc. | ||
* Custom Culling systems or locomotion modules | * Custom Culling systems or locomotion modules | ||
* Avoid Calling Dynamic Impulses to the Root Slot | * Avoid Calling [[Dynamic Impulses]] to the Root Slot | ||
* Avoid placing Dynamic Variables in the Root Slot or World Variable Space | * Avoid placing [[Dynamic Variables]] in the Root Slot or World Variable Space | ||
* Avoid leaving items in the world when you leave. Clean up after yourself. | * Avoid leaving items in the world when you leave. Clean up after yourself. | ||
** Temporary items from Guns/Rockets & Particles should clean up after themselves. Consider marking them as non-persistent or setting them to delete themselves when you leave. | ** Temporary items from Guns/Rockets & Particles should clean up after themselves. Consider marking them as non-persistent or setting them to delete themselves when you leave. | ||
Line 96: | Line 96: | ||
<!--T:53--> | <!--T:53--> | ||
Instead: | Instead: | ||
* For Avatars: utilize Avatar protection systems such | * For Avatars: utilize Avatar protection systems such as [[Component:SimpleAvatarProtection|Simple Avatar Protection]] | ||
* Avoid setting users as Builder in a world you want protected | * Avoid setting users as Builder in a world you want protected | ||
* Avoid spawning items in sessions with users you do not know or trust | * Avoid spawning items in sessions with users you do not know or trust | ||
Line 102: | Line 102: | ||
<!--T:54--> | <!--T:54--> | ||
We also have several items on our roadmap to aid in this area, we'd encourage you to follow their progress and to vote on them: | We also have several items on our roadmap to aid in this area, we'd encourage you to follow their progress and to vote on them: | ||
* Hard Permissions - Protects assets, items and ProtoFlux within a World. | * Hard Permissions ([https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1103 #1103]) - Protects assets, items and ProtoFlux within a World. | ||
* Object ID / Licenses - Protects assets, avatars, items, worlds etc. from being saved. | * Object ID / Licenses ([https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/626 #626]) - Protects assets, avatars, items, worlds etc. from being saved. | ||
= Avatars = <!--T:55--> | = Avatars = <!--T:55--> | ||
Line 110: | Line 110: | ||
== Disabling Raycasts on your Avatar == <!--T:56--> | == Disabling Raycasts on your Avatar == <!--T:56--> | ||
We | We have a lot of tools, gadgets and items which may affect your avatar. Things like Knockback guns, explosions, guns, tools that mess with your scale etc. are quite common. A solution to this which is common is for users to disable the ability for their avatar to respond to ray casts. While this works in principle it can cause game experiences and standard components or systems to not function. This can reduce your quality of experience across Resonite. It is also actually hiding a larger problem and this is culture and guidelines related. | ||
<!--T:57--> | <!--T:57--> | ||
Line 124: | Line 124: | ||
== Reference IDs / "Ref Hacking" == <!--T:18--> | == Reference IDs / "Ref Hacking" == <!--T:18--> | ||
When building, it may be desirable to use | When building, it may be desirable to use [[Type:RefID|Reference IDs]] to get around certain restrictions or feature gaps that exist. This is often called [[Ref_Hacking|Reference hacking (Ref Hacking)]]. When doing this, keep the following in mind: | ||
* Reference IDs may change at any time. | * Reference IDs may change at any time. | ||
* Your use of them may break at any time. | * Your use of them may break at any time. | ||
Line 135: | Line 135: | ||
<!--T:19--> | <!--T:19--> | ||
Generally, you should use dedicated nodes and concepts instead such as: | Generally, you should use dedicated nodes and concepts instead such as: | ||
* The Allocating User Node | * The [[ProtoFlux:Allocating User|Allocating User]] Node | ||
* Typed References and Casts | * [[Reference_Type|Typed References]] and [[:Category:ProtoFlux:Core:Casts|Casts]] | ||
<!--T:20--> | <!--T:20--> | ||
Line 160: | Line 160: | ||
<!--T:23--> | <!--T:23--> | ||
Instead: | Instead: | ||
* For Users, use [[:Category:ProtoFlux:UserRoot|User Root Nodes]] | * For Users, use [[:Category:ProtoFlux:Users:UserRoot|User Root Nodes]] | ||
* For Slots, use [[:Category:ProtoFlux:Slots|Slots]]. | * For Slots, use [[:Category:ProtoFlux:Slots|Slots]]. | ||
* For Types, use the Type nodes. | * For Types, use the Type nodes. | ||
Line 199: | Line 199: | ||
<!--T:31--> | <!--T:31--> | ||
Instead: | Instead: | ||
*Use the dedicated node for this purpose, [[ | *Use the dedicated node for this purpose, [[ProtoFlux:RawDataTool_Events|RawDataTool Events]]. This is more efficient and impulses can be fired when various different things happen when a [[RawDataTool (Component)|Raw Data Tool]] is equipped. | ||
<!--T:32--> | <!--T:32--> | ||
Line 205: | Line 205: | ||
== Combining multiple nodes into the same slot == <!--T:58--> | == Combining multiple nodes into the same slot == <!--T:58--> | ||
'''We do not recommend doing this for any reason.''' | |||
When looking to optimize ProtoFlux, you might be worried about how many slots a set of ProtoFlux takes up and look to improve this by collapsing the nodes down into one slot. This usually needs a [[Plugins|plugin]] and is referred to as "Mono-Packing". | When looking to optimize ProtoFlux, you might be worried about how many slots a set of ProtoFlux takes up and look to improve this by collapsing the nodes down into one slot. This usually needs a [[Plugins|plugin]] and is referred to as "Mono-Packing". | ||
Line 242: | Line 245: | ||
<!--T:39--> | <!--T:39--> | ||
* This does not affect meshes with multiple material slots. For example Avatars. It just refers to using the same material slot used multiple times. | * This does not affect meshes with multiple material slots. For example Avatars. It just refers to using the same material slot used multiple times. | ||
According to [[Geenz]] during multiple office hours, [[Sauce]] release will probably break Material stacking. Alternative have also been disused to be implemented to Sauce (sometime ''after'' its initial release, as initial release will be parity of supported feature only), like Material Layering<ref>https://drive.google.com/file/d/1uCbzXDT_PXv_PgByuBAFcvVX1tTtSF53/view</ref> | |||
== Switching DB URLs for Shaders == <!--T:61--> | == Switching DB URLs for Shaders == <!--T:61--> | ||
Line 248: | Line 253: | ||
= Assets = <!--T:44--> | = Assets = <!--T:44--> | ||
== Using .7zbson/json/bson == | == Using .7zbson/json/bson == | ||
Items, avatars, gadgets and even worlds are sometimes stored in a variety of files that are usually some form of JSON, Binary JSON or Compressed variants of them. There are a few methods available which allow you to gain access to these files in these forms and these files can then be used to import, edit, save, backup, etc. Items and Assets. | Items, avatars, gadgets and even worlds are sometimes stored in a variety of files that are usually some form of JSON, Binary JSON or Compressed variants of them. There are a few methods available which allow you to gain access to these files in these forms and these files can then be used to import, edit, save, backup, etc. Items and Assets. | ||
Line 253: | Line 259: | ||
While this may seem handy and desirable to use, it unfortunately '''may break at any time''' for a number of reasons: | While this may seem handy and desirable to use, it unfortunately '''may break at any time''' for a number of reasons: | ||
* Our format or structure for these assets may change. | * Our format or structure for these assets may change. | ||
* We may introduce/remove components within these files causing incompatibility. | <!-- * We may introduce/remove components within these files causing incompatibility.<sup>[Still true?]</sup> --> | ||
* These files often refer or cross-link to other files which may be removed or changed further increasing the chance of incompatibility. | * These files often refer or cross-link to other files which may be removed or changed further increasing the chance of incompatibility. | ||
Line 261: | Line 267: | ||
<!--T:62--> | <!--T:62--> | ||
If you have one of these files and it is not able to be imported in a newer version of Resonite, older versions will continue to work, so try using a version of Resonite released before the date the file was modified. | If you have one of these files and it is not able to be imported in a newer version of Resonite, older versions will continue to work, so try using a version of Resonite released before the date the file was modified. | ||
When wanting to share content made on Resonite, use the [[ResonitePackage]] format which is made for this use, and avoids some of the issues mentioned. | |||
== Using Keyboard Components/Nodes to spawn items == <!--T:49--> | == Using Keyboard Components/Nodes to spawn items == <!--T:49--> | ||
Line 274: | Line 282: | ||
<!--T:48--> | <!--T:48--> | ||
Emojis and a few RTF Formatting tags(such as changing the color) are ok though. Just do not overuse them. | Emojis and a few RTF Formatting tags(such as changing the color) are ok though. Just do not overuse them. | ||
== Sources == | |||
<references /> |
Latest revision as of 11:30, 5 November 2024
Summary
Resonite is a fantastic engine with a whole lot of power, options and capabilities. Some methods or practices can however be problematic or may lead to breakages at a later date. This is a general list of things to avoid or not do and the reasons behind them and some solutions or work arounds to assist you. Feel free to continue using these features.
Items on this page are NOT against the Guidelines.
Though wherever possible, it is recommended to avoid using these items.
This list is also not meant to call out anyone or have any bad intentions but is worth a read to understand where you might be able to improve your creations and to ensure that updates or other users do not unintentionally end up breaking things.
If something feels hacky or undesirable please ask the community or the team if its a good idea or not. If there are problems or gaps that you'd like to see resolved please open an issue on our Github.
Working around unsupported or not yet implemented features
Certain features that are yet to be implemented officially can be "hacked in" or achieved through modifying certain internal systems and properties. While we're ok with experimenting and toying around, please be aware that those approaches will very likely break, without guaranteed prior warning and official implementation in place.
This can leave you with broken content without ability to fix it until a much later point in the future, so we recommend avoiding such approaches in the first place and instead finding different method using already supported features.
You can find list of planned features on our official GitHub: https://github.com/Yellow-Dog-Man/Resonite-Issues and vote on them so we prioritize them sooner. For any official features we always put great care into ensuring long term content compatibility over faster implementation, to ensure that future updates will keep your content functional.
If we close a certain issue as something that we don't plan on implementing, we strongly advise against using hacks and workarounds to achieve that result completely, as those will be brittle and will break without replacement coming at all. In such cases you'll have to find a different approach that works with the design of the system to ensure long term compatibility.
Slots
Avoid relying on Slot names or structure for items and slots that you don’t own or control within your ProtoFlux or components. The names of slots and their structure for items you don’t own or control may change at any time and this can break things you’ve made.
Here are some examples of where this may occur and some alternatives or suggestions to attempt to mitigate the issues
Names or structure of a user Root
Items may be added or removed from the User Root with the addition of new features or updates to features. So try not to rely on this structure or naming conventions that these slots have. Additionally, do not rely on the ordering of these slots as they may change at any time.
Recently for example new Slots were added to a User root to cover the new "Freeform Camera".
Things to avoid in this area:
- Find Child By Name
- Repeated use of Get Parent / Get Child nodes to locate a slot using searching or understood hierarchy depths
Solutions for this area:
- Use the User Root Nodes to locate a user's slot.
- Use the User Nodes.
Names or structure of an Avatar
Avatars are very complex creations.
Avoid:
- Find Child By Name to locate avatar parts
- Repeated use of Get Parent / Get Child nodes to locate avatar parts
- Assuming the structure of an avatar
- For example, head and hands avatars don't have an "Avatar Root"
Solutions in this area:
- Use the Avatar Nodes.
If you’d like to routinely find or acquire a slot in the User Root, consider requesting a new node or feature for it on our Github if it doesn't exist.
Names or structures of other people’s worlds
When visiting other user’s worlds it is very important to remember that you are a guest in their space. When creating gadgets, tools and avatars you should try to be respectful of their world.
Things to avoid:
- Placing items in the root from Guns/Rockets and other items.
- Assuming the setup of the world is standard in terms of hierarchy for things like spawn or lights etc.
- Custom Culling systems or locomotion modules
- Avoid Calling Dynamic Impulses to the Root Slot
- Avoid placing Dynamic Variables in the Root Slot or World Variable Space
- Avoid leaving items in the world when you leave. Clean up after yourself.
- Temporary items from Guns/Rockets & Particles should clean up after themselves. Consider marking them as non-persistent or setting them to delete themselves when you leave.
Solutions:
- When using the Set Parent node with a Root Slot Parent, Instead Supply a “Local User Space” node this will function identically in most cases but will keep items parented correctly to any world management systems rather than littering the root.
- Ask the world owner before spawning complex gadgets or modifying the world root.
Slot obfuscation / "Encryption"
Once you've made something you may want to protect it. When doing this don't:
- Rename Slots, Nodes etc.
- Move, scale, rotate slots
- Apply ProtoFlux to your creation which does any of the above.
While, this may seem like a way to protect your creation it doesn't do much for a knowledgeable user who has Builder permissions. Regardless of your methodology any in-app obfuscation is relatively easy to break in this manner.
Instead:
- For Avatars: utilize Avatar protection systems such as Simple Avatar Protection
- Avoid setting users as Builder in a world you want protected
- Avoid spawning items in sessions with users you do not know or trust
We also have several items on our roadmap to aid in this area, we'd encourage you to follow their progress and to vote on them:
Avatars
Disabling key Avatar Components
Avatars are very complex things, please don't disable any of the key components that avatars need to function. If you find yourself doing this too often please open a GitHub issue or ask a question on our discord about the behaviour you are trying to achieve.
Disabling Raycasts on your Avatar
We have a lot of tools, gadgets and items which may affect your avatar. Things like Knockback guns, explosions, guns, tools that mess with your scale etc. are quite common. A solution to this which is common is for users to disable the ability for their avatar to respond to ray casts. While this works in principle it can cause game experiences and standard components or systems to not function. This can reduce your quality of experience across Resonite. It is also actually hiding a larger problem and this is culture and guidelines related.
Editing, messing with, and affecting you or your avatar in a session without your consent is against the Guidelines. Users doing this might not be aware that what they are doing is wrong so please take the time to inform them about the importance of consent and our Guidelines. Should the behavior continue please utilize session moderation or if it repeated or particularly malicious please make a Moderation ticket.
Components
Forcing auto-disabled Components to be enabled
Occasionally when using a component you may find that it disables itself. This usually means that something in the component setup or the slot that it was added to is problematic and would cause the component to fail to function.
- Do not drive the enabled checkbox/field to true in these cases
- Consider reporting a bug on our Github. These situations may be a problem that can be resolved.
- Sometimes, these are actual miss-use of a component and may not be fixed.
- Properties within components that start with _ may be changed or removed at anytime and should be avoided where possible.
Reference IDs / "Ref Hacking"
When building, it may be desirable to use Reference IDs to get around certain restrictions or feature gaps that exist. This is often called Reference hacking (Ref Hacking). When doing this, keep the following in mind:
- Reference IDs may change at any time.
- Your use of them may break at any time.
- Certain uses of References may be considered a security issue.
- If you notice something concerning please follow our Security Policy.
- Some uses of References may allow for behavior that is against our Guidelines such as using references/ref hacking for harassment.
- If you have a concern, or notice a user breaking the Guidelines with or without Ref Hacking please submit a ticket.
- Ref hacking by itself is NOT against the Guidelines.
Generally, you should use dedicated nodes and concepts instead such as:
- The Allocating User Node
- Typed References and Casts
If you find yourself continually needing to use a certain reference ID or path consider making a feature request on our Github.
Depending on the order of Components
Components have an inherent order in which they appear in the inspector and are processed by Resonite. However, this order should be considered non-deterministic as they are internally stored in an unordered collection. There are ways to modify that order, but it is not guaranteed that existing objects will indefinitely preserve that order. Therefore, creations that depend on the order of components may break at any time.
An example of this is utilizing multiple button actions on the same button event that depend on being processed in a specific order.
Instead:
- Use ProtoFlux impulses. ProtoFlux is designed to be used for complex behaviors and program logic while components are generally intended for simple tasks. You can always depend on the order of operations in an impulse chain.
ProtoFlux
Using the ToString Node on complex data types
When using the ToString node on non-primitive data types(e.g. NOT float, int, double etc.), do not rely on the output of the node. It may change or be updated at any time. This includes things such as Data Types, Users, Slots, IFields, Sync, SyncRef etc.
Comparing strings for these items is brittle and may change with Updates.
Instead:
- For Users, use User Root Nodes
- For Slots, use Slots.
- For Types, use the Type nodes.
If you find yourself continually needing to do this, consider making a feature request on our Github.
Using Fire On True etc. when there are better alternatives
Several nodes in the Flow category can fire impulses when specific values change, e.g. Fire On True, Fire On False, Fire While True etc. These can be very powerful and are fine to use where they're the best solution for a specific use case. However, there are a few common situations where they may seem like a good option, but there are actually much better and more efficient alternatives.
In cases where e.g. Fire On True is appropriate, it is also advisable to provide a user value to the UpdatingUser input on these nodes rather than leaving it empty.
Buttons
Often users want to make something happen, for example changing a value or causing some ProtoFlux to trigger, when a button is pressed.
Avoid:
- Using the IsPressed bool field on the various button components and to providing that as the input to Fire On True in order to fire ProtoFlux impulses.
Instead:
- Use the dedicated node for this purpose, Button Events. This is more efficient and impulses can be fired when various different things happen with the given button (Pressed, Pressing, Released etc.).
- ProbablePrime has produced a short tutorial on how to use this node here.
- If you only want to perform a simple action based on a button press, such as changing a value, consider the components in the Common UI > Button Interactions category. These can often replace simple actions you might otherwise perform with ProtoFlux.
- ProbablePrime has tutorials for several of these components - ButtonValueCycle, ButtonValueShift, ButtonValueSet, ButtonToggle.
- It is reasonable to use the IsPressed bool for some effects which may be related to the button press state, such as driving the color of the button based on whether it is pressed or not.
Tools
Grabbable items can be made equippable by adding the Raw Data Tool component. This allows users to make custom tools, weapons, and gadgets which can be programmed to perform actions based on controller button presses much like the standard tools.
Avoid:
- Using e.g. the Primary or Secondary bool fields on the Raw Data Tool component with Fire On True in order to fire ProtoFlux impulses.
Instead:
- Use the dedicated node for this purpose, RawDataTool Events. This is more efficient and impulses can be fired when various different things happen when a Raw Data Tool is equipped.
- It is reasonable to use the Primary and Secondary bool fields for some effects which may be related to when a user presses a controller button, such as driving the color of the equipped item based on whether the user is pressing primary fire.
Combining multiple nodes into the same slot
We do not recommend doing this for any reason.
When looking to optimize ProtoFlux, you might be worried about how many slots a set of ProtoFlux takes up and look to improve this by collapsing the nodes down into one slot. This usually needs a plugin and is referred to as "Mono-Packing".
While this does cut down on the slot count of ProtoFlux, it makes the "mono-packed" ProtoFlux difficult to edit, read and understand. Additionally, it makes the ProtoFlux more difficult for Resonite to optimize for you in the future.
Instead:
- Wait for additional Optimizations and enhancements to ProtoFlux such as Nested Nodes
- Consider looking into other Optimization techniques and sources such as the Optimization Guidelines.
- Wait for a native equivalent which may allow for seamless unpacking/packing
- Remember that the slot count of an object does not necessarily dictate how performant it is. Performance comes from a variety of sources and Slot count is just one.
Inspectors
Relying on/using the text found in inspectors
Sometimes within inspectors, you might find some useful information, such as in the "Ref Editor" component's inspector. Including(but not limited to):
- Running string comparisons/filtering/searching on Inspector UI component properties
Relying on the text is fragile and may break. Inspectors are due for serious amounts of re-working due to a number of features such as collections, hard permissions, The UI Update, component access etc. These changes may change the text that is shown in the inspector windows. So relying on the text here to remain the same across these updates is not recommended.
Instead:
- Wait for features such as component access which will allow you to use these fields directly rather than via string matching.
Graphics
Material "Stacking"
When creating visual effects you can add multiple material slots to a Mesh Renderer to stack materials on-top of each other. This can have a great visual effect but it may break at a later date. Wherever possible, you should avoid doing this.
Instead:
- Create multiple Mesh Renderers in the same location each with a different material. This will lead to the same effect.
- Try experimenting with different material types available to you.
- Consider opening a feature request for the effect you're looking at.
- This does not affect meshes with multiple material slots. For example Avatars. It just refers to using the same material slot used multiple times.
According to Geenz during multiple office hours, Sauce release will probably break Material stacking. Alternative have also been disused to be implemented to Sauce (sometime after its initial release, as initial release will be parity of supported feature only), like Material Layering[1]
Switching DB URLs for Shaders
You may have noticed that you can swap URLs on StaticShader assets with URLs from other StaticShader assets with varying degrees of visual impact. This will break at a later date, particularly when custom shaders land with our upcoming graphics engine replacement. You should not rely on this for any sort of visual effect when producing your content.
Assets
Using .7zbson/json/bson
Items, avatars, gadgets and even worlds are sometimes stored in a variety of files that are usually some form of JSON, Binary JSON or Compressed variants of them. There are a few methods available which allow you to gain access to these files in these forms and these files can then be used to import, edit, save, backup, etc. Items and Assets.
While this may seem handy and desirable to use, it unfortunately may break at any time for a number of reasons:
- Our format or structure for these assets may change.
- These files often refer or cross-link to other files which may be removed or changed further increasing the chance of incompatibility.
It is therefore not recommended to use this approach. It is not a supported feature.
If you have one of these files and it is not able to be imported in a newer version of Resonite, older versions will continue to work, so try using a version of Resonite released before the date the file was modified.
When wanting to share content made on Resonite, use the ResonitePackage format which is made for this use, and avoids some of the issues mentioned.
Using Keyboard Components/Nodes to spawn items
By combining multiple Keyboard related components it is possible to trigger the spawning of an item from the cloud. This usually uses a URL which points to an Item or asset. While doing this can provide a good experience it is not something that is supported long term. This functionality may break or become non-functional at a later date.
This functionality is commonly known as "Cloud Spawning" right now but it isn't. Cloud Spawning is actually a feature that Resonite plans to support in the future.
Inventory
Long/Complex folder names
When creating folders within your inventory, you may be tempted to use very long folder names or names which contain ASCII Art. Doing this is not recommended as it may not display the same on all platforms and will cause navigational and technical issues in some areas. Additionally when inventory management/searching is added in the future it may cause issues with searching or indexing your inventory.
Emojis and a few RTF Formatting tags(such as changing the color) are ok though. Just do not overuse them.