为什么找个C++这么难? 3D游戏教程

发布于 2024-08-30 23:38:32 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

月隐月明月朦胧 2024-09-06 23:38:32

也没有关于编写 MS Word 杀手的教程。

这是因为教程是为了解释具体细节。有“如何在游戏中实现凹凸贴图”的教程,但没有“如何从头开始制作完整的 AAA 游戏”的教程。

如果您觉得需要此类事情的教程,那么您还没有准备好。

所有编程都是将复杂的任务分解为微小的简单任务。你也需要这样做。

不要想知道“如何在 iPhone 上编写 FPS 游戏”,您需要问的是:

  • 我如何编写任何应用程序 首先
  • 如何在 iPhone 上初始化和使用 OpenGL
  • 如何做我一般进行 3D 渲染(不是特定于 API,而是数学如何工作、它如何工作、我需要做什么)

...

等等。路上有一百万个步骤可以单独解决。在路的尽头,你就会得到你的游戏。

但iPhone上没有如何制作FPS游戏的教程,就像没有“如何制作战斗机”或“如何实现世界和平”的教程一样。需要教程的人将无法做到这一点,而且教程又大又复杂,毫无意义。

你必须以艰难的方式学习:拿起一本关于 3D 图形的书,学习如何对 iPhone 进行编程,学习如何使用 OpenGL,学习如何完成所有事情。通过查找解释特定问题的资源,而不是简单地阅读超级教程的下一段。

There are no tutorials on writing a MS Word killer either.

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".

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:

  • how do I write any app 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)

...

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.

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.

故事灯 2024-09-06 23:38:32

好的,在简短的评论之后,有更多的描述。首先,您最知道的是,不存在简单的通用“游戏编程”这样的东西,游戏编程包含许多不同的主题。例如,3D 渲染、音频播放、游戏编码(包括 AI)、可能的网络编码、一些高级 I/O 库……。

原因是大多数游戏都有不同的需求,例如 RTS 游戏与 FPS 游戏的上述大部分需求都会有很大不同。更具体的例子是,《毁灭战士》与《半条命》或《孤岛惊魂》有着完全不同的需求(虽然是老例子,但我已经很久没有真正玩过游戏了:p)。第一个需要先进的照明、阴影、令人惊叹的室内设计,后者需要令人印象深刻的户外场景。

虽然您可能会想“是的,但这些都是很棒的专业游戏,我正在尝试一些简单的东西”,但了解这一点甚至适用于您的水平是非常重要的。没有什么神奇的教程可以教你如何编写 FPS 游戏。

正如我在评论中所说,一个好的起点是 Gamedev.net,他们确实有大量的教程、文章和良好的支持论坛。在这里,您可以了解游戏通常构建的组件、如何学习这些组件(以及您想要编写的游戏类型所需的组件),...。

祝你好运,玩得开心,恕我直言,游戏开发是一件非常有趣的事情,但要掌握它,即使是一点点,也是一条漫长的道路:)。

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, ... .

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, Doom³ had totally different needs than half-life² 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.

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.

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), ... .

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 :).

零度° 2024-09-06 23:38:32

Read this as it explains why you need a game engine of which you can build but you might need to find a better graphics and physics library to build in 3d but other than that it is good.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文