Solved

Visual C++ and games:  MFC or not?

Posted on 2000-03-17
10
456 Views
Last Modified: 2013-12-04
  Here's a simple one here for any game programmers out there. I'm learning Visual C++ (6.0) and after a couple months of going through books on programming, I'm going to try to whip up a simple game to apply what I've learned to something I'm actually interested in.  
   My question is, when I create a new application, should I use a MFC application or a start a non-MFC Win32 application?  
    I'm leaning towards non-MFC because MFC seems to add a lot of things I don't want, like that grey toolbar at the top when I'd rather add my own interface, and I don't quite understand much of what a generic MFC application starts me with, so it's easier to decide where to start with an empty one.  However, I'm not sure where to begin anyways, so I may as well start with the right application type.  Any advice?
-Delion
0
Comment
Question by:Delion
  • 4
  • 3
  • 3
10 Comments
 
LVL 5

Expert Comment

by:knowlton
ID: 2629820
First of all, what genre of game will you be developing?  Will it be an FPS or something else?

I just finished writing a very simple game in MFC.  I can send it to you if you want.  Just e-mail me at knowltonfamily@yahoo.com.  I will send you the game and source code.

My understanding is that the MFC part is just a wrapper for the API calls that are made in the end anyway.

If you want to have a easy to program Windows interface to your game, you'll probably want to use MFC.

If that is not important to you, then i would use straight Win32 API calls.

I understand that Quake III Arena was written in Visual C++ 6.0...I think in just straight Win32 no MFC.  So, it is a valid programming environment for games, definitely.

Good luck,

Tom
0
 
LVL 5

Expert Comment

by:knowlton
ID: 2629829
Also, most of your intense graphics work will be done in DirectX or OpenGL.
0
 
LVL 4

Accepted Solution

by:
nils pipenbrinck earned 25 total points
ID: 2630011
We use visual C++ 6.0 without any mfc at all.. the window api stuff is well... not more than ca. 100 lines of code. There is really no need to use mfc, since we just open a window to make directX happy (it won't run without a window.. even if you are in fullscreen mode).

Then we switch to DirectDraw fullscreen mode and stay in it until the user quits the game.

Since mfc does nothing to make your live with directx or opengl easier there is really no reason to waste the memory with tons of mfc classes lying around without beeing used.

we've used this approach in two commercial games, and I'm pretty sure the percentence of games using mfc is below .. Hm.. 10%?

btw.. it might be a good idea to use mfc if you're not going into fullscreen mode.. card games and solitair style puzzle games are a different thing.

Nils
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Delion
ID: 2630061
 Thanks for the responses- Knowl, right now I'm trying to just get something simple working, so it'll be simple bitmaps displayed or something else easy.  However, I'll want to go towards 3d engines eventually (heh- it'll be a while, probably).  Anyway, I know nothing about DirectX or OpenGL, so I'll go research them for a bit.  Thanks to both of you for the help :)
-Delor
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2630110
if you have problems with directx (maybe you're looking for a !simple! example code that opens a window, switches into fullscreen and draws some pixels) let us know..

I have tons of such stuff here..

Nils
0
 
LVL 5

Expert Comment

by:knowlton
ID: 2630116
nils:

What games have you written, and for what company?

At some point I would like to get into game development and would curious to learn more about it.

Thanks,

Tom
0
 

Author Comment

by:Delion
ID: 2631930
  Heh- thanks, nils.  I'll be sure to e-mail you for that simple program if I can't figure it out in a day or two.
-Delor
0
 

Author Comment

by:Delion
ID: 2634022
  Hmmm- Nils, could cou sent me the simple program?  It'd be a great place for me to start.  My e-mail is jdmoyer@earthlink.net
-Delion
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2634052
Hi knowlton..

Well, I worked on the game Killer-Loop (a futuristic racing game released last december) on PC and playstation. I also did a small ski jumping game which was only published here in germany. (a 3 month project.. a very shitty game, but it sold very good).

Currently we're doing a port of killerloop for the dreamcast console. it'll be released under a new name which I don't know at the moment..

Delion:

I'll send you a small VC 6 project if you give me your email :)



Nils
0
 

Author Comment

by:Delion
ID: 2634364
My e-mail is jdmoyer@earthlink.net
Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

See the related links at the bottom of the tutorial for downloads and supplemental information. Introduction The Nvidia 3D Vision Kit is a [not so] new gaming technology which allows you to play the newest computer games in "Stereo 3D" (like …
As we all know Counter Strike is a very popular computer game. Usually it is played over a network for which people create a server and users join it but it is interesting to know that one can creates a dedicated server which not only hosts the game…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question