🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

MFC Programming vs' ...........

Started by
9 comments, last by Ozz 24 years, 1 month ago
I`ve been trying to figure out the MFC OpenGL examples on the Visual C++ MSDN CD. MFC looks horrible, I was wondering what advantages if any it has over the seemingly standard methods of window initialisation (NeHe`s included). Thanks.
Advertisement
I don''t like to program MFC applications too, but there are some advantages -it''s easier to created tool bars, menus, ...

Visit our homepage: www.rarebyte.de.st

GA
Visit our homepage: www.rarebyte.de.stGA
If you know how to program with MFC then you build a program in less time. The drawback is because of the amount of code MFC uses it is Slower and therefore not advisable if you wan''t to make fast Demos/Games.

Phantom
@!$^&*!@^$!!!!!


I''m so goddamn tired of people claiming MFC runs slower! IT DOESN''T!
It compiles a lot slower due to the extra code - that''s a plain and simple fact - but it doesn''t add any significant memory or execution overhead at all, if you use it right.


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
i think MFC s*cks because it is not portable.

PH.
I don''t wan''t to setup a discussion here...but i find MFC slower then normal WIN32 code(i know MFC uses WIN32 but the problem is the amount of code MFC uses before you actually get into your own source).....Besides that.......My programming teacher say''s the same..........and My collegues at work also say''s the same......
The same applies to Assembly and C programming....if you really wan''t to speed up youre program then you rewrite the frequently used Functions/Methods from C to assembly

Maybe you don''t notice the speed difference with computers Nowadays(>500Mhz)...but if you wan''t to make fast demos you should not use MFC(My opinion)....why do you think Games aren''t written with MFC...atleast games like (Halflife, UT, Quake) from which the source is released so you can see it for yourself...

Don''t get me wrong here......when i make editor programs, Net-programs, and other program alike i use MFC because you can quickly setup your program.....but when i make realtime graphics programs then i use the Basic WIN32 API

Phantom
MFC is great for writing apps (i.e. database,Browsers,etc.) but when it comes to using it for a game, it is not that advisable for a couple of reasons:
1.) There are 200+ classes in MFC, and if your only using it for a games UI, your wasting about 180 of these, which adds up to a lot of code.

2.) MFC is DESIGNED for apps, meaning that it is hard to make things like translucent menus,etc. because they are supposed to look the same in Windows. In a game, most people want to make a cool looking UI with these features, and the MFC really isnt worth it.

3.) For a game, a UI can be simply created with just a simple window, textbox,and button control(maybe a listbox too) but thats ALL YOU NEED.

If your making a retail sales system, use MFC, youll probably save yourself months of work, but if your writing a game, it just doesnt make sense to waste all that extra code (even the extra complie time) just so you dont have to write your own window handling routines.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

I agree. I just started learning MFC a few days ago ( through tutorials on the net ), and I''m finding that MFC is NOT as bad as most people say it is. I plan on using it to make apps. I know that I will definitly not use MFC to create games, becuase its pointless basically, I''ll use win32. But for apps, it seems fine. BTW, anyone know any good sites for MFC tutorials?

We shall be free; th'' Almighty hath not build here for his ervy, will not drive us hence: Here we may reign secure and in my choyce To reign is worth ambition though in Hell: Better to reign in Hell, than serve in Heav''n.
We shall be free; th'' Almighty hath not build here for his ervy, will not drive us hence: Here we may reign secure and in my choyce To reign is worth ambition though in Hell: Better to reign in Hell, than serve in Heav''n.
Well basicaly MFC wasn''t designed for coding games or demos. It''s for Win32 apps that run on the desktop, if you want to write a decent full screen, graphics intensive program don''t use MFC, simple! MFC doesn''t suck, it just has it''s place (very big, bloated place none the less)


\=== Joyrex-J9 ===/
=== Joyrex-J9 ===/
Mixing MFC and Win32 works fine and you get the best of both worlds.

Use MFC datatypes and you get excellent arrays, linked lists, etc.

Use Win32 for messaging and flexibility that would be required for a game.

The biggest downfall is that yes, it isn''t portable.
This Space Left Blank

This topic is closed to new replies.

Advertisement