Game Development Novice Getting Started (Q & A)
Game making newcomer: What language and compiler do to do game? What is DirectX? What books do you need to learn programming? How do I make a game? Which books introduce game development? VC is good or C ? 50 advice to C beginners with program foundation: How to make 2D games with DirectX? How to use DirectInput? How to display text in the game? How to use DirectSound? How to play a movie in the game? How to achieve a translucent effect in the game? How do I associate DirectX into the VC? What is the "unable to resolve external symbol"? How to learn API (OpenGL / Direct3D, etc.)? Note: Game development is commonplace, if you have any questions you want to know, or the question answers here can't meet your needs, you can leave a message here or leave a question, we will give a reply as soon as possible and will Excellent Problem Extraction is added to this edition. Thank you! What language and compiler use to do games? Refer to "What language I should use". What is DirectX? DirectX (referred to as: DX) is a set of Windows-based multimedia application interface APIS in Microsoft. In the development, DX is divided into two parts, one is a run library, and the program compiled by DX must have the support of the running library. The other is the development library, that is, the SDK, which is often compiled by the DX program. It is necessary. Detail introduction "DirectX Technology overview". What books do you need to learn programming? Depending on the situation, but as a programming basis, the programming class technology book is what you need; in terms of game program development, we can roughly divide the technology into the following modules: game frame, graphic image, graphics effect, game logic , Game interface, artificial wisdom, sound sound, network connection, system optimization, etc. How do I make a game? Refer to the series of articles in the Game Programming, Basic Tutorial, will guide you into the game. Which books introduce game development? At present, there are many game development books in China, and some common books are listed here. VC is good or C ? First, we must correct a wrong point of view, C is a language, and VC is a compiler software; VC is a platform for writing (compile) code, you can write C code on the VC. How to make 2D games with DirectX? The DirectDraw component is the main support part of DirectX to 2D. References "DirectDraw", "DIRCETDRAW C / C ", "load bitmap files to DirectDraw". How to use DirectInput? DirectInput is the input control component of the DirectX API, provides the underlying interface of the operating hardware, reference "DirectInput mouse programming", "DirectInput keyboard programming". How to display text in the game? The text display in the game is generally implemented by two methods. One is to draw by calling the system APIS, the other is to draw through the management font; these two methods have excellent, let us see how they Implemented.
The use of the system APIS "deep into the Window Font", the self-processed font is drawn to the "Dotsham Character Display" (with the instructions for self-processing fonts, the self-processing "is saved in the file through some storage mode, and then Load and draw in the game.). How to use DirectSound? DirectSound is one of the DirectX APIs, which offers fast mixing, hardware acceleration feature, and can directly access relevant devices, of course, the most important thing is its functionality and existing (? Future) What?) The device driver maintains compatibility. Reference "DirectSound". How to play a movie in the game? Playing video clips can be played through DirectShow, referring to the DirectShow full screen playback video in VC. How to achieve a translucent effect in the game? The translucent effect of (2D) graphics in the game is mainly through alpha hybrid operations, refer to the "Alpha-Blending Technical Brief", "Using MMX Optimized 64K Color Alpha Hybrid Algorithm". How do I associate DirectX into the VC? We must have a DirectX program to have a DirectX SDK library file. This file can be obtained by Microsoft or this site and then associate it via VC settings. The installation method under VC6 and VS.NET will be described below. VC6 (English): Select Menu Tools-> Options, open the Options dialog, select the Directions tab, select the Include Files item, add the folder path directory of the DirectX header file, and add a DirectX header in the library files item Folder path directory for files. Vs.net (中文 版): Select menu "Tools -> Options", open the Options dialog, open the Projects tab, select "Contains File" and "Library File" to add accordingly. Note: The VC is selected according to the order sequence, assumes that there are two libraries of the same name, and the VC will prioritize the library files arranged in front. What is the "unable to resolve external symbol"? This error often occurs when the beginner should compile the DirectX program, mainly because there is no DX's library file reference to the project, here we need to note that after we set the DX SDK's path to VC, it does not mean that we have set Good DX SDK, in our DX engineering, we also need to make a corresponding setup operation, add the DirectX SDK Library to our project, and set this library file to have two methods, One is to add in your engineering compilation option, and another can be added (recommended) through the method. Command line: #pragma comment (lib, "xxx.lib") This is the compilation pre-processing instruction of the VC, which will be added to the code. For example: #pragma comment (lib, "ddraw.lib") means that the DDRaw.lib library is added to the project for compilation. Note: This command line does not need to add points (";").
50 advice to C beginners 1. Put C as a new language study (and C do not have a relationship! Really.
); 2. Watch "Thinking In C ", don't watch "C becomes dead"; Never look at; 4. Don't be confused by vocabulary such as VC, BCB, BC, MC, TC - they are all integrated development environments, and we have to learn is a language; 5. Don't let go of any one looks very Simple small programming problem - they are often not so simple, or they can lead a lot of knowledge points; 6. Will use Visual C , do not explain that you will C ; 7. Learn Class Class is not difficult, Template, STL, Generic Programming Also this - difficult is to have a long-term adherence to the practice and spare power of Expo group; 8. If it is not a genius, don't want to play games - you think you have done, in fact, your C level is not with you The ability of the customs clearance is high - actually remember to keep in mind: learn C is for the game; 9. Looking at the Visual C book, you can't learn C language; 10. Impetuous people are easy to say: XX language is not good, It should be learned yy; - is yourself! ? 11. Impetuous people are prone to question: I have learned what to learn; - don't ask, learn to be right; 12. Impro-irritable people are easy to ask: XX has a money; - I suggest you to grab bank; 13. Impetuous People are easy to say: I want Chinese version! I can't speak English! Don't you? Learn! 14. Improiled people are easy to ask: XX and YY which is good; - tell you, all - as long as you learn, 15. I) I'm only waiting to be visiting; b) Just learn, don't persist; 16. Hang the fashionable technology in the mouth, it is better to record the outdated technology in your heart; 17.c is not only supported object-oriented programming language; 18. The best learning programming One of the methods is to read the source code; 19. Don't think that your book in your hand is enough at any time; 20. Please read "The Standard C Bible" (Chinese version: Standard C Collection), master C standards; 21. I have a book, please look carefully; I don't understand the book, please watch it hard; 22. Don't expect to see the first book to remember and master what - please see the second pass, the third time; 23 Please see "Effective C " and "More Effective C " and "Exceptional C "; 24. Do not stay on the cradle of the integrated development environment, learn to control the integrated development environment, but also learn to handle programs in the command line; 25. Discuss meaningful C knowledge points with others, rather than quarrel XX can't do or YY and ZZ which is good; 26. Please see "program design practice" and strictly follow it; 27. Don't be because C and C Some syntaxes and keywords look the same, they think they are exactly the same;