游戏编程库 C++

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/90272/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 12:46:31  来源:igfitidea点击:

Game Programming Library C++

c++

提问by ugasoft

Which is the best available, free, easy-to-learn game programming library for C++?

哪个是最好的、免费的、易于学习的 C++ 游戏编程库?

采纳答案by realsugar

Try Allegro. It's free, cross-platform and covers all the stuff you need to program games.

试试快板。它是免费的、跨平台的,涵盖了您编写游戏所需的所有内容。

回答by ugasoft

Ogre is the best Graphic Engine available for free. Ogre doesn't cover all field a game engine should do. Ogre doesn't handle physics, networking, AI, audio...

Ogre 是最好的免费图形引擎。Ogre 并没有涵盖游戏引擎应该做的所有领域。Ogre 不处理物理、网络、人工智能、音频……

If you want to collect a good set of free libraries I suggest you to use

如果你想收集一套好的免费图书馆,我建议你使用

  • OGRE for graphics
  • Bullets (or ODE) for physics
  • Raknet for Networking and MatchMaking
  • "something else" for audio and AI
  • 图形的 OGRE
  • 物理子弹(或 ODE)
  • 用于网络和婚介的 Raknet
  • 音频和人工智能的“其他东西”

If you need something powerfull (but expensive) I suggest you C4 Engine (350$) or Torque (150$).

如果您需要功能强大(但价格昂贵)的东西,我建议您使用 C4 发动机(350 美元)或扭矩(150 美元)。

回答by Klaim

SFMLis an excellent library to build a game engine over if you're going 2D. A clearly better alternative than SDL.

如果您要使用 2D,SFML是一个出色的库,可以用来构建游戏引擎。一个明显比 SDL 更好的选择。

Ogre and other libraries have already been cited but if you're going 3D it certainly is the best free 3D engine around, as it is the most flexible.

已经引用了 Ogre 和其他库,但如果您要使用 3D,它肯定是最好的免费 3D 引擎,因为它最灵活。

回答by John Millikin

Ogre3dand Irrlichtare both popular 3D game engines for C++.

Ogre3dIrrlicht都是流行的 C++ 3D 游戏引擎。

回答by Paul Wicks

SDLis also quite popular and there is a tonof information about it floating around the web, a lot of it geared specifically towards making games. This tutoriallooks particularly good.

SDL也相当受欢迎,有一的它漂浮在网络上的信息,它的很多努力,使游戏专门针对。这个教程看起来特别好。

回答by Maximilian

Like previously said Ogre3d and Irrlicht are probably your best options in regards to "free". If you also want "easy to learn" it boils down to Irrlicht.

就像之前所说的,Ogre3d 和 Irrlicht 可能是您关于“免费”的最佳选择。如果您还想要“易于学习”,则归结为 Irrlicht。

Very clean interface and great tutorials.

非常干净的界面和很棒的教程。

Edit: Actually you should be a little bit more specific. Do you want 2d or 3d graphics? Do you need sound, physics and all that or just graphics? Which platforms do you want to target?

编辑:实际上你应该更具体一点。你想要 2d 还是 3d 图形?你需要声音、物理和所有这些还是只是图形?您要定位哪些平台?

Also, are you sure it has to be C++? While C++ is pretty much mandatory for professional game engines, for learning purposes C# with XNA or some scripting language is way better.

另外,你确定它必须是C++吗?虽然 C++ 对于专业游戏引擎来说几乎是强制性的,但出于学习目的,使用 XNA 或某些脚本语言的 C# 更好。

回答by Maximilian

Ogre3D is not a game engine. Some replies here imply that it is a game engine. It is a graphics engine.

Ogre3D 不是游戏引擎。这里的一些回复暗示它是一个游戏引擎。它是一个图形引擎。

It is important to understand it.

理解它很重要。

回答by Emrah Diril

Check this out from 2D Boy, the makers of World of Goo: Rapid Prototyping Framework

从 World of Goo: Rapid Prototyping Framework的制作者 2D Boy 处查看这一点

It's only for prototyping, but you can still learn from it.

它仅用于原型设计,但您仍然可以从中学习。

回答by Phyxx

My favourites are Irrlicht and Ogre. Both are very powerful, but (if you are familiar with C++) are fairly easy to get started with thanks to the documentation and examples. You can find a step by step tutorial that shows you how to get started with Irrlicht here, and with Ogre here.

我最喜欢的是 Irrlicht 和 Ogre。两者都非常强大,但是(如果您熟悉 C++)由于文档和示例,很容易上手。您可以在此处找到向您展示如何开始使用 Irrlicht以及此处使用 Ogre的分步教程。

回答by Robert Gould

If you want C++ and your just starting out I'd go with Irrlicht (its free, and its code although not blazing fast like Ogre, its very well structured and a good example of what a C++ should look like). But if you're ready for some hardcore work Ogre would be better (although its source can be much more enigmatic and hard for a new comer).

如果你想要 C++ 并且你刚刚开始,我会选择 Irrlicht(它是免费的,它的代码虽然不像 Ogre 那样快,但它的结构非常好,是 C++ 应该是什么样子的一个很好的例子)。但是如果你准备好接受一些硬核工作,Ogre 会更好(尽管它的来源对于新来者来说可能更加神秘和困难)。