-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Native c++ and C# #89
Comments
I can safely say there's no chance Zylann will rewrite the module in C#. However your C# code can call the module. C# has been measured at 2 - 7.5 times slower than C++. Converting the module to a plugin remains a possibility in the future, but it's low priority. Rebuilding the engine with the module compiled is really no big deal for one who is becoming a game developer. However it is no longer a requirement: |
I am considering "librarizing" the module in the far future so that it can have a GDNative implementation (or use in other engines), but currently GDNative symbols don't get represented in C# (i.e you have to use reflection to call it). A P/Invoke-ready build could work too for a library but all this is pretty much far in the future. I'm not considering porting to C# at all because it would just make it slower and too much work for my free time. You are free to do it, though. Having it as a module right now is a good compromise, as all languages and platforms can use it without hassle apart from engine compilation, which is not a big deal anyways since @tinmanjuggernaut gracefully provides such builds now. |
I know C# code in Godot will sit somewhere between C++ and GDScript in terms of speed, but I was curious if that would be "enough" to make a good implementation. |
To write your game in C# and call this module will be quite performant. To rewrite the module as C# is not worth your time. It will be 2-7.5x slower and it's already not as fast as we'd like, though decent. There are gdscript implementations of blocky voxels around. But smooth voxels are quite taxing. |
If you will convert the module to a plugin - support for some platforms (like HTML5) will be lost Both GDNative and C# are not supported for HTML5 export. BTW godot_voxel may work fine in HTML5 with threads disabled (or If you want fast prototyping with C++ modules without recompiling - please try |
Superseded by #333 |
Now that there's first class c++ and C# scripts in Godot is there any chance of being able to implement this plugin with that so that the compiling from source step isn't needed?
Would C# scripts be as fast as the current approach?
The text was updated successfully, but these errors were encountered: