TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to approach making a 3D Game Engine?

8 点作者 Betelgeuse90超过 10 年前
This has been a project that I knew I wanted to undertake for years now.<p>I&#x27;m slowly reading books, improving my general programming skills in the process (I&#x27;m a CS &amp; Math student also working as a developer of educational games in JavaScript using a proprietary engine), but it feels like when I exhaust the general-purpose books aimed at turning me into an all-round better developer (Clean Code, Pragmatic Programmer and Effective C++ are ones that currently have my attention) - I&#x27;m left with a giant body of information relevant to the task at hand and no knowledge of where to start.<p>I want to mess with all the nitty-gritty details, and learn how to write neat, performant and extensible code. Do the math. Do it all.<p>But I have no focus. All I know is that I want to delve into OpenGL and C++, but I don&#x27;t really have a clear picture of what should be done with them. What are the basics of engine development that I should start with?<p>I only have tidbits of information gathered from here and there, but nothing is formed in my brain and it&#x27;s a bit frustrating.<p>I&#x27;m scared that if I just start with no clear direction, I&#x27;m going to end up throwing away lots of code and become discouraged.<p>Would love to hear your thoughts. Thank you.

5 条评论

fit2rule超过 10 年前
The best thing you can do is look at the existing engines out there, and gain a grasp on the subject. The fact is that a lot of the major work behind these engines has already been done - again and again - so in the case of the open source engines, you have a lot to gain by reading code.<p>Crank out the code for OGRE 3D, Minko, Irrlicht, Torque 3D, and Maratis 3D. Heck, even looking at the code for a 3D game like WakeBreaker (demo game for PowerVR) can give you a lot of insight needed to do what you want to do.<p>Code reading is a very powerful way to make progress with your goals - and so too, is it good for you to be contributing to these projects wherever you can. I&#x27;d suggest a program of discovery whereby you go through these engines in multiple passes - get them all installed&#x2F;set up, run the demo&#x27;s, order them by complexity and how much personal effort you feel it takes to gain insight into how they work, and then do another pass from top to bottom on your list, adding features if you can, and so on. In a matter of 4 - 6 weeks of discovery, you can learn a great deal - and may even contribute valuable features&#x2F;bug fixes too. All too often these engines are fantastic but lack some trimming around the edges - test cases, documentation, sample models, demo games, etc. You can gain a lot of experience by filling in these holes in other peoples&#x27; projects, and within a few months you should gain enough of an understanding - if you&#x27;re serious about it - to venture on your own. But you may find that the existing engines give you what you want anyway .. a way to learn the subject and understand the field productively.<p>Good luck!<p>(And in case you&#x27;re interested in game engines in general - I&#x27;m particular enamoured by MOAI, which is 2D game engine albeit built on a core 3D engine - it can do 3D as well, so maybe you want to have a look and see if your interest in the subject can help push MOAI into more 3D-specific territory too..)
评论 #8923654 未加载
评论 #8923655 未加载
cjbprime超过 10 年前
You could start with a simple raytracer? They&#x27;re considered small enough to be an intro undergrad project, but it&#x27;s still a very substantial amount of work.
评论 #8920736 未加载
mediumdave超过 10 年前
Don&#x27;t write a game engine: write a game. You won&#x27;t really know what features your engine will need until you have specific requirements. The generic parts - the &quot;engine&quot; - can be extracted via refactoring once you have a working system.
partisan超过 10 年前
Something I didn&#x27;t do: try making a game using SDL or some other game library before you go all in on your own. From that, you will learn how it can be done, from the public API. It will give you a sense of when things should happen and why.
_pius超过 10 年前
Have you used other game engines? If not, I&#x27;d suggest you start by building games in a few different game engines so that you can develop good taste.
评论 #8920813 未加载