win32 or mfc?

Started by
12 comments, last by superpeter 22 years, 11 months ago
if i want to start to learn game programming in windows. which api should i need to learn, win32 or mfc? what are the differences between these two? thanks..........s..........s.........s
Advertisement
see here:

http://www.gamedev.net/community/forums/topic.asp?topic_id=14381
"after many years of singularity, i'm still searching on the event horizon"
think of MFC as tons of classes written for you to encapsulate WIN 32 API function, to make it easier

if you want to be a win game programmer, no doubt, you need WIN 32 API

MFC is slower, harder to get started with
hmm you can ofcourse write a game with MFC but that sux big time!

Arkon
http://qsoft.cjb.net
MFC is designed for use with utility programs. Things were you have one or more documents, and the user saves, loads, and creates them. All of that wrapping will just get in your way and cause a performance loss in the end.

The Win32 API is what you''re going to want to use for games. That doesn''t rule out using MFC for a Map Editor or something though.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/
any books recomment? i know ANSI C, i guess i will pick up the mspress programming windows first.

Edited by - superpeter on April 24, 2001 11:21:19 AM
I use MFC for data editing and handling. I''ve mucked around with having to create from scratch many interfaces in DOS for lists and stuff that I really appreciated MFC speed. If you have a lot of data to manipulate, like in a RPG, then MFC is a useful tool/ And if you want a 2nd party to do some data editing.

In MFC learn how to do lists, trees, amd data entry screens. I''ve got a character editor that I''ve done in MFC.

ZoomBoy
Developing a iso-tile 2D RPG with skills, weapons, and adventure. See my old Hex-Tile RPG GAME, character editor, diary, 3D Art resources at Check out my web-site
I was recently in the same boat. After messing on with MFC I decided to revert to the Win32 api.

But... I couldn''t find any decent reference material. Not on the net, nor in my local book shops. Then I happened to take a closer look at a book I had bought months ago but never really examined.

Tricks of the Windows Game Programming Gurus (Andre Lamothe).

Turns out, the material I need was right under my nose. It''s very good for Game related Win32 information. I''m using it this very second, and can''t recommend it highly enough.

Eight
Perhaps my nick may suggests a slight bias, but that''s just an illusion.

MFC is a wrapper for the Win32 API, making some things easier and giving you more of a "foundation" to work on. But to use MFC, you need an understanding of the Win32 API. So, by necessity (really), you need to learn the Win32 API first. You can learn them both in parallel, but for a beginner that might be more confusing.

As for games development, there is really nothing really wrong with MFC other than the (approx) 1 MB MFC library DLL that will be required on top of whatever code you write. Also, for games, a lot of MFC''s functionality will probably go unused. The major benefit of using MFC, the way I see it, are the message maps & routing. Also, it helps you structure your program in a more object-oriented way; vanilla Win32 has a tendancy to lead to rather messy spaghetti code if you''re not careful.

On a side note, there are some other "Class Libraries" out there that you may want to consider. Once you have a basic understanding of the Win32 API and how to write programs, you can check out wxWindows and WTL (Windows Template Library) to see what they offer you & determine if they will make things easier for you.

Hope that helps!
// CHRIS
// CHRIS [win32mfc]
i found one book may suitable for me: Windows 2000 Programming from the ground up by Herbert Schildt, anyone read this b4?
I havent read that, but I have read "Programming Windows" by Charles Petzold. And its awesome for Win32 API.

Which, as previously stated, is your foundation before going onto MFC.

-Mezz

This topic is closed to new replies.

Advertisement