Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Rhinoid |
Hey,
Wanted to play around with GoDot and see if this is a viable option to create some games in it. I read the get started docs and wanted to try the ‘dodge the creeps’ for .NET.
I downloaded the examples repo and in the mono folder there is a .NET version of the creeps.
However when just loading the project file and building I already get:
Package GodotSharp 4.0.0 is not compatible with net472 (.NETFramework,Version=v4.7.2). Package GodotSharp 4.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)
So after some googling I changed the csprj file to: <TargetFramework>net600</TargetFramework>
which makes the thing build.
However I now get a lot of other errors:
(CoreCompile target) ->
/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/HUD.cs(6,26): error GD0201: The name of the delegate must end with 'EventHandler': HUD.StartGame. Did you mean 'StartGameEventHandler'? [/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj]
/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Player.cs(6,26): error GD0201: The name of the delegate must end with 'EventHandler': Player.Hit. Did you mean 'HitEventHandler'? [/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj]
/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Mob.cs(3,28): error CS0246: The type or namespace name 'RigidDynamicBody2D' could not be found (are you missing a using directive or an assembly reference?) [/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj]
/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Mob.cs(5,26): error CS0115: 'Mob._Ready()': no suitable method found to override [/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj]
/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Player.cs(19,26): error CS0115: 'Player._Process(float)': no suitable method found to override [/Users/reinier/dev/godot/godot-demo-projects-master/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj]
which makes me wonder:
- Is .NET ready for primetime with godot or would I would this be a world of pain for newcomers (I do know .NET which is why I would prefer it over some custom language)
- Am I still doing something wrong, which makes everything magically work?
btw I am on a Mac. And I have .NET installed:
3.1.120 [/usr/local/share/dotnet/sdk]
6.0.300 [/usr/local/share/dotnet/sdk]
reinier (master)$ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]```
Looking for ward to be able to play with Godot. It really does look great.
Additional:
I finished the whole tutorial and this does work without problems.
I diffed my code with the repo and it has tons of differences. It looks like they are out of sync, so I was unclear what causes one to fail and the other to work.