3 ms·
We do use Unity that does lots of heavy lifting for you regarding porting to other platforms. However, it's not always that easy as checking a box. For example
by iliketrains 4y ago
We do use Unity that does lots of heavy lifting for you regarding porting to other platforms.
However, it's not always that easy as checking a box. For example some shader optimizations may be specific to DirectX. File system works differently (no "User/Documents" on Mac). Or issues with native libraries.
Our game does work on Linux Proton though, that was a surprise to us.
- duped 4y agoIt's pretty straightforward to have an abstraction for file systems with "special" file locations, it's been common in app sdks for at least a decade in a half. Unity doesn't have something like that? Eg you would never use /tmp or %USER%/AppData, but call a function File::getPath(TempDirectory) or something like that.
- kroltan 4y agoIt does, but I'm guessing it's just one simply understandable example. C# has the very Windows-centric https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=net-6.0 https://docs.microsoft.com/en-us/dotnet/api/system.environme... Unity itself has the Application.*Path properties for some more general cross-platform-aware paths. https://docs.unity3d.com/ScriptReference/Application.html https://docs.unity3d.com/ScriptReference/Application.html
- BlueTemplar 4y agoCurious, why targeting DirectX, rather than Vulkan... it's not like you think about releasing on Xbox, do you ?
- iliketrains 4y agoI remember writing some GPU instancing optimization that had #ifdef for DirectX 11+, but that code is old. Now I've learned how to go without it. It's just all those small things that has to be right to make it work cross platform.
- danielheath 4y agoProton with DV9K is - for a few games - faster than native windows. I don't fully understand it, but apparently the process of automatically rewriting shaders from DX to Vulcan can speed things up.
- sph 4y agoI think you mean DXVK.