In software development, the direction of game development seems to have a clear goal, but it is actually a very broad field. If you don’t get some guidance when you get started, it is easy to go astray. On the contrary, if you can get some guidance from predecessors before taking this path, you can get twice the result with half the effort.
Platform and programming language selection
First of all, there are many types of game development platforms:
- Personal host platform: Windows, Linux, Mac OC;
- Mobile platforms: iOS, Android, Windows Phone, BlackBerryOS, Symbian;
- Professional host platforms: Xbox, PlayStation, Will, etc.
If you want to engage in game development for mobile platforms, the mainstream JAVA language for Android and the mainstream Object-C language for iOS, then you have to learn the mainstream language of this platform, and the mainstream game development language on personal consoles is still C++ for a long time now and in the future.However, it does not mean that game development for different platforms has nothing in common, and learning this is useless on another platform. This is not the case. The further you go in the world of programming, you will find that the essence of many things is similar. For example, if you have a solid understanding of the basic syntax of C++ (rather than memorizing it by rote), it will not be difficult to switch to Java language in the future, because their essential object-oriented features and various programming language features are interoperable.Therefore, if you want to go far, you can’t simply stay superficial when learning. The deeper you go into the bottom of the same knowledge, the more you can see the similarities between other knowledge and it, so you will be more relaxed than others. However, of course, it is best to fit your own exclusive field and programming language as much as possible at the beginning, so that you can have a place in this field as soon as possible. No matter which platform you choose, the huge project of game development cannot be separated from the game engine, so there are two routes for you to choose:
- Only use the game engine;
- Use game engines and learn in depth about game engine principles.
Route 1: Using only the game engine
For the first route, the use of game engines is not difficult, so it is suitable for people who want to quickly get started with game development. Most of the time, we don’t develop game engines ourselves at work, so this is not a big deal for general daily work. For people who only use game engines, what you need to do in the entry stage is to watch the tutorials of the engine (books, videos, online blogs, online tutorials, official help documents, etc.) and be proficient in the programming language used in the tutorial.So the first thing you have to do is to understand the popular game engines. Because the performance of different platforms is different, and the supported programming languages are also different, the popular game engines for different platforms are also different (the ones in square brackets are specially recommended, based on the comprehensive level of open source, ease of use, performance and effects):
- Windows or game console: [Unreal], Frostbite, CE3
- Apple iOS: [unity3D], [cocos2d-ObjC], [Unreal], sparrow, sprite kit.
- Android: [unity3d], [cocos2d-x], [Unreal], AndEngine, libgdx.
- Web pages: [Egret], [cocos2d-html5], Fancy3D, unity3d.
When choosing a game engine, try to choose a popular game engine, because the popularity of this game engine means that the official functions are more complete and easy to use, and there are more people in the Q&A community to answer questions. Each game engine has its own advantages. Unity3d is easy to use and has low performance requirements, but the effect is not gorgeous enough, so it is generally used on mobile platforms but not on computers or game consoles. Unreal is open source and free, and the effect is also excellent, but the equipment requirements are relatively high, so it is often used to develop large-scale games with gorgeous effects. Cocos2d-x is also open source and free, and has deep attainments in the 2D field, but the disadvantage is that it is not a visual development. In addition, if you want to understand the principles of game engines, then the first consideration is an open source game engine.The programming language or scripting language used by different game engines may be different, so when you want to learn a game engine, you should also pay attention to the language used by the game engine. In most cases, Windows uses C++, combined with lua or python scripting languages. Objective-C or swift is used on the ios platform, and Java is used on the Android platform. But this is not inevitable. For example, Unity can use C# or javascript scripting languages on all platforms.Below is a detailed comparison of popular commercial game engines:
1) Unreal 4
- Applicable platforms: Microsoft Windows, Mac OS X, iOS, Android, virtual reality devices (including but not limited to SteamVR/HTC Vive, Morpheus, Oculus Rift and Gear VR), Linux, SteamOS and HTML5 platforms.
- Programming Language: C++ or no coding required.
- Advantages: It is open source and free, has excellent graphics, and has been used in many commercial blockbusters. At the same time, it is cross-platform, has rich store resources, and provides a powerful function for making games without writing code (visual development).
- Disadvantages: The development machine configuration requirements are high.
2) Unity3D
- Applicable platforms: iOS, Android, Windows phone 8, Tizen, Microsoft Windows, Windows Store app, Mac, Linux/Steam OS, Web player, WebGL, PlayStation3, PlayStation4, PlayStation Vita edition, Xbox One, Xbox 360, Wii U, Android TV, Samsung SMART TV, Oculus Rift, Gear VR, Microsoft Hololens, Playstation VR.
- Programming languages: C#, javascript, Boo.
- Advantages: easy to use, rich Chinese information, cross-platform, rich store resources, and visual development.
- Disadvantages: The graphics are average, it is not free and open source, and the engine efficiency is relatively low.
3) Cocos2d series (including Cocos2d-x, Cocos2d-ObjC, Cocos2d-html5, Cocos2d-xna, etc.)
- Applicable platforms: Microsoft Windows, OS X, Linux, iOS, Android, Tizen, Linux, Mac OS X, HTML5 browsers, Windows Phone 7 & 8, Xbox 360.
- Programming languages: Python, Objective-C, C++, Lua, JavaScript, Swift, JavaScript, C#.
- Advantages: open source and free, cross-platform, rich Chinese information, rich and mature 2D technology.
- Disadvantages: No visual development, 3D technology is not mature.
4) CryEngine3
- Available on: Microsoft Windows, OS X, Linux, PlayStation 3, PlayStation 4, Wii U, Xbox 360, Xbox One, iOS, Android.
- Programming languages: C++, Lua.
- Advantages: world-class graphics, visual development, cross-platform.
- Disadvantages: The development machine configuration requirements are high and it is not free and open source.
5) Frostbite3
- Available on: Microsoft Windows, PlayStation 3, PlayStation 4, Xbox 360, Xbox One.
- Programming language: C++.
- Advantages: excellent graphics, visual development, cross-platform.
- Disadvantages: The development machine configuration requirements are high and it is not free and open source.
6) Egret
- Applicable platforms: HTML5, iOS, Android, Windows Phone.
- Programming languages: TypeScript, JavaScript.
- Advantages: free and open source, many supporting tools, full Chinese documentation, visual development, cross-platform.
- Disadvantages: It supports fewer platforms and is mostly used to develop small games that do not require high performance and efficiency.
However, using a game engine is just a superficial process, and you cannot see the essence. When some problems or special requirements arise during game development, it is often difficult for you to deal with them. Moreover, game engine technology is changing with each passing day, and what you learn are almost all the methods left by others, rather than their essential ideas. If other game engines emerge in the future, you will have to relearn how to use other game engines. In many large companies, there are even engines dedicated to their own companies (such as NetEase’s Fenghun engine, Kingsoft’s Jianwang 3 engine, Snail’s Flexi engine, etc.). So simply taking this route may not take you very far and may become increasingly boring.
Route 2: Use the game engine and gain an in-depth understanding of its principles
For the second route, in-depth study of the principles of game engines will not make your work have any outstanding results in a short period of time, but it can make up for the problems caused by using only game engines. Moreover, learning the principles of game engines is more often not for the purpose of building a game engine for yourself in the future, but to have a deeper understanding of your own game engine and use it better. Of course, a journey of a thousand miles begins with a single step. When people who often learn the underlying principles of game engines have accumulated a certain amount of knowledge, they can also build a game engine by themselves. For those who want to learn the principles of game engines, they need to set their own clear long-term goals: 1) First of all, you may not have any concept of game engines at the beginning. It is recommended to use one or two game engines first (I recommend C++ programmers to learn Unreal 4 game engine, which is now free and open source and very worth learning. Try not to learn those non-open source game engines, because they do not contribute much to learning principles). 2) Because game development is an art of real-time rendering, it is inseparable from the study of graphics libraries. The current mainstream graphics libraries are DirectX 11 for Windows platform and Opengl for general platform. You need to get started with at least one of these two graphics libraries. 3) Then, you can start reading books on computer graphics. If you find that your theoretical foundation is insufficient, you need to supplement your knowledge of linear algebra, basic calculus, and 3D mathematics. 4) The game engine contains various parts, and the rendering above is only a part of the game engine. There are other things such as shader writing, terrain writing, physics engine writing, models and animations, artificial intelligence body design, network programming, etc. After completing the basic learning of the rendering part, you can choose to specialize in the part you are interested in. After all, most of our actual work is team development, not single-handedly, and everyone should be proficient in the part they are good at.Here, for the compactness of the article, I put the basic theoretical knowledge of the game engine and the recommended books on each engine component in the appendix of the article.The following table is a recommendation for books on basic theoretical knowledge and game engine components (you don’t have to read all of them, please read selectively):
1) Mathematical foundation
The following basic mathematics books are tailor-made for game development and are more efficient than specializing in a particular direction of mathematics:
- “3D Math Primer for Graphics and Game Development”, Chinese version available
- “Mathematics for 3D Game Programming and Computer Graphics”
- “Essential Mathematics Guide”
- 《Geometric Tools for Computer Graphics》
2) Graphics Library
Books for DirectX:
- “Introduction to 3D Game Programming with DirectX 11”, the famous dragon book, a must-read for beginners
- “Practical Rendering and Computation with Direct3D 11”, advanced
- “Real-Time 3D Rendering with DirectX and HLSL”
Books for OpenGL:
- “OpenGL SuperBible”, a famous blue book, mainly based on examples, has a Chinese version. But I don’t recommend reading the Chinese version because it is not well translated.
- OpenGL Programming Guide, the famous Little Red Book, has a Chinese version. The Little Red Book is more like a manual, a complete API, with fewer examples, suitable for skilled people to consult and use.
- OpenGL 4.0 Shading Language Cookbook, advanced, basically the API manual, has a Chinese version. But I don’t recommend reading the Chinese version, the translation is not good.
3) Computer Graphics
- The Nature of Code, there is a Chinese version, which is relatively simple
- Fundamentals of Computer Graphics is an introductory textbook adopted by many foreign universities. It covers a wide range of topics, from basic related mathematics to modeling, rendering, animation, and applications.
- Physically Based Rendering, mainly offline rendering
- “Real-Time-Rendering”, a must-read classic! Must read!
- Computer Graphics, by Sheri
- “Computer Graphics”, read the latest third edition
- “Principles and Practice of Computer Graphics: C Language Description”
4) Shader
- Cg_tutorial, Getting Started
- “The Complete Effect and HLSL Guide”, getting started
- “Shaders for Game Programmers and Artists”, contains a lot of introductory examples
- Advanced Lighting And Materials With Shaders, an introduction to lighting models and techniques
- “GPU Gems” is a must-read for advanced users.
- The Shader X series, one book published every year, contains the latest real-time rendering technology. It is more paper-based and difficult.
- “Programming Vertex, Geometry, and Pixel Shaders”, based on DirectX 10, very detailed.
5) Terrain
“Real Time 3D Terrain Engines Using C++ And DX9” provides a very comprehensive discussion of various techniques for terrain rendering.
6) Model import and animation
- Character Animation With Direct3D includes the latest game animation technology
- Computer Animation
- Real-Time Cameras
- “Computer Facial Animation”
- “Realtime 3D Character Animation with Visual C++”
- “Advanced Animation and Rendering Techniques”
- 《Cloth Modeling and Animation》
7) Network
- TCP/IP Explanation Volume 2
- “Network Programming for Microsoft Windows”
- “Advanced Programming in the UNIX Environment”
- Windows Core Programming
- 《Multithreading applications in Win32》
- Core Technology and Practice of Online Games
8) Physics
- Game Physics
- 《Game Physics Engine Development》
- Real-time Collision Detection, the best book on collision detection
- Chapters 8 and 9 of 3D Game Engine Design, 2nd are worth reading
9) Level of detail
“Level of Detail for 3D Graphics”
10) Ray Tracing
- “Physical-Based Rendering – From Theory to Implementation”
- “Another Introduction to Ray Tracing”
11) Artificial Intelligence
- Programming Game AI by Example has a Chinese version
- “Artificial Intelligence for Games”
- AI Programming Wisdom
- 《AI Game Engine Programming》
12) General
- Game Programming Gems, the article covers a wide range of topics, so please read it selectively
- “Color and Light in Nature”
- 《Digital Design of Nature》
- “Form+Code in Design, Art, and Architecture”