xcode 为什么很难找到C++ 3d游戏教程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2749855/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is it so hard to find a C++ 3d game tutorial
提问by Dave
I'm planning on learning 3d game development for the iphone using a 3d engine, but because of lack of tutorials for the iphone I was planning on using C++ game tutorials and making the necessary changes.
我计划使用 3d 引擎学习 iphone 的 3d 游戏开发,但由于缺乏 iphone 教程,我计划使用 C++ 游戏教程并进行必要的更改。
The problem is that I've had limited success when searching for things such as 'c++ 3d fps tutorial ' I dont really get anything useful.
问题是我在搜索诸如“c++ 3d fps 教程”之类的内容时取得的成功有限,但我并没有真正得到任何有用的信息。
Are there any 3d c++ tutorials you can recommend?
有没有可以推荐的 3d c++ 教程?
回答by jalf
There are no tutorials on writing a MS Word killer either.
也没有关于编写 MS Word 杀手的教程。
That's because tutorials are for explaining specifics. There are tutorials for "how to implement bump-mapping in your game", but not for "how to make a complete AAA game from scratch".
那是因为教程是为了解释细节。有关于“如何在你的游戏中实现凹凸贴图”的教程,但没有关于“如何从头开始制作一个完整的 AAA 游戏”的教程。
If you feel you need a tutorial for that kind of thing, you're not ready to make it.
如果你觉得你需要一个关于这类事情的教程,你还没有准备好。
All programming is about splitting up complex tasks into tiny simple ones. You need to do the same.
所有的编程都是关于将复杂的任务分解成微小的简单任务。你也需要这样做。
Instead of wondering "how do I write a FPS game on iPhone", you need to ask:
而不是想知道“我如何在 iPhone 上写一个 FPS 游戏”,你需要问:
- how do I write anyapp at all
- how do I initialize and use OpenGL on iPhone in the first place
- how do I do 3D rendering in general(not API specific, but how does the math work, how does it work, what do I need to do)
- 我该如何编写任何应用程序
- 我首先如何在 iPhone 上初始化和使用 OpenGL
- 我一般如何进行 3D 渲染(不是特定于API,但数学如何工作,它是如何工作的,我需要做什么)
...
...
and so on. There are a million steps on the way that can be solved individually. And at the end of the road, you'll have your game.
等等。还有一些对能够解决的办法一百万步个别。在路的尽头,您将拥有自己的游戏。
But there is no tutorial in how to make a FPS game on iPhone for the same reason that there are no tutorials in "how to make a fighter jet" or "how to achieve world peace". People who need to tutorials for it won't be able to do it, and a tutorial would be so big and complex, it'd be pointless.
但是没有关于如何在iPhone上制作FPS游戏的教程,原因与“如何制作战斗机”或“如何实现世界和平”的教程相同。需要教程的人做不来,教程又大又复杂,就没意义了。
You'll have to learn the hard way: by picking up a book on 3D graphics, learning how to program the iPhone, learning how to use OpenGL, learning how to do everything along the way. By looking up resources explaining that speciifc problem, rather than simply reading the next paragraph of your uber-tutorial.
您必须通过艰难的方式学习:通过拿起一本关于 3D 图形的书,学习如何对 iPhone 进行编程,学习如何使用 OpenGL,学习如何在此过程中完成所有工作。通过查找解释该特定问题的资源,而不是简单地阅读超级教程的下一段。
回答by KillianDS
Okay, after the short comment, a little bit more description. First of all you most know there is no such thing as simply generic 'game programming', programming a game consists of many different topics. For example, 3D rendering, audio playing, gameplay coding (including AI), possibly network coding, some advanced I/O libraries, ... .
好的,在简短的评论之后,再做一点描述。首先,您最清楚没有简单通用的“游戏编程”这样的东西,游戏编程包含许多不同的主题。例如,3D 渲染、音频播放、游戏编码(包括 AI)、可能的网络编码、一些高级 I/O 库,......
The reason for this is most games have different needs, for example most of the above will be very different for RTS vs FPS games. Even more specific examples, Doom3 had totally different needs than half-life2 or far-cry (old examples but it's been a time since I really played games myself :p). The first one needed advanced lighting, shadows, awesome interiors, the latter ones needed impressive outdoor scenarios.
这样做的原因是大多数游戏都有不同的需求,例如,对于 RTS 和 FPS 游戏,上述大部分内容都会有很大不同。甚至更具体的例子,Doom3 的需求与半条命 2 或孤岛惊魂完全不同(旧例子,但我已经有一段时间没有自己真正玩游戏了:p)。第一个需要先进的照明、阴影、令人敬畏的室内设计,后者需要令人印象深刻的户外场景。
While you may think 'yeah, but these are all great professional games, I'm trying something simple', it is quite essential to understand this even applies on your level. There is no magic tutorial that will learn you how to write FPS games.
虽然您可能会想“是的,但这些都是很棒的职业游戏,我正在尝试一些简单的东西”,但了解这一点甚至适用于您的级别非常重要。没有神奇的教程可以教您如何编写 FPS 游戏。
As I said in my comment, a good place to get started is Gamedev.net, they really have a huge collection of tutorials, articles and a good support forum. Here you can learn from which components a game is typically build, how you can learn these components (and which you need for the kind of game you want to write), ... .
正如我在评论中所说,Gamedev.net是一个入门的好地方,他们确实拥有大量教程、文章和良好的支持论坛。在这里,您可以了解游戏通常由哪些组件构建,如何学习这些组件(以及您要编写的游戏类型需要哪些组件),...。
Good luck and have fun with it, game developing is a really fun thing imho, but it's a long path to master it even a little bit :).
祝你好运,玩得开心,恕我直言,游戏开发是一件非常有趣的事情,但即使是一点点掌握它也是一条漫长的道路:)。