Introduction to the Notes series of MFC Game Development

Source: Internet
Author: User

This series of articles was compiled by the Central fog of. For reprinted articles, please indicate the source.

 Http://blog.csdn.net/u011371356/article/details/9299121

Author: Sina Weibo, Wuyang:Http://weibo.com/1689160943/profile? Rightmod = 1 & WVR = 5 & mod = personinfo

 


In view of the need for code learning, I Will paste the code as a whole in the future for your reference, but I suggest you write it yourself. After finishing the code for adjusting the window in the second note, you will only pay attention to cchildview in this series of tutorials. H and cchildview. CPP files, so I will paste all the code of the two files each time.


By Wuyang 2013.7.14


For more chapters, I will upload the project files for your convenience. You can download them and feel it for yourself.


By Wuyang 2013.7.15


We can see that everyone is enthusiastic about game development. After taking note 3, Wuyang uploaded the source code and downloaded it with 0 points. You can refer to the source code to see the blog post.


By Wuyang 2013.7.18



Starting from the 11th day of the note, Wuyang updated the series name to "C ++ game development" because this tutorial did not go deep into MFC, but borrowed the framework and texture of MFC, the original name may mislead some students, and Wuyang prefers to explain some ideas about game development, not limited to MFC.

By Wuyang 2013.7.22


I. The path to my game development and learning

 

The reason why many people started their computer journey was to carry on with the dream of game development, at least I am. The days I learned at the beginning were extremely painful and enthusiastic about game development, but I had to write a program in the dark window of the console every day. I don't know how to write a graphic game program, I remember that most of the results I got from searching for information on the Internet were about to learn a graphics library, such as DirectX, OpenGL, or Win32 API. The older one was the graphic library. DirectX and OpenGL are really too difficult for a newbie. There are a lot of complicated terms and concepts that demand mathematics. Win32
There are too many API functions, and there are too few materials to explain game development. At least I didn't find it at the time, and the graphic library is dedicated to TC, which is probably no longer used, at that time, I felt it was too difficult to develop a good-looking game. Fortunately, I found the easyx graphics library (http://www.easyx.cn/) on the Internet, which was a graphics library developed by Mr. yangw80 using Windows programming, the interface is basically the same as graphic, and has a detailed CHM document description. It is recommended that students who are new to programming can learn about it, at least it will allow you to quickly develop a graphics program, thanks to bestans for writing the easyx graphics development tutorial http://www.easyx.cn/skills/View.aspx? Id = 45. At that time, I had just finished the C language. I looked at this tutorial and made my own graphic interface Student Achievement Management System and snake farming and clearance games. This graphic library does not support many functions. For example, it is quite difficult to implement the input box. However, it is no longer a problem to use it to implement a decent game demo. You can also say goodbye to the console window.

Later, our school conducted professional training. The content of the training was the development of MFC and the game was made, as shown below:

Let's take a look at a town map:

 

 

Another map of the wild:

 

I am playing a horizontal game like adventure island. Although it is not perfect, the most basic things of the game are basically available. Of course, I would like to thank my teammates for their contributions, in fact, I personally think that the game is basically a combination of art + If/else.

I have been very interested in 3D games for a long time. After seeing visual C ++ game development, I started to look at the simple ink tutorials and learn about 3D games in csdn, now it's just getting started. Unfortunately, I stopped updating my blog because I was very busy.

The above is probably my learning process on the road of game development. Up to now, I am still a beginner, but I admire the sharing spirit of simple ink, I still remember the detours and pains I had learned in the past. I hope that I can share my learned knowledge and help those teenagers who once had the same game development dream as me.

 

Ii. MFC Game Development Series


1. Object-oriented

I am not good at writing, and the technology is also general. Therefore, this "MFC game development" series is intended for beginners of Games. If you have any questions, please point out that I would like to express my gratitude here.

2. learning basics

The requirement for learning is to master the C language. For C ++, you only need to know the basic concepts of classes. Not familiar with it does not prevent you from playing games. The game is developed using a single MFC Document. If there is no problem with MFC, I will perform graphic tutorials in the first step. My development environment is vs2010 and win7.

3. Update

During the summer vacation, I have a lot of time and will update it as soon as possible. I promise that at the end of the tutorial, you can at least write the game I posted above, that is, a 2D game demo.

4. Feedback

If you have any questions, please leave a message in your blog comment or send a message to me via Sina Weibo. My Sina Weibo name is, and I will answer the question in time (if I know it, haha ).

Note:On the Internet, many people do not recommend using MFC to develop games. It encapsulates a lot of things that cannot be used, and the drawing efficiency of GDI is low. However, I think the idea of game development is the same, MFC is just a tool. If we can use it to make our own games and realize our dreams, why? Moreover, in the above 2D action role-playing game, the FPS can reach 60 frames without generating a little bit of cards. That is to say, we are playing a simple game, in terms of efficiency, I don't think we need to consider the impact of MFC for the moment.

In addition, I know that many people with Game Development dreams have chosen to learn a game engine. Indeed, you can use the game engine to quickly develop your own games. Even with tools like RPG maker, you can drag out a decent RPG Game without having to write a line of code, but how much help does this mean for our own growth? Starting from the most basic part, we can recognize the implementation principles of the game engine, and even write our own game engine. The fog is now planning to slowly write our own game engine. I think that in the learning stage, it is better for everyone to write code from the bottom layer to play games. In the working stage, it is the most correct choice to develop games using game engines.

 

The note for "MFC game development" is over once. For more highlights, see the next article. If you think the article is helpful to you, please leave your comment and give a thumbs up. It is my pleasure to see your message, this makes me know that I am helping young people who have been confused with me. Your support is the motivation for me to continue writing. May we learn together and work together to revitalize Chinese games.

You are welcome to point out the omissions or errors in the article.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.