Replies: 3 comments 12 replies
-
|
I totally see the benefits of adding a scripting language to the editor. It would be a very cool addition. At the same time, I’ve been bitten by this in the past — back when the Untold Engine was still written in C++, I tried implementing a basic scripting system, and it turned out to be more work than I expected. Debugging in particular became a nightmare. That said, I’m definitely open to exploring your proposal. You mentioned writing a Swift interpreter, correct? I have a suggestion here: there’s a scripting language called Gravity (gravity-lang.org) that might work for us. It uses a syntax very similar to Swift, which would feel natural for Apple developers. I’ve actually used it before in the engine and is quite nice. Moreover, the developer is super friendly and helpful. If we go down that path, I could even reach out to him for guidance. This way, we don’t need to build our own interpreter from scratch, and we can move faster. I think our initial goal should be an editor + scripting support, and leave visionOS as a next feature. That way, we can test out scripting before introducing another variable. What do you think about this approach? |
Beta Was this translation helpful? Give feedback.
-
|
Adding a scripting system is a lot of work, but usually is worthy. I like to go ahead and plan for that, instead of taking the short path. Anyway, I heard about gravity, never tried it before, but I will review it. Still, what is the path? Do we go with gravity fully or my "path 2.5" implementing the gravity and the visual scripting tool (on top of gravity) ? Or do we go just by code? |
Beta Was this translation helpful? Give feedback.
-
|
I’ve been reflecting on the idea of integrating a scripting system, and I’d like to share some thoughts. While I strongly believe a scripting system can expand flexibility and enable runtime behavior changes, we also need to define clear use cases where it makes sense—and where it doesn’t. By nature, any scripting system will be slower than compiled code. So rather than trying to use it for everything, I suggest focusing on scenarios where the trade-offs (flexibility, iteration speed, extensibility) outweigh the performance costs. Two Types of Script Systems1. Visual Scripting (Proposed name: wait... wait... UntoldScript !!! 😅)
2. Text-Based Scripting
Summary of Proposal
Closing ThoughtsAfter studying Gravity-lang, I’m convinced it’s a good starting point. However, for visual scripting, I believe we should build our own system (UntoldScript) rather than layering it on top of Gravity. This way, we retain control and keep the system tailored to our needs. 👉 @untoldengine What do you think? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the new editor, we need a way to implement logic without having to recompile the editor each time we want to adjust behaviors. This becomes especially relevant for AI in NPCs, custom input bindings, or even state machines.
Right now, since everything is tied to Swift, every change requires a full compile in Xcode to test functionality. While that works for final builds, it slows down iteration during editor/game testing.
On macOS, we could theoretically load plugin code, but that’s not possible on VisionOS or other Apple platforms. Additionally, App Store restrictions forbid this approach. Swift REPL (the scripting version of Swift) is also macOS-only and not available to third-party apps.
Possible Paths
Path 1: macOS Editor + VisionOS Proxy
Pros:
Cons:
Path 2: Custom VM Scripting System
Pros:
Cons:
Path 2.5: Visual Scripting as a Bridge
💡 My personal preference: A custom Swift interpreter with visual scripting as an early milestone. This keeps everything consistent, avoids platform restrictions, and provides a smoother long-term path.
Note: The choices here, the path we choose in this area, also be an important step in implementing the plugin/component extension system because they are related.
👉 What do you think?
Beta Was this translation helpful? Give feedback.
All reactions