microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.5k stars 404 forks source link

Support for Animated Textures #10

Closed qcha0s closed 8 years ago

qcha0s commented 8 years ago

Previous versions of the DXTK had an example of animating sprites : https://github.com/Microsoft/DirectXTK/wiki/AnimatedTexture.

This is missing from the DX12 implementation.

shawnhar commented 8 years ago

Direct3D 12 is a considerably more expert level, hard to use API than Direct3D 11. That being so, we're not generally planning on replicating all the more tutorial oriented how-to type material from DXTK 11 across to the 12 version. The same concepts apply to either API, so the 11 tutorials could be used to work with 12 as well, but I expect most developers who are using that kind of tutorial would be better off sticking with 11.

qcha0s commented 8 years ago

I get that, but seeing you've re-produced the SpriteBatch Tutorial, taking the one little extra step to re-produce the Animated Textures tutorial would increase the value of the DXTK for those that DO want to use DX12 as the primary version (i.e. Win10 and later). A quick google search shows that people are interested in making 2d games with DX12, both desktop and universal. Some people will start at DX12 and not DX11 ... The future is funny that way. Regardless, just a suggestion.

walbourn commented 8 years ago

TL;DR: If you need the Animated Texture class for DirectX 12 written for you, then you shouldn't use DirectX 12.

You certainly can write 2D games in DirectX 12, just as you could write a 2D platformer in hand-coded assembly, but why? 2D games do not have problems with CPU overhead for draw submission, which is really the design goal of DirectX 12.

My initial thought was simply to not have any tutorials for DX12 at all: if you can't figure out how to use the library on your own, you probably shouldn't be using DirectX 12. That said, even using DirectX Tool Kit with DirectX 12 is complex enough that it warranted making tutorials to explain how to use the various pieces of the library.

The fact that "the Internet is full of people interested in making 2d games with DX12" is an indication of a branding failure. Everyone is conditioned to think n+1 is better than n, which is why "DirectX 12" was a bad naming choice. It really should have had a completely distinct name because the DirectX 12 API is trying to solve an entirely different set of problems than the majority of users of DirectX 11 actually have. I've tried to put the right guidance into the DirectX Tool Kit for DX 12 documentation to communicate this point.

Honestly I wish Frank Luna's new Introduction to DirectX 12 book spent 80% of it's content just telling people to use DirectX 11. It would have been a better book for newbies.