04-09-2022, 03:31 AM
(This post was last modified: 04-09-2022, 03:33 AM by vonhoff.
Edit Reason: Typos
)
It is not required to include the binding as a project dependency. However, it seemed inefficient to me to make a copy of the binding for each available sample project. So I decided to put the binding in its own project to avoid duplicate files. Moreover, there is no significant difference when it comes to performance. Class libraries are mainly used for separation and reuse of code and do not negatively affect performance in C#.
Before I discovered Tilengine to draw retro-style graphics, I experimented with the C# binding of SDL2. This library was written as a pure port of the C headers, I found it easy to implement existing method calls without first translating them into a separate model. However, when I switched to the C# binding of Tilengine, I missed this particular way of coding, since CsTilengine is class-based and not a pure port of the C headers. So I decided to make an alternative version of it, with a design strongly inspired by the design of the C# binding of SDL2.
Before I discovered Tilengine to draw retro-style graphics, I experimented with the C# binding of SDL2. This library was written as a pure port of the C headers, I found it easy to implement existing method calls without first translating them into a separate model. However, when I switched to the C# binding of Tilengine, I missed this particular way of coding, since CsTilengine is class-based and not a pure port of the C headers. So I decided to make an alternative version of it, with a design strongly inspired by the design of the C# binding of SDL2.