C++ and the Universal Windows Platform

Started by
10 comments, last by mike44 7 years ago

Hello everyone.
I have some background with C++, and I would like to code apps and games with it using the UWP (Universal Windows Platform).
Is there any book explaining how to do so?

I tried with Amazon but with no luck.

I know I could code with C#, but I can't make games unless I glue it to C++ and DirectX 12, so let's cut the edge and learn just C++.

Thanks in advance for either.

Bye, Ivano..

Advertisement

Is the information on MSDN insufficient for you in some fashion? How so?

I can't make games unless I glue it to C++ and DirectX 12

You don't need to use D3D12 to make games, and in fact it's probably not a great idea unless you already know what you're doing and are already well-versed in graphics programming fundamentals.

You can also use wrappers like SharpDx to access D3D from C#.

I'm not sure I can develop 3D games for the UWP in C#.

If it's possible, then this discussion should never being started.

Thanks anyhow, please let me know ASAP.

What motivates you to choose UWP, exactly?

The portability

You can use "pure" C++ (without MS C++/CX extension) with C++/WinRT library: https://github.com/Microsoft/cppwinrt

Microsoft also published a start-template for DirectX 12 and C++/WinRT too: https://blogs.msdn.microsoft.com/chuckw/2017/02/11/directx-tool-kit-and-cwinrt/

"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/
We're going slightly ot here.
I'm looking for a book about windows 10 universal windows platform for c++.
Discard the directx knowledge required, but still keep in mind I also want to create 3d games on (in example) windows phone.
Or at least I want to know if it's possible even with c#.

For the direct answer, I'm not aware of such a book.

However, I'm replying because from what I understand it isn't an issue in practice. Use the API calls you would normally use to build the game. The compiler and linker will give errors for using any of the short list of 'forbidden' functions, but otherwise you would develop your application the same as you normally would.

You'll want to start verifying your app as soon as possible with the App Certification Kit, but as long as you maintain a clean build it should work without any issues.

When you encounter an error, either a traditional runtime function that isn't available in the Universal library or some other violation, you could look up that specific error and you'll likely find multiple solutions or workarounds.

Thanks anyhow.

C# is kind of the more common thing for UWP. You can certainly code it in C++ as well but you'll have to rely on the MSDN and online tutorials as there are currently no books on it that I know of. Here is a tutorial specifically for UWP with DirectX and C++.

If your goal is to write games that run on Windows as well as Windows Phone, have you considered Unity? You'd have to use C# but you can definitely make 3D games with it and get them to run on those (and a gazillion other) platforms. I think they even added DX12 support recently. If you want to write and sell games then that may be a good way forward, as with DX12 you'll have to basically write at least three separate rendering engines from scratch (one for AMD, one for NVidia, and one for whatever the GPU used in Windows Phones is).

This topic is closed to new replies.

Advertisement