Visual Scripting
An introduction to what we know of Hytale's visual scripting system as of writing this.
Visual Scripting
Hytale plans to support Visual Scripting as a method to make advanced logic and control flow accessible to a wider audience. This system will not be available at launch, but should be available shortly after launch.
Overview
Visual Scripting in Hytale is designed to function similarly to Blueprints in Unreal Engine. It allows designers to create complex behaviors through a visual interface that matches how they think about game logic, without needing to write code directly.
Key Features
- Subset of Java functionality: Visual Scripting can do a subset of what is possible with Java plugins
- Designer-friendly: "Designers are empowered through a visual language that matches how they think about behaviors"
- Programmer extensible: Programmers can extend and optimize the system by adding new visual nodes and performance-sensitive implementations
- Safe sharing environment: Provides a sandboxed, safe environment for sharing logic between modders
Advantages Over Traditional Coding
Visual Scripting makes writing custom logic more accessible by removing common hurdles found when developing in Java:
- No complex environment setup: No need to worry about installing the right tools or configuring development environments
- Syntax-free development: Removes the need to learn and remember programming syntax
- Safer sharing: Malware in visual scripting should be virtually impossible
- More inclusive: Lowers the barrier to entry for non-programmers
Relationship with Java
Visual Scripting and Java plugins are designed to work in tandem:
- Java extends Visual Scripting: Programmers can create new visual nodes using Java
- Performance optimization: While Visual Scripting may not be as optimized as Java directly, programmers can implement performance-critical logic in Java and expose it as visual nodes
- Best of both worlds: Allows the majority of logic to remain in the accessible Visual Scripting environment while keeping expensive operations optimized
Hytale strongly recommends Visual Scripting since it is both more accessible and safer to share and download. However, staying purely in Java will still work for those who prefer it.
3D Visual Scripting
One of Hytale's unique features is bringing visual scripting directly into the 3D world:
- In-world editing: Link levers, doors, spawners, triggers, and other elements directly inside the game
- Adventure map creation: Excellent for building adventure maps and encounters without leaving Hytale
- Similar to DOOM SnapMap: Provides a familiar workflow for those who have used similar systems
- Fully integrated: Works seamlessly with the asset and scripting stack
No Text-Based Scripting
Hytale has made a deliberate decision not to include text-based scripting languages. Their reasoning:
- False compromise: Text-based scripting is often introduced to "help non-programmers" but still requires learning programming concepts
- Complexity increase: Programmers end up juggling two languages where one is less powerful
- Still requires syntax: Designers still need to learn syntax and programming concepts
- Less inclusive: Doesn't truly solve the accessibility problem
- Fragmentation: Avoids "fragmenting logic across multiple 'half-languages'"
Instead, Hytale believes visual scripting is a better approach that truly makes game logic accessible to a wider audience while maintaining the power and flexibility needed