Skip to content
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

Add/Investigate support for C# #14

Open
ceceppa opened this issue Sep 17, 2021 · 6 comments
Open

Add/Investigate support for C# #14

ceceppa opened this issue Sep 17, 2021 · 6 comments

Comments

@ceceppa
Copy link
Owner

ceceppa commented Sep 17, 2021

No description provided.

@zaksnet
Copy link

zaksnet commented Jan 7, 2022

Looking at the structure of your project and the complexity of it i'm pretty sure C# would be a better fit for it! I will see if i can help you port it to c# in the following days!

@ceceppa
Copy link
Owner Author

ceceppa commented Jan 7, 2022

That's sounds great to me.
Although I would wait for the syntax and the main feature to be stable first.
Also, a full rewrite could be a very big job, so I was more thinking of writing a wrapper around Anima and AnimaNode first. This would allow C# users to use the wrapper and have the autocomplete.
Then pass to convert both to C# and at very last convert AnimaTween (as is the one that would take more time)

@Terria-K
Copy link
Contributor

Terria-K commented Jan 7, 2022

I had a Anima wrapper for C#, but it will not likely increase a performance since all of functions are only called from GDScript. The reason why I didn't fully convert it to C# is because of having a dynamically function that returns 2 possible values which isn't possible on C# (I'm not talking about Tuples). It would be better if someone actually fully convert Anima C#, but if anyone wants a wrapper just for temporary use, then I'll submit a pull request.

@CodeDoctorDE
Copy link

CodeDoctorDE commented Feb 13, 2022

I had a Anima wrapper for C#, but it will not likely increase a performance since all of functions are only called from GDScript. The reason why I didn't fully convert it to C# is because of having a dynamically function that returns 2 possible values which isn't possible on C# (I'm not talking about Tuples). It would be better if someone actually fully convert Anima C#, but if anyone wants a wrapper just for temporary use, then I'll submit a pull request.

If we need a fully converted Anima C#, both projects needs to be maintained. In c# there is something called out that has a similar function https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier

@Terria-K
Copy link
Contributor

If we need a fully converted Anima C#, both projects needs to be maintained. In c# there is something called out that has a similar function https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier

Yeah, that's a problem, we need to maintained both projects, and if GDScript version has some changes, it would need a C# changes aswell. If it's just a wrapper, it don't need to have much changes as its just calling from GDScript API. Since Visual Editor will be coming out soon, its such a pain to convert it to C# because there is a scenes now with export variables that would be hard to convert in C#.

@ceceppa
Copy link
Owner Author

ceceppa commented Mar 17, 2022

Yep, maintaining a C# version could be a bit too much.
I made some performance improvements that halved Anima's time to animate a property. So it should be fast enough to don't cause any performance issues.

Considering that, I would say that in the short time, a wrapper is preferable, and, in the long run, see if there is any part worth converting to improve performances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants