简体   繁体   English

C ++游戏编程资源

[英]C++ Game Programming Resources

在哪里可以获得C ++的一些高级游戏编程资源?

At http://gamedev.stackexchange.com ? http://gamedev.stackexchange.com吗? More specifically, this question and lots of others tagged with c++ 更具体地说,这个问题以及许多其他使用c ++标记的问题

Start with writing some simple 2D games, eg Snake, TicTacToe, etc. Write these using any GUI builder you're already familiar with. 首先编写一些简单的2D游戏,例如Snake,TicTacToe等。使用您已经熟悉的任何GUI构建器来编写这些游戏。

Then try to rewrite these games using a serious graphic engine, eg SDL, OpenGL, or DirectX. 然后尝试使用严肃的图形引擎(例如SDL,OpenGL或DirectX)重写这些游戏。

Then try to write a more complex 2D games, eg side-scroller. 然后尝试编写更复杂的2D游戏,例如侧滚动。 Write these games with the graphic engine of your choice. 使用您选择的图形引擎编写这些游戏。

Then add some simple 3D effect to your 2D game, eg parallax scrolling . 然后在您的2D游戏中添加一些简单的3D效果,例如视差滚动

Then rewrite this effect with true 3D, use 3D models/sprites, 3D environment, etc, while maintaining a 2D look and feel. 然后使用真实的3D重写此效果,使用3D模型/精灵,3D环境等,同时保持2D外观。

Then add some simple 3D look and feel, eg allowing characters to move in the Z-direction (to/from the camera), doing camera rotation, etc. 然后添加一些简单的3D外观,例如,允许角色在Z方向上移动(进出相机),旋转相机等。

If you just got out of the command prompt and simple GUI, you'll probably want to start simple. 如果您刚刚退出命令提示符和简单GUI,则可能需要从简单开始。 I'd very much recommend OpenGL as your API of choice. 我非常推荐OpenGL作为您选择的API。 Since you've done some simple GUI programming, you'd know what an API is. 由于您已经完成了一些简单的GUI编程,因此您知道了什么是API。

OpenGL has the following advantages (compared to SDL and DirectX previously mentioned): OpenGL具有以下优点(与之前提到的SDL和DirectX相比):

-Its hardware accelerated (SDL is not as far as I know) -Its 3D (SDL is 2D) -Its cross-platform (DirectX is Windows only) -它的硬件加速(据我所知SDL并不多)-它的3D(SDL是2D)-它的跨平台(DirectX仅Windows)

By far the best place to start with OpenGL is the Nehe tutorials. 到目前为止,最开始使用OpenGL的地方是Nehe教程。

http://nehe.gamedev.net/ http://nehe.gamedev.net/

Game programming becomes evident once you become a bit more familiar with the API. 一旦您对API更加熟悉,游戏编程就会变得显而易见。

Also, I'd heartily recommend GLUT (OpenGL Utilities Toolkit). 另外,我衷心推荐GLUT(OpenGL实用工具包)。 It simplifies window creation and user input handling, among other things. 它简化了窗口创建和用户输入处理等操作。 Its great for learning OpenGL. 非常适合学习OpenGL。 It also happens to be cross platform. 它也恰好是跨平台的。

Here's freeglut, a free GLUT implementation: 这是freeglut,这是免费的GLUT实现:

http://freeglut.sourceforge.net/ http://freeglut.sourceforge.net/

OpenGL is also a relatively simple and easy API to learn. OpenGL也是一个相对简单易学的API。 You'll be going into 3D in no time. 您将立即进入3D模式。

What libraries are you using? 您正在使用哪些库? You can try GP wiki . 您可以尝试GP Wiki It can be a bit hit and miss depending on what you want to use. 取决于您要使用的内容,它可能会遇到一些麻烦。

By "resources," do you mean tools? “资源”是指工具吗? Libraries? 图书馆? Tutorials? 教程? I have a bunch of useful game developer links in the sidebar of my own site. 我自己网站的侧边栏中有很多有用的游戏开发人员链接 I also think " Mathematics for Game Developers " was very helpful. 我也认为“ 游戏开发者数学 ”非常有帮助。 It has a second edition as well. 它也有第二版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM