Will you use MFC for make game?

Started by
5 comments, last by wah_on_2 22 years, 3 months ago
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!
Advertisement
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
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!

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
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/
With best regards, Mirek Czerwiñski
You should use direct input for the input, ex mouse keybord joystick. For windows stuff, use the message handler
oh~~~yeah!

My goal is clear now. I know how to do. Thanks a lot of. ^^

This topic is closed to new replies.

Advertisement