Solved

Visual C++ and games:  MFC or not?

Posted on 2000-03-17
10
452 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Delion
Comment Utility
 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
Comment Utility
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 5

Expert Comment

by:knowlton
Comment Utility
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
Comment Utility
  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
Comment Utility
  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
Comment Utility
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
Comment Utility
My e-mail is jdmoyer@earthlink.net
Thanks!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you are interested in the gaming world and want to try World of Warcraft, I'd recommend this basic set of add-ons to get you started.  All add-ons are available either by Google search or on Curse.com. For the person who doesn't want to get in…
What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now