### Describe the project you are working on Godot C# bindings ### Describe the problem or limitation you are having in your project For the past weeks, I've been discussing with several Unity users intending to move to Godot C# regarding dealing with the C# garbage collector. The most common complaint I hear from users is that, in Unity, allocations can trigger unexpected GC spikes into the game. In Godot, we target to make all of the high performance APIs (those that intended to be called every frame) not allocate any memory, so theoretically the GC should not be a problem. Additionally, Godot starting from 4.0, uses the Microsoft CoreCLR version of .net, which also supposedly has a better garbage collector than Unity. But in all, after several discussions with Unity users, neither is enough reassurance for them, and they would really feel safer if Godot exposed a zero allocation API. ### Describe the feature / enhancement and how it helps to overcome the problem or limitation The idea of this proposal is that Godot exposes zero allocation versions of many functions in the C# API, that users can use if they desire. Technically, this could be done from the binding generator itself, without breaking compatibility, and without doing any modification to Godot itself. ### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams **WARNING** I am not familiar with C#, so take this as pseudocode. Imagine you have two functions exposed as to C#: ```C# void MyClass.SetArray( Vector2[] array); Vector2[] MyClass.GetArray(); ``` This works and is pretty and intuitive. However, it has two problems: * GC is allocated on return * Memory is copied to Godot native formats every time there is a call. The idea is to add NoAlloc versions, which can be generated directly by the binder automatically when required: ```C# void MyClass.SetArrayNoAlloc( Godot.Collections.PackedVector2Array array); void MyCl
High-impact technical problem with clear demand but high technical barrier and potentially tricky monetization as a standalone product.
Strong problem and timing but challenging for standalone monetization and go-to-market due to technical complexity and expected integration.
Clear problem, but highly technical niche solution with low creator fit and difficult monetization for a solo builder.
Clear value but high assumption risk and difficult business model for a micro-SaaS due to its foundational nature.
One-liner
A high-impact technical solution for Godot C# developers struggling with GC spikes, but monetization and solo buildability are significant challenges.
The Pain
C# game developers using Godot face unexpected garbage collection spikes due to memory allocations in existing bindings and marshalling overhead, leading to noticeable frame drops and hindering performance-critical games.
The Gap
While Godot's CoreCLR aims for better GC, users lack reassurance and direct control over allocations. The existing C# bindings inherently cause allocations, and there's no systematic 'zero-allocation' API offered to directly address this critical performance bottleneck for C# users.
Build Angle
Generate zero-allocation versions of Godot C# API functions via the binding generator, allowing developers to explicitly choose performance-optimized calls (e.g., MyClass.GetArrayNoAlloc(PackedVector2Array array)).
Reasoning
The idea scores well on pain and gap, indicating a real need. However, the buildability for a solo founder is high, and the business model is highly uncertain due to the nature of the problem (a core engine enhancement) and the risk of official implementation. It's a fantastic idea, but a solo builder should validate the monetization and distribution angle thoroughly, or consider contributing it open-source to the engine, before committing significant development time.
Risks
Pricing Landscape
The pricing landscape for solutions addressing zero-allocation in C# game development is largely characterized by free, open-source initiatives and foundational engine features. Game engines like Unity and Godot provide built-in mechanisms and best practices for memory optimization. Third-party tools or libraries often offer specific zero-allocation functionalities, with some being free (e.g., PrimeTween for Unity) and others potentially integrated into broader commercial asset store packages or developer tools. Dedicated enterprise pricing for this specific problem isn't explicitly prevalent, as the solutions are more often integrated into existing development workflows rather than standalone products.
Recent News
State of GDScript vs C# performance in Godot 4.0 - Archive
vertexaisearch.cloud.google.com - August 12 2022
Expose a zero allocation API to Godot C# bindings · Issue #7842 - GitHub
github.com - September 24 2023
Zero allocation code in C# and Unity - Seba's Lab
vertexaisearch.cloud.google.com - December 15 2019
Godot 4.3 Performance: Part 2 - Compare C++, C#, Java, GDScript - YouTube
youtube.com - October 04 2024
Memory management of Godot (C++) objects in C# - Stack Overflow
stackoverflow.com - December 20 2024
Market Signals
The demand for zero-allocation APIs in game development, particularly within C# environments like Unity and Godot, is a growing niche. Developers are increasingly focused on minimizing garbage collection (GC) overhead to prevent performance spikes and ensure smooth gameplay, especially for performance-critical applications. Recent discussions and proposals within the Godot community highlight a strong desire for more control over memory management, indicating a maturing understanding of performance bottlenecks in C# game development. This focus on optimization suggests a market that values high-performance tooling and libraries.
Strong demand for a clear problem, with clear user segments and future relevance, but initial implementation needs to be tightly focused.
Strengths
Next Steps
User Frustrations