MFC FOR TURNBASED ?

Started by
4 comments, last by GameDev.net 19 years, 4 months ago
hi folks,i want to write a turnbased strategy game,but i wonder if i should learn MFC or write it with win32,do u think MFC is an advantage for writing this kind of game or?its not needed and i can make it easily with win32, answer this for dialogs,menus,scroll bars,or other things please.
Advertisement
You can do it in MFC (I have done this for my Zenfar I) the advantage is that you can use CString and the other built in MFC classes. The disadvantage is that most Direct X examples don't do this. Do whatever is quickest and most comfortable for you. Good luck!
Glen Martin
Dynamic Adventures Inc.
Zenfar
Quote:Original post by blue-ice2002

hi folks,i want to write a turnbased strategy game,but i wonder if i should learn MFC or write it with win32,do u think MFC is an advantage for writing this kind of game or?its not needed and i can make it easily with win32,
answer this for dialogs,menus,scroll bars,or other things please.


It sounds like you already know the win32 sdk. If so, and if you are happy with it, I wouldn't bother learning MFC for this. You can do everything you need with what you already know, and a lot of the features of MFC which are nice for application software won't really be useful for a typical game.

If you are trying to decide which one to learn in the first place then the question is more one of personal opinion. I prefer to use win32 for games, but I keep it pretty lightweight. Basicly I just use it to get a window to work in.

Another option to consider is .net, if you are planning to use any microsoft api extensively you are already giving up something on portability, and .net is basicly microsoft's replacement for MFC. Microsoft is going to put a lot more energy into promoting and supporting .net than MFC in the future, and it shouldn't be any harder to learn.

In the end this question doesn't really matter that much. These API's are just your interface to the OS, the majority of the code for your game is going to be the same regardless of which you choose.
Quote:Original post by glenrm
You can do it in MFC (I have done this for my Zenfar I) the advantage is that you can use CString and the other built in MFC classes. The disadvantage is that most Direct X examples don't do this. Do whatever is quickest and most comfortable for you. Good luck!


You can use most MFC classes outside of a MFC project, such as CString. I've done it before. If this is a simple game, MFc will be ok, abeit it is quite slow compared to DirectX,OGL,or SDL. As for the dialogs,menus,scroll bars, most of those are done with an in-game gui, and not windows stuff, even though it is possible and some games do use it. Using those MFC classes will save you lots of time compared to making your own GUI code, but its all a matter of how much time and effort you want to put into your game.
While it may seem a bit off topic, .net actually has support for directx guis using common window controls. Check out the directx 9 sdk sample called CustomUI, its quite interesting. While I have not had a chance to atcually toy with it much, it does seem like an excellent way to develop a ui since it support many of the common controls you would need. Plus they are stylish.
oops to clarify the above post, you dont need to use .net to use the directx9 features found in the CustomUI sample. Though .net does have some nice utility classes of its own.

This topic is closed to new replies.

Advertisement