简体   繁体   English

2D DirectX 10游戏开发

[英]2D DirectX 10 Game Development

I am attempting to create a 2D game using DirectX 10. I've been having lots of problems with figuring out how to actually get started to create such a thing. 我正在尝试使用DirectX 10创建2D游戏。在弄清楚如何真正开始创建这种东西时,我遇到了很多问题。 I've discovered mixed ideas, such as just use shaders and stick with Direct3D and I've seen some people using libraries such as SFML. 我发现了混合的想法,例如仅使用着色器并坚持使用Direct3D,而且我看到有些人在使用诸如SFML之类的库。 I am rather new to DirectX, and am wondering what I should be using to create a 2D game (shaders or a library). 我不是DirectX的新手,我想知道我应该使用什么来创建2D游戏(着色器或库)。 Are shaders something that I should look into, or should I just use a library? 着色器是我应该研究的东西,还是仅应使用库?

Well if you are interested in learning DirectX itself, you should try to write your own 2D engine, which with a little experience isn't as hard as it may seem. 好吧,如果您有兴趣学习DirectX本身,则应该尝试编写自己的2D引擎,只需一点经验,它就不会像看起来那样难。 But if you want to get straight to game developement, you can take a look at some engines that take care of that part. 但是,如果您想直接进行游戏开发,可以看看一些负责该部分的引擎。 Shaders can really enhance scenes (3D as well as 2D) and if I were you, I would definitely use them, instead of just using simple unprocessed textures. 着色器可以真正增强场景(3D和2D),如果我是您,我一定会使用它们,而不是仅使用简单的未经处理的纹理。 Most engines won't take the shader programming from you, so you will probably need to look into hlsl anyway. 大多数引擎不会从您那里获取着色器编程,因此无论如何您可能都需要研究hlsl。 Also what I experienced with several engines and librarys: at some point they will come to an end, and if you are enthousiastic about your project, you don't want to live with those limitations. 这也是我在多个引擎和库中所经历的:在某些时候它们将结束,并且如果您对项目抱有热情,那么您就不想承受这些限制。 That's why I would recommend writing your own engine which you can easily expand as needed. 因此,我建议您编写自己的引擎,您可以根据需要轻松地对其进行扩展。

A good starting point for pure DirectX: http://www.rastertek.com/tutdx10.html (Mainly for 3D but also covers 2D, which you will notice isn't that different) 纯DirectX的一个很好的起点: http : //www.rastertek.com/tutdx10.html (主要用于3D,但也涵盖2D,您会注意到这没什么不同)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM