Archived

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

wah_on_2

Will you use MFC for make game?

Recommended Posts

wah_on_2    122
My partner and I are making an RPG Game using Visual C++ and DirectX. It is school project. i have a question. Will game company use MFC to make game? We want to follow the style of game industry. Thanks!

Share this post


Link to post
Share on other sites
B-Barlow    122
Short answer: No.

MFC brings a whole lot of overhead with it. Game programmers like to keep their stuff lean to squeeze out every ounce of performance they can.

Edited by - B-Barlow on January 1, 2002 8:31:50 AM

Share this post


Link to post
Share on other sites
wah_on_2    122
Really?

But how game programmer handle all the game events(e.g. player enter key)?

I know we can handle events in WinProc() function, so will game programmer handle all the events at here? If yes, the WinProc() function will become very complex and difficult. Right? Or have another solutions?

I am a beginner in game development, so i want to know more. Thanks!

Share this post


Link to post
Share on other sites
B-Barlow    122
Most use DirectInput for that. This lets you directly check the state of input devices when you need to rather than waiting for windows to tell you when something has happened. So in your main game loop you can just check if keys are being pressed or what the joystick position is, etc.

Normal window messages are handled through straight Win32 API programming. Generally games won't be interested in too many windows messages though. Some actually only check for WM_QUIT, WM_DESTROY and nothing else.


Edited by - B-Barlow on January 1, 2002 9:05:13 AM

Share this post


Link to post
Share on other sites
MirekCz    132
for the main game exe file peoples use pure Win32Api. If you use stuff like Dinput you''re left to handle just few-several messages (like WM_QUIT, WM_MOVE/WM_SIZE for windowed mode etc , there are mostly much less then a dozen of them used)
Some ppl tend to make additional game tools (like map editors, scripting tools, etc etc) with MFC, becuase they feel it lets them do it faster and the code performace isn''t that important then.
Just grab a book on Win32API or search for info on MSDN and you will be fine. It''s really pretty simple once you get the idea.

With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/

Share this post


Link to post
Share on other sites