-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot Engine API for Dart and Flutter using "dart:ffi" #58
Comments
Please update your post filling out the template properly or it will be closed in accordance with Rule 1. Rules can be found on the README on the main page of the repo https://github.com/godotengine/godot-proposals |
I've update the original post, sorry I didn't read carefully the guidelines. |
This was already proposed, and I still don't see any reason to implement that. The only argument I can find here is that it may bring some Flutter users to Godot, but we don't really care that much.
Godot is already a multiplatform solution.
That quite a vague use case... I don't see why your creativity would be limited with Godot, and Godot is already capable of 3D rendering. |
Hi, I read through your edit. First off, I get the impression that you've not tried Godot before. I want to point out that Godot is a maturing game engine all on its own (with facilities for game logic, rendering, UI, exporting to multiple platforms from a single codebase, etc.), and if you were to use Godot by itself, there's a good chance you could achieve nearly the same results without the needed complexity of having to manage Flutter + Dart + Flare + Godot + any other libraries or workarounds you'd need for your task. Second off, what you are asking for is for bindings to be created so that Godot can use Flutter/Dart, and Flutter/Dart can use Godot. Unfortunately, bindings are not something that will usually be added to core (exceptions may apply, but I haven't seen any yet). There just isn't the demand for Flutter/Dart to be usable within Godot by default... so we don't really have any motivaton to create bindings for them, unfortunately. That said, if you still want to use Godot as a 3D renderer for Flutter/Dart (as you seem to have said you want to), then by all means go ahead, as we don't want to stop you. We want to see cool games made! You will need to create bindings though, so that you can control Godot's VisualServer or scene tree from Dart. If you need help creating bindings (or anything else Godot-related), then please don't be afraid to ask on one of the community channels. With all that said, this isn't a bad idea, having Godot be usable within Flutter/Dart and vice versa. But it's not something that I think we could do for you, as we just don't see the demand for it. |
that's an honest answer, I respect that |
Interesting, but why use Flare when you're already using Godot? |
flare is 2D there are no 3D engines for Dart that I'm aware of |
@iapicca I think you misunderstood girng's question. Why are you using Dart, Flare, and Flutter when Godot already provides its own facilities for game logic, rendering, and UI components? Why use Dart, Flare, and Flutter when Godot more than likely can replace all three of those on its own? |
Would GDNative/NativeScript bindings for Dart be possible, or desirable? |
Imo: This is very much a "maybe in a few years if" case. (My estimate is about 5 or 6) I don't want to speak for OP but I assume this is mostly for future compatibility with Google's Fuchsia project (A possible future replacement for android). Fuchsia only accepts flutter executables, ergo all applications must use it. Opinions follow: |
@LikeLakers2 Flutter gives an extremely good experience Imho the possibility to use Godot 's 3D engine in Flutter |
I think the you are going the wrong way in this, honestly. You are saying "I'm using Flutter/Dart and want to bring in Godot 3D rendering". That is a task for Flutter, not for Godot. You can already do apps for Android, iOS, and desktop with Godot itself, bringing in Flutter is not a benefit in this regard. For a proposal here, you should say "Bringing Flutter will make Godot better because it'll enable me to do X in my project, which wouldn't be possible without it". If you don't phrase it that way, it'll be hard for other people to see any benefit in this proposal. |
it is possible, but I believe in open source |
While using Flutter doesn't make sense to me for the same reasons already exposed, I would love using Dart as a scripting language. Simply because I use Dart on a day to day basis, and it is always simpler when you can keep your environment and tools (just like C# support). |
Well, it's not feasible for Godot to support every possible programming language out there. We support a few officially (GDScript, C#, C/C++) and provide an interface for the community to add support for other languages (Rust, Nim, and Python are some examples available). If there's something missing in the interface that don't allow Dart to be done, we will highly consider adding that, but official support won't happen. |
i started working on it : |
As propsed to Dart
Dart 2.5 is introducing "Foreign Function Interface" (dart:ffi) that allows Dart-C interop.
Quoting the article in the link above:
"Dart enters the IEEE Spectrum programming language ratings as 16. It’s also 10 under trending, and 6 when filtering to languages for mobile (behind Java, C, C++, C#, and Swift).";
Flutter allows to build, with a single code base, mobile app for Android and iOS, PWA and soon desktop app for Windows, Linux and OSX.
Such an API would undoubtedly widen Godot adoption.
[edit] filling in template:
Describe the project you are working on:
I'm a Flutter developer and I'm working on a 2D game using flare
taking this as example
Describe how this feature / enhancement will help your project:
this feature would allow my creativity to express to a whole new level enabling the possibility of 3d rendering
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
it a technical proposal that doesn't impact a single feature, but the whole game complexity,
on the technical side what I picture is:
Flutter App => plugin (Godot Engine + Dart:ffi interface) => Flutter Widget Tree => Godot rendering inside a widget
Describe implementation detail for your proposal (in code), if possible:
please see the original post above
If this enhancement will not be used often, can it be worked around with a few lines of script?:
no, when available this enhancement will be used often and isn't possible for my knowledge to shrink it in few lines
Is there a reason why this should be core and not an add-on in the asset library?:
yes, it's a fully fledged feature, not an add-on
The text was updated successfully, but these errors were encountered: