far like the future, bright like the soul

trans programmer & gamedev, occasional multimedia creator, amy rose kinnie

nd/adhd/(possibly) autism

<3 @fiffle & @milly

this

This


email
amywrightmail (at) protonmail (dot) com

cosmic engine, the c++ -> c# game engine source port i've been working on for about half a year now, has been powered by, and practically built around, the veldrid cross-platform graphics library. unfortunately i've just learned that as of two weeks ago, the maintainer has stated he can no longer publicly update the library (coinciding with him announcing a move to a new job 🤔)

so this places cosmic in a tough situation right now. seeing as i can no longer trust that the library will be publicly updated alongside .net tooling, i feel like i'm now forced to do a big rewrite of the engine one way or another...

i see three options:

  • just get rid of "biased" api-agnostic graphics support. the renderer will be opengl only and be much simpler code-wise, but won't be able to take advantage of the speed of running through directx on windows/metal on macos
  • try to find a similar cross-platform graphics solution for .net. veldrid was the only .net library that felt like it was explicitly designed to take advantage of the language and environment. other c/c++-based libraries (bgfx, sokol, et al) could suffice but i don't know how good existing bindings are
  • move the engine to another language. it would take a lot of time and effort, but i already did it once for this engine (that's what makes it a source port after all), and i wouldn't be afraid to do it again if it came to it. i've been tempted to learn rust, so this could be the gateway to that at least

You must log in to comment.

in reply to @amy's post:

Could you write bindings for a c library yourself? It's kind of a pain to get the build set up sometimes, but if I recall correctly C# has a fairly good way to introduce bindings.

c# does have good ffi, and i already have experience with writing bindings to a degree. the biggest issue with this scenario is that my intent with the codebase is to make it easy for contributors/anyone curious to just build the engine for win/mac/nix from one platform. modern .net already supports cross compiling c# out of the box like that. but keeping that convenience gets trickier once you have to touch native libraries, as then that means you need to set up and/or a maintain cross-compilation workflow for c, which immediately requires a lot of accomodations. the story for cross-compiling linux to windows and vice versa isn't too bad, it's the compiling for mac that has me concerned about how complex it would get. in case people make their own forks of the engine i wouldn't want to keep them from making a mac build on windows/linux. this is why i've been relying on precompiled native libraries (that come with the packages/bindings i use) in cosmic for so long, because i wanted to avoid that huge investment