“We added support for several .NET types (including System.TimeSpan) and improved and fixed the support of many base types such as System.Double and System.Float. With these improvements come various compiler fixes related to structs. Note that this does not mean that structs are now fully supported.”
But maybe the structs are supported enough for monogame?
Sooo after some hours of testing, here’s my current result:
Tests on Dot42 itself:
Dot42 can reference normal and Dot42- Class Libraries
For me structs are working, I tried to several structs to compile, no errors, also created a struct “object” during runtime with Dot42 and also no errors here
I could create a Protobuild Target for Dot42 (just copy+paste of Android, to get an Android.Dot42 Project)
Current Errors / stuff prevent from compiling:
I need to add many project properties to the generated csproj in order to transform it to a Dot42-ClassLibrary:
Any tips on how to add them with Protobuild?
I couldn’t find anything for this.
******2. Namespace Chaos… (I think this example should be enough to explain, so that I don’t have to xD):
Xamarin: Android.OS.Build.Model
Dot42: Android.Os.Build.MODEL
Since I don’t want to copy all Android Files and change the namespaces inside the copies or to have million of #if ANDROID || ANDROID_DOT42 inside all Android-Specific Classes.
So I think a “good” workaround would be to go the same way as OpenTK does and have an own Namespace / Classes “Mockup”, and inside this file/files we could either use Xamarin Android Namespace or Dot42.
I hope my explanation is understandable , or do you have a better Idea?
******3. No OpenTK for Dot42, but if we go like in 2. explained, the main Android Classes wouldn’t need any OpenTK references, just the Mockup. Just looked at some classes and most of the OpenTK Classes are just a “link” to OpenGL and stuff?
Except an AndroidGameView which is from OpenTK, so this one should be created as a Dot42 Version.
******4. Some Classes using “Java.Lang.Object” as Base, in Dot42 there is no “Java.Lang.Object” exposed to .Net, I think the .Net Object will be transformed to a Java.Lang.Object while compiling with Dot42. This could be also handled by 2.
As soon as we have a solution for Number 1 and 2 , I’ll try more to create this port