游戏引擎开发 [英] Game Engine Development

查看:115
本文介绍了游戏引擎开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何阅读材料,你会推荐游戏引擎开发的主题?特别是2D引擎。

Is there any reading material you would recommend on the subject of game engine development? Specifically 2D engines.

我读了SDL,我想开始编程一些游戏,但我发现自己有点不知所措,没有清楚地描述需要做什么。

I've read up on SDL and I want to get started programming some games but I find myself a bit overwhelmed by the whole thing and I don't have a clear picture of what needs to be done. I just end up building complex, inefficient, rube goldberg programs.

有没有一本关于这个主题的书,引导你通过流行的游戏引擎设计或者沿着这些线路的东西?

Is there a book written on the subject that walks you through popular game engine designs or something along those lines?

推荐答案

如果你还没有制作游戏,那么学习如何制作游戏引擎就会产生反效果。引擎应该从游戏中出现,反之亦然。毕竟,为了代码可重用,它必须首先是可用的,除非你已经成功地编写了一个游戏,你不能证明你的代码可用于游戏。

If you've not made a game yet, then learning about how to make game engines is counter-productive. The engine should emerge from the game, not vice versa. After all, for code to be reusable, it must first be usable, and unless you have successfully written a game with it, you can't prove that your code is usable for a game.

你可能认为阅读一本关于游戏引擎的书会告诉你你需要什么,但事实是不同的游戏有不同的要求。发动机越好,通常会覆盖更广泛的要求,这意味着更高的复杂性和更抽象的工作水平,这意味着它将与你将面临的那种问题很相似

You might think that reading a book on game engines would tell you exactly what you need, but the fact is that different games have very different requirements. The better the engine, typically the wider a range of requirements it will cover, which means both a higher level of complexity and a more abstract level of working, meaning it will bear very little resemblance to the sort of problems you will face as a beginning game programmer.

作为初学者,你需要专注于保持它的小而简单。你的基本游戏循环看起来像这样,你只需要填写函数:

As a beginner, you need to focus on keeping it small and simple. Your basic game loop will look like this and you just have to fill in the functions:

init
while 1:
    get_input
    update_objects
    render
shutdown

你会遇到一些特定的问题,但最好的方法来处理他们是要问一个具体的问题,这种功能,你试图实现,因为有人告诉你如何做的事情比它更容易为他们推荐一本涵盖你可能想做的事情的书(主要是因为这本书不存在)。

Obviously you will come across some specific issues, but the best way to approach them is to ask a specific question about the sort of feature you're trying to implement, because it's easier for someone to tell you how to do something than it is for them to recommend a book that covers everything that you might possibly want to do (largely because such a book doesn't exist). If you can cite existing games as examples, even better.

你并没有说明你是否刚刚接触编程或只是为了游戏编程 - 通常,很多游戏程序员面临的问题是缺乏对基本编程基础知识的理解。你的Rube Goldberg评论意味着后者,如果是,值得挑选好的书,如Code Complete,让你摆脱坏的编码习惯。

You didn't state whether you are new to programming or just to game programming - often, a lot of the problems faced by game programmers are down to a lack of understanding of basic programming fundamentals. Your Rube Goldberg comment implies the latter, and if so, it's worth picking up good books like Code Complete to get you out of bad coding habits.

这篇关于游戏引擎开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆