{"author_link":"\/users\/z0rg","author_name":"z0rg","author_uid":"z0rg","comments":[],"epoch":1683015702,"event":"LD53","format":"md","ldjam_node_id":368386,"likes":5,"metadata":{"p_key":"200327","p_author":"z0rg","p_authorkey":"1270626","p_urlkey":"432992","p_title":"Godot4.0 x C# x HTML5","p_cat":"LDJam ","p_event":"LD53","p_time":"1683015702","p_likes":"5","p_comments":"0","p_status":"WAYBACK","us_key":"1270626","us_name":"z0rg","us_username":"z0rg","event_start":"1682726400","event_key":"118","event_name":"Ludum Dare 53"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD53","removed_author":false},"_superparent":332127,"_trust":1,"author":270626,"body":"TLDR \n[GithubProject](https:\/\/github.com\/seb776\/CSToGDScript)\nIs a project to convert your Godot4 C# project to Godot4 gdscript.\n\n![CodeConversion.png](\/\/\/raw\/221\/24\/z\/5a7c2.png)\n\n** DISCLAIMER **\nThis was done entirely during the game jam so it might not work for you if you try it, but feel free to open issues or PR I'd gladly make this a viable solution if users need it.\n\n** The story **\nWe did originally chose to try godot for the first time so we started with Godot4.0.2 We wanted to build as a web game as we know more users would try our game and it avoided us to compile the game for every platform.\n\nIn the middle of the jam we decided to build to check everything was alright, and POM POM POM\u2026 We discovered that using C# for Web with Godot4.0 is not yet available, at this moment we were really disappointed and then came the idea of rewritting the code we had to GDScript (we did not have much code to convert, like 470lines of C# at the moment).\n\nThe other idea that came was, why not looking if there exist a tool to automate that ? We did note found anything usable, then we thought, well, why not write it ourselves ? That\u2019s how we decided to create a transpiler to transform C# to GDScript. Hopefully both languages are really close semantically, also their typing system works almost the same. The thing works and is opensourced so give it a shot and do PR and post issues !\n\nOur game is currently built with the following process : Godot4.0 C# \u2192 CSToGDScript \u2192 Godot4.0 GDScript \u2192 Web \ud83d\ude00\n\n[GithubProject](https:\/\/github.com\/seb776\/CSToGDScript)\n","comments":2,"comments-timestamp":"2023-05-02T09:21:51Z","created":"2023-05-02T08:13:09Z","files":[],"files-timestamp":0,"id":368386,"love":5,"love-timestamp":"2023-05-02T09:25:28Z","meta":[],"modified":"2023-05-18T08:30:18Z","name":"Godot4.0 x C# x HTML5","node-timestamp":"2023-05-18T08:30:18Z","parent":358060,"parents":[1,5,9,332127,358060],"path":"\/events\/ludum-dare\/53\/galactic-delivery-starvesters2d\/godot4-0-x-c-x-html5","published":"2023-05-02T08:21:42Z","scope":"public","slug":"godot4-0-x-c-x-html5","subsubtype":"","subtype":"","type":"post","version":1146933},"node_metadata":{"n_key":"368386","n_urlkey":"432992","n_parent":"358060","n_path":"\/events\/ludum-dare\/53\/galactic-delivery-starvesters2d\/godot4-0-x-c-x-html5","n_slug":"godot4-0-x-c-x-html5","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"270626","n_created":"1683015189","n_modified":"1684398618","n_version":"1146933","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/53\/galactic-delivery-starvesters2d\/godot4-0-x-c-x-html5","text":"TLDR \n[GithubProject](https:\/\/github.com\/seb776\/CSToGDScript)\nIs a project to convert your Godot4 C# project to Godot4 gdscript.\n\n![CodeConversion.png](\/\/\/raw\/221\/24\/z\/5a7c2.png)\n\n** DISCLAIMER **\nThis was done entirely during the game jam so it might not work for you if you try it, but feel free to open issues or PR I'd gladly make this a viable solution if users need it.\n\n** The story **\nWe did originally chose to try godot for the first time so we started with Godot4.0.2 We wanted to build as a web game as we know more users would try our game and it avoided us to compile the game for every platform.\n\nIn the middle of the jam we decided to build to check everything was alright, and POM POM POM\u2026 We discovered that using C# for Web with Godot4.0 is not yet available, at this moment we were really disappointed and then came the idea of rewritting the code we had to GDScript (we did not have much code to convert, like 470lines of C# at the moment).\n\nThe other idea that came was, why not looking if there exist a tool to automate that ? We did note found anything usable, then we thought, well, why not write it ourselves ? That\u2019s how we decided to create a transpiler to transform C# to GDScript. Hopefully both languages are really close semantically, also their typing system works almost the same. The thing works and is opensourced so give it a shot and do PR and post issues !\n\nOur game is currently built with the following process : Godot4.0 C# \u2192 CSToGDScript \u2192 Godot4.0 GDScript \u2192 Web \ud83d\ude00\n\n[GithubProject](https:\/\/github.com\/seb776\/CSToGDScript)\n","title":"Godot4.0 x C# x HTML5","wayback_source":[]}