Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ozz

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

This topic is 6918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
@!$^&*!@^$!!!!!


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**

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ===/

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!