I started exploring how Metin2’s graphics system actually works and what it would take to make it cross-platform. One of the main issues is its reliance on DirectX, so the idea is to replace the entire rendering layer with bgfx.
bgfx allows you to target DirectX 11/12, Android, iOS (via OpenGL), and many other platforms, which makes it a strong candidate for a cross-platform approach.
To make everything run on all platforms, replacing Granny is also necessary. One possible solution—at least for now—is to load Granny data at runtime, convert/cache the values, and then use them with ozz or glTF.
Keep in mind a few observations: much of the math code is also tied to DirectX, so I recommend starting there and progressing step by step—begin with the login screen, UI windows, etc., then move to character selection and the minimap. The most challenging part is the main world; I haven’t fully managed to port it yet, although I did succeed with other components.
I also recommend using an older bgfx build that still supports DirectX 9 and proceeding gradually (the newest build no longer supports DX9). Alternatively, start with Vulkan, as it makes call stack debugging easier—debugging DirectX is more difficult.
I’m sharing my 32-bit shaderc compiler (built using the latest bgfx commit) along with the shaders I’ve already completed. Feel free to continue the work if you’d like.
Hope this helps.
Download
Alternative download links → Mega.nz 1 or Mega.nz 2