Video Game on C++ with MFC visual studio -


I do not know that this is all wrong, so I'm asking for instructions here.

For example, back to college, when you learn C ++ and compile Turbo C ++ or GCC, you get a low-level programming language information.

Now we say that I want to create the original 2D video game, just as a private project, nothing is fancy, and I want to develop it using C ++ . I will use it with Visual Studio because it is a very good IDE

Is there a right to say "I am going to use MFC" for this kind of project? (Consider the fact that I am using OpenGL)

MFC is a C ++ frame That is what encapsulates the key elements of the Windows API. This is intended to create an primarily standard, window-based application that user interacts on the desktop.

It comes with a built-in graphics framework: the GDI that was introduced with Windows, is revolutionary for its time, because it separates hardware-specific details, Allows write that runs on any machine Windows ran but this was not particularly good for games; It was designed for Windows-style commercial applications. It was great for the lesson (and still arguably the best option is that what have you seen, how Direct2D text renders recently?), And handled simple graphics, but consider alternative graphics like OpenGL-specific framework Prior to being available, most game developers stick to DOS, where they could communicate directly with graphics hardware at a lower level.

So if you want to use MFC and OpenGL together, you can , but I do not really see the point is. The only real advantage to get from MFC is that 100-odd lines of code that set the fundamental skeleton of any Windows application. For example, instead of being directly displayed in your code, using the MFC, the WinMain and MainWndProc functions will be allowed to bury in the intestine of the MFC framework code. But, as I said, the big deal will be majority of your code open-g-specific, and MFC will not help there.

This may be the only way to communicate in two ways, if you write launchpad / host for the game, then the MFC and GDI (i.e., which displays the window and the dialog on the screen) The part is, and then in OpenGL, the part of the game was launched (after clicking on the "Start" button on the dialog interface)

And obviously, even though you wanted to do this, MFC is not your only choice. There are lots of C ++ frameworks for writing windows applications, everyone has their favorites. Some people may tell you, even if you already know and / or are comfortable with the Windows API, then wrong is nothing but with MFC but do not waste time learning / em> Use it instead.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -