Game Migration - SharpDX to Vortice #106
Replies: 20 comments 16 replies
-
For reference - https://insanesoftware.itch.io/pacific-strafe-alpha is my WIP deployment. |
Beta Was this translation helpful? Give feedback.
-
Excellent stuff, I plan to add DataStream as well, not sure when. |
Beta Was this translation helpful? Give feedback.
-
Extern issue was due to the fact I was using the Dinput.h file from win sdk 2010, the latest SDK has the 2 problem lines removed from the header. See how I go now. |
Beta Was this translation helpful? Give feedback.
-
Generation of Propertys is creating spurious code. unsure of the origin as still learning SharpGen. I've used the same properties as Sharpdx initially, just so I can generate the code. But generates inherently different code. |
Beta Was this translation helpful? Give feedback.
-
The extern issue has been sorted, but still have issues with the rules around handling PropertyGuids. in the dinput.H file, a property is defined as:
in the vortice generated header file its expanded to
The final code in the Functions class is (_GUID seems to be a default name created as GUID is already defined from what I understand)
looking at the original sharpdx implemetation. It supposedly should be:
Driving me mad, I will update the naming once I figure this last issue out with DirectInput |
Beta Was this translation helpful? Give feedback.
-
@amerkoleci update on progress, code is in my fork at the moment. |
Beta Was this translation helpful? Give feedback.
-
DataStream just landed. |
Beta Was this translation helpful? Give feedback.
-
@amerkoleci im almost running the game, I pulled in Sharpdx directinput to allow for the game to run for now. I am now fixing errors in the code, most are nothing special. Simple mistakes. Up to loading my assets in , hoping my 3d projection isn't broken! Shaders are loading in from file correctly. |
Beta Was this translation helpful? Give feedback.
-
@amerkoleci think xaudio may need some additional code around handling the headers for Waveformat. At the moment, unless you're a specific wave format, loading in audio files is problematic. Looking at what sharpdx did, they consumed alot of code from NAudio to parse the headers. thanks for you work. |
Beta Was this translation helpful? Give feedback.
-
well its rendering! im using Sharpdx directinput at the moment, and sound isnt working. I have some issues going to fullscreen, but expect to solve them. Found an issue in your datastream class potentially. Will raise an issue. |
Beta Was this translation helpful? Give feedback.
-
Absolutely, nice job |
Beta Was this translation helpful? Give feedback.
-
@amerkoleci just a heads up, Performance of my game in Sharpdx Vs Vortice is basically the same, in fact, the performance is identical. At lower frame rates, Vortice seems to be slightly faster. Compiled under .NET 5.0. Have a good holiday |
Beta Was this translation helpful? Give feedback.
-
Just an update: Working on Volumetric clouds. At the moment in my Sharpdx based editor (to be moved to Vortice!). Lighting on clouds will be done soon. Will be working with 3d textures, will be able to stress this out in Vortice soon. |
Beta Was this translation helpful? Give feedback.
-
https://www.youtube.com/watch?v=Gx1mhxXieXQ&ab_channel=AndrewH Update, clouds in game now |
Beta Was this translation helpful? Give feedback.
-
@h1cks question: what do you think about C# for gamedev? How are the performance? What are the pros and cons from your perspective and experience? |
Beta Was this translation helpful? Give feedback.
-
My 3 times comment is in respects to code timings on pure c++ code. The wrapper would be causing minimal performance overhead if none. |
Beta Was this translation helpful? Give feedback.
-
An example of DirectInput can be seen here: https://github.com/roy-t/MiniEngine3/tree/main/src/Backend/Mini.Engine.Input |
Beta Was this translation helpful? Give feedback.
-
Hi, I used SharpDX with DirectX 10. Now I'm trying to convert to Vortice with DirectX 11, but I'm missing the effects framework, i.e. classes like |
Beta Was this translation helpful? Give feedback.
-
@amerkoleci all working again! Some other changes I have to incorporate. But its feature parity with Sharpdx except for media player. Clouds working...found the last issue. |
Beta Was this translation helpful? Give feedback.
-
In terms of DX11, I'm using about 80% of the features and it's showing no issues. Memory seems to be equivalent. The best news is that frame rates are basically identicle because I am GPU limited (well, 650 FPS is fine! at my test harness). |
Beta Was this translation helpful? Give feedback.
-
Migration of my game is basically done apart from a couple of items, which I will be working on. I still have to migrate my tools which use the same engine, but it should be a lot simpler to move to
Edit: Things to know when migrating from Sharpdx to Vortice. This is only the stuff I found when migrating.
Migration has been pretty simple, most of the time is migrating has been consumed by migration off Sharpdx's implementation of Matrix and Vector3. This was responsible for over 2000 compile errors on its own. im down to my last 50 (all classes resolution issues).
Goal will be to implement:
(implemented by Amer)
Direct Input - issue of extern reference in Dinput.h to joystickstate is causing issues. Once I work out why this is an issue, I will then try to build it closer to the vision in Vortice.
Media Foundation - At some point will look into this.
(implemented by Amer)DataStream class - Very helpful, will pull out of Sharpdx and create a util library out of it.
Once again, thanks for the API. It's certainly given more life back to future gamedev in .NET.
Beta Was this translation helpful? Give feedback.
All reactions