View Full Version : How hard is C++ and MFC
supatrupa
03-10-2003, 02:23 PM
These text based sports games are rather intriguing.
I've got both OOTP and FOF series' and they are totally
immersive simulations of their sport.
I've read up on how Jim came about programming his game, and I want to ask those experienced programmers:
Can these games be written with using C++ and MFC as Jim states on his site?
I know there are also statistical calculations involved and a knowledge of the sport needed. I have been bitten by this bug and would love to start learning how to program these games myself.
Radii
03-10-2003, 02:33 PM
I asked a very similar question a few months ago, I'll see if I can find the thread(it's probably on the old board) and link you to it. I never did anything with it, I started using C++ and C# and Java at work and I just can't get into it for fun when I'm doing it every day on the job, anyway, some of the answers were helpful, I'll look for that old thread tonight :)
The answer to 'how easy is it' though, will vary greatly depending on your experience with other sorts of programming, knowledge of OOP, and 1000 other things I'm sure.
SportsDino
03-10-2003, 02:38 PM
I have not played FOF4, but I know that FOF 2001 could be made with C++ and MFC (and a lot of hard work :) ). Such projects though would be very big so you'll need a lot of time to get anything remotely cool done. I'd recommend starting with smaller projects and working your way up.
I was bitten by the bug too, and its taken me a couple of years to really enjoy the stuff I'm producing.
If you are very new to programming I'd start by checking out the net and getting some of the tutorials working. You can get free compilers and info, so if programming ends up to be too confusing you won't be out any money. If you do good with the stuff you find on the net then you might think about buying a couple good references (especially for MFC as Microsoft's help is mostly ludicrious) and buying some programming software.
Given my current experience, if I was knowledgable in football I think I could rig together FOF given time, and I've really only been studying programming for the past two to three years. It certainly isn't easy stuff though, although I hope you have the best of luck.
primelord
03-10-2003, 02:52 PM
Quite honestly you can write these types of games in almost any language. Although some are obviously more suited for it than others. Jim once told me he wrote a version of the FOF1 engine in Perl. So anything is possible :).
Bonegavel
03-10-2003, 04:09 PM
Even though computer speeds are making the gap smaller, c++ code will always be faster than say Java or Visual Basic. Of course, I am referring to properly coded c++, but I think that is understood.
Just for example, Jim used c++ (MFC is just Microsofts own classes, which are still c++ based) for FOF and it is very fast. If you have ever played East Side Hockey Manager, that was written in VB - slower than [insert funny thing here].
Now, I have seen programs written in VB that are speedy using windows API calls etc, but I think you would be better off learning c++ before getting into that (as that can be just as difficult).
Very few games on the market are written in anything besides c or c++ because of the speed factor.
Again, you, as a novice, may write a text based sim game in c++ but it may be slower than another written in VB simply because you are not optimizing with collections, pointers etc. As was mentioned above, I would start out with small, well defined projects and follow through to completion. For instance, I spent years reading and doing examples from c++ books, but until I started a Crossword Puzzle generator, I didn't learn anything. You must apply your knowledge to an actual application as opposed to the canned "Doodle" application that every mfc c++ book has you create.
Hope this helped.
Bonegavel
03-10-2003, 04:14 PM
oops, I didn't really answer your question.
If you never programmed before, c++ is tough. But, if you stick with it and apply what you learn to an actual project (like i mention above) you quickly will climb the learning curve.
VB is like the Dark Side of the force; quick and easy. But, learn quickly you do that frought with danger it is, Padawan. Fast, easy, and loose are qualities I don't look for in a woman, so why should I accept them in a programming language?
SplitPersonality1
03-10-2003, 08:37 PM
Originally posted by BoneGavel
VB is like the Dark Side of the force; quick and easy. But, learn quickly you do that frought with danger it is, Padawan. Fast, easy, and loose are qualities I don't look for in a woman, so why should I accept them in a programming language?
LOL! I have to use your quote for a young kid I'm tutoring. He will get a kick out of it.
wbonnell
03-11-2003, 12:02 AM
IMO, Java is a *much* easier language to pick up.
One language isn't necessarily faster than another. C++ is typically faster than a Java app because C++ is compiled down to native code whilst Java is compiled to byte code which has to interpreted at run time (this is how it achieves cross platform portability). OF course, you can compile your Java to machine code if necessary. Also, IBM's excellent UI framework, SWT, is capable of building efficient UIs. As far as I'm concerned, Swing is too bloated to be of much use.
BTW, I think Java is the perfect programming language for a text sim.
Marc Vaughan
03-11-2003, 07:10 AM
Pretty much any game can be created using any language, if the user has the knowledge and ability to do so imho.
There are obviously limitation to some languages with regards to large data intensive programs (ie. VB gets somewhat slow with large databases) but by and large these can be worked around or tolerated.
I personally recommend C++ for programming games because of its speed, ease of use (assuming you are familiar with it), portability (if coded correctly) and great tool support.
CM is created using the following in case you're interested:
PC:
Visual C++ 6.0 (release code)
Visual C++ .NET (alternative dev envoironment)
Metroworks (alternative dev envoironment)
Boundschecker
TrueTime
Mac:
Metroworks (release code)
Xbox:
Visual C++ 7.0
For source control we use 'perforce' upon all platforms and 'test-track pro' for bug reporting.
Have Fun,
Marc
PS. We use a variety of 'dev' environments on the PC because each environment tends to report different warnings and errors in the code which I find useful for rummaging out ambigious code statements and potential errors (as well as ensuring that x-platform compatibility is retained) .... just in case you were wondering.
wbonnell
03-11-2003, 08:39 AM
Originally posted by Marc Vaughan
I personally recommend C++ for programming games because of its speed, ease of use (assuming you are familiar with it), portability (if coded correctly) and great tool support.
In my opinion, Java is a MUCH easier language to use(simplicity is elegance), infinitely more portable, and the tool support is second to none. The open source community has embraced Java with open arms. Believe me when I tell you that the C++ community can't hold a candle to Java in this regard...
bamcgee
03-11-2003, 11:05 AM
oops... I spent all that money on VB. I have to learn somewhere though, and it's been very easy so far.
Bonegavel
03-11-2003, 12:23 PM
Originally posted by bamcgee
oops... I spent all that money on VB. I have to learn somewhere though, and it's been very easy so far.
Learning VB first will make learning C++ much more difficult. The latest version (.NET) is making strides in being more structured, but it is apples and oranges.
Whatever your decision, i highly recommend that you read up on naming conventions and such. The more structure you impose on yourself, the better. Code can quickly balloon out of control and if you don't have standard naming conventions for variables, functions etc., you will give up in frustration.
Bonegavel
03-11-2003, 12:26 PM
Originally posted by SplitPersonality1
LOL! I have to use your quote for a young kid I'm tutoring. He will get a kick out of it.
Thanks. I have nothing against VB (i have used it for many projects) but, since the topic was on gaming I threw in my 2 cents.
It really is a matter of the right tool for the right job. I wouldn't use a sledgehammer for nailing into trim moulding, but I could.
Raven
03-11-2003, 12:32 PM
On a side note, how important is calculus to programming?
Pre-calc is kicking my ass. It just requires way too much independant studying (which I'm not used to), and has me second guessing pursuing a Computer Science degree.
wbonnell
03-11-2003, 12:48 PM
Originally posted by Raven
On a side note, how important is calculus to programming?
Pre-calc is kicking my ass. It just requires way too much independant studying (which I'm not used to), and has me second guessing pursuing a Computer Science degree.
99% of the math you need to know to write code you will learn in discrete mathematics and linear algebra though some basic calculus is necessary in complexity analysis. However, if you want to build a scientific application or a physics engine or something like that, you will need to understand calculus because it is the language of science.
For example, writing a text-based sports sim engine may require some calculus knowledge to build statistical models, but I doubt it.
wbonnell
03-11-2003, 12:51 PM
Originally posted by Raven
On a side note, how important is calculus to programming?
Pre-calc is kicking my ass. It just requires way too much independant studying (which I'm not used to), and has me second guessing pursuing a Computer Science degree.
dola:
From my experience, precalc is more difficult than first semester calculus because it is a crash course in both college algebra and trigonometry. It crams a hell of a lot of info into 15 weeks. First semester calc, otoh, requires you to apply that knowledge.
wbonnell
03-11-2003, 12:55 PM
Originally posted by BoneGavel
Learning VB first will make learning C++ much more difficult. The latest version (.NET) is making strides in being more structured, but it is apples and oranges.
Whatever your decision, i highly recommend that you read up on naming conventions and such. The more structure you impose on yourself, the better. Code can quickly balloon out of control and if you don't have standard naming conventions for variables, functions etc., you will give up in frustration.
I disagree. I think the hardest part of programming is learning how to abstract. Building non-trivial programs with VB will teach you that skill.
<b>Why do people always ask which programming language should I learn? What they should be asking is how do I build software</b>
Creating a program is so much more than slinging code. In reality, programming is the easiest part of the task. Figuring out what to build and how to build it is the hard part. Think of programming as a hobby like building a deck in your back yard. You can do it without much planning. Think of software engineering as a job like building a skyscraper- you need a tremendous amount of planning.
sabotai
03-11-2003, 01:19 PM
I'm kind of on the fence about this...
While I agree with wbonnell that the programming language is not the most important part, and that problem solving is, it's also important to know your goals and to know which language will help you acheive those goals the easiest.
VB is not THAT limited. Puresim and the free version of EHM were programed in VB. But you have to know that VB is specifically, and limited to, Windows.
You won't be creating the next Quake engine in VB. But VB is fine for a text sim. VB is great for database applications as well, which is why many people choose VB. VB's database access is, in my opinion, second only to Borland Delphi.
So if all you want to do is program Windows applications, then there really is no point into learn C++, and you should just go with VB.
I do, however, agree with Bone that is you learn VB it will make learning C++ somewhat harder. If only for the fact that VB does things one way, while C++ does them another. It's hard to change to way of thinking after you get used to a language.
There's a reason why German is easier to learn than Chinese. German's structure is similar to English, Chinese is not.
And that's how you have to look at VB and C++. VB has certain syntax, and C++ does it a completly different way.
If you do, however, feel that one day you might want to break away from the strict Windows programming, then you might as well take the long road and learn C++.
wbonnell is right, programming is one of the easier parts of creating a program. How you do it, the problem solving part of it, will always be #1.
But two things you need to decide before you jump in. 1) What is it I want to do with my programming skills? 2) Which language best fits the way I think?
Bonegavel
03-11-2003, 01:51 PM
Originally posted by sabotai
I'm kind of on the fence about this...
While I agree with wbonnell that the programming language is not the most important part, and that problem solving is, it's also important to know your goals and to know which language will help you acheive those goals the easiest.
VB is not THAT limited. Puresim and the free version of EHM were programed in VB. But you have to know that VB is specifically, and limited to, Windows.
You won't be creating the next Quake engine in VB. But VB is fine for a text sim. VB is great for database applications as well, which is why many people choose VB. VB's database access is, in my opinion, second only to Borland Delphi.
So if all you want to do is program Windows applications, then there really is no point into learn C++, and you should just go with VB.
I do, however, agree with Bone that is you learn VB it will make learning C++ somewhat harder. If only for the fact that VB does things one way, while C++ does them another. It's hard to change to way of thinking after you get used to a language.
There's a reason why German is easier to learn than Chinese. German's structure is similar to English, Chinese is not.
And that's how you have to look at VB and C++. VB has certain syntax, and C++ does it a completly different way.
If you do, however, feel that one day you might want to break away from the strict Windows programming, then you might as well take the long road and learn C++.
wbonnell is right, programming is one of the easier parts of creating a program. How you do it, the problem solving part of it, will always be #1.
But two things you need to decide before you jump in. 1) What is it I want to do with my programming skills? 2) Which language best fits the way I think?
Well said, and I agree with your points.
Just to back up my point about VB prior to C++ is that VB is very very very loose in regards to many things. My biggest pet peeve is that Option Explicit is not default! This causes sooooo many headaches, it is incredible that this feature survived through to 6.0 (i think VB.NET finally did away with this).
I know people that started with VB and when they try any sort of cross-over, they are stuck in the zany loose world of VB. Mention pointers and every vein on their heads burst open. However, going from c++ to VB, it is only frustrating that you can't easily do things that you are used to doing (even though GUI building is nicer). Just my experience. You mileage may vary.
Bottom line in my opinioin: c++ helps you think like a programmer. VB helps you think about "just getting it done." Is either better? That is up to the individual.
SportsDino
03-11-2003, 03:08 PM
The hardest part is definately coming up with the idea (and getting up the will to type up the code). Like writing a novel you'll have gamer's block and constantly want to revise, and unlike a novel it is much harder to redo stuff later on. Thats why I suggest start with the small stuff, because anything big requires massive preplanning.
Think of FOF. It has a couple major components within it, an engine for simulating the game of football, a roster interface, game plan interfaces, draft/free agency modes, and so on. Among those there are lots of little interconnections, the game plan interface needs to be understood by the simulator... etc.
Although I don't think you need to go to the degree of software engineering (at least the most technical style of it anyway), you'll need lots of little blueprints and models to work off of.
Draft Dodger
03-11-2003, 03:11 PM
the hardest part in programming to me is finding all my damn typos.
:)
wbonnell
03-11-2003, 04:04 PM
Originally posted by sabotai
I do, however, agree with Bone that is you learn VB it will make learning C++ somewhat harder. If only for the fact that VB does things one way, while C++ does them another. It's hard to change to way of thinking after you get used to a language.
<i>snip</i>
But two things you need to decide before you jump in. 1) What is it I want to do with my programming skills? 2) Which language best fits the way I think?
I'm capable of building software in any programming language be it functional, procedural, logical, or object-oriented. Comparing programming languages to written languages is tempting, but not entirely accurate. I have yet to find a programming language that I wasn't productive in a few days- can't same the same thing for a foreign language.
<b>What people need is an understanding of how to transform requirements and/or ideas into software. A programming language won't do it for you. It is merely a tool that. For some jobs you need a sledge hammer; for others, a hammer.
</b>
sterlingice
03-11-2003, 05:45 PM
the hardest part in programming to me is finding all my damn typos.
Ah, debugging. Everyone who has had a programming class and has some basic computer theory is familar with the joys of debugging.
I think, for a challenge, he should start out programming by writing it entirely in Scheme, yeah- that's it! (Boy, that would scare you out of programming forever)
I think without some formal instruction, picking up on C++ is going to be a bit more difficult than doing things the quick and dirty way in VB so someone just starting out should probably go that direction.
Then again, what do I know, I started with QBasic as a hobby and Turbo Pascal in school. Then again, I've done a little tinkering in VB and have had classes where I've had to use Java, C++, ML, and Scheme.
SI
sabotai
03-11-2003, 06:41 PM
"I'm capable of building software in any programming language be it functional, procedural, logical, or object-oriented.
I have yet to find a programming language that I wasn't productive in a few days"
And those who have been around programming a long time can do this. Someone just starting out now as an adult probably wouldn't. At least, not for awhile.
The more languages you know, the faster you'll pick up others. But if all you know is VB, jumping to C++ is going to give you problems.
tucker342
03-11-2003, 10:53 PM
I'm taking a C++ programming class at school, I can't imagine creating a game like FOF4, probably because I'm not advanced enough yet. By the way, debugging sucks.
sabotai
03-11-2003, 11:20 PM
On a related note,
I recently started up a tutorial site for programming. Bear Klaw Tutorials. All I have up so far is 11 tutorials on C++. If any of you would like, especially those who know C++, skim through them, make sure I didn't say anything stupid, or leave out something I should talk about...Being my first attempt at such a thing, I'm sure I'm forgetting a few things, etc.
Bear Klaw Tutorials (http://www.bearklaw.com)
Draft Dodger
03-12-2003, 12:02 AM
thanks Sabotai - looks pretty nifty. I'll take a good look at that tomorrow.
daedalus
03-12-2003, 02:00 AM
Originally posted by wbonnell
I'm capable of building software in any programming language be it functional, procedural, logical, or object-oriented. Comparing programming languages to written languages is tempting, but not entirely accurate. I have yet to find a programming language that I wasn't productive in a few days- can't same the same thing for a foreign language.
I think you're confusing USING the language and using the language for LEARNING how to program. I don't see where either sabotai or Bone said that VB isn't a viable programming language. I did see both go to great lengths to make the point that it is. On the other hand, I do see them making the point that C++ would be the better language for a beginner to start with.
Bonegavel
03-12-2003, 10:13 AM
Originally posted by daedalus
I think you're confusing USING the language and using the language for LEARNING how to program. I don't see where either sabotai or Bone said that VB isn't a viable programming language. I did see both go to great lengths to make the point that it is. On the other hand, I do see them making the point that C++ would be the better language for a beginner to start with.
Right.
My main point is that if your introduction to programming is self-taught VB, you are in for a rude awakening in a transition to c++. I just feel that learning c++ first gives one a better mindset for programming in general.
Personally, I started with BASIC on my Commodore 64, but I have a logical thought process and that doesn't hurt either.
wbonnell
03-12-2003, 10:56 AM
Originally posted by BoneGavel
Right.
My main point is that if your introduction to programming is self-taught VB, you are in for a rude awakening in a transition to c++. I just feel that learning c++ first gives one a better mindset for programming in general.
Personally, I started with BASIC on my Commodore 64, but I have a logical thought process and that doesn't hurt either.
I'm just wondering why people always ask "which programming language should I learn" rather than asking "how do I build software". Typically you don't say "which saw should I use". You ask "how do I learn woodworking".
wbonnell
03-12-2003, 10:58 AM
Originally posted by BoneGavel
Right.
My main point is that if your introduction to programming is self-taught VB, you are in for a rude awakening in a transition to c++. I just feel that learning c++ first gives one a better mindset for programming in general.
IMHO, that's bad advice. C++ has eveolved into such a convoluted mess over the years, that I wouldn't recommend it for a non-technical user (ie someone not formally studying computer science). Rather I would recommend a simpler language like Python, Java, C#, or, yes, even VB.
bamcgee
03-12-2003, 11:40 AM
In my particular case, I'm just trying to realize an idea that I have for a game. As long as I can produce the game that matches my idea, I don't care what language it's in.
Given that it's a windows text game with a lot of database interaction, VB still seems like a logical choice. Hopefully I can design it in a way that minimizes speed issues that I've heard VB can struggle with. The important thing to me is actually building the game, proving the concept and gameplay and not letting the programming language negatively influence the game.
Daimyo
03-12-2003, 01:09 PM
I agree with wbonnel, that the most important thing is to learn the logic behind programming. In that sense I think VB can be a very good tool to learn from because you can really focus on the "software engineering" aspects without getting turned off from all the complexities. Once you master the art of building a program logically its rather trivial to learn a new language.
I'd think the most important thing would actually be learning to write your program in "pseudo-code" (or at least plan it in your mind in that way)... if you do that well, converting to the actual syntax of the language is elementary.
primelord
03-12-2003, 01:57 PM
Originally posted by wbonnell
I'm just wondering why people always ask "which programming language should I learn" rather than asking "how do I build software". Typically you don't say "which saw should I use". You ask "how do I learn woodworking".
Thats a good point, but it still makes some sense to want to know which language you should start with too. If your goal is to write text sim games C++ is probably the way you want to go. Now C++ is probably a little much for someone to start off with if they have no programming experience. So it makes sense for them to learn a simpler language that is structured similar to C++.
For example Perl is good for a beginner, has all the C operators included in it, and you can move to OO programming in Perl too. That gives someone a sound foundation to move on to C++ from. Where as with VB they need to learn a totally different structure.
Your right that you can learn the idea of "software engineering" and those concepts apply to any language, but if your goal is to get to C++ because you have determined that is the right tool for the job you want to do then why start with a language that is going to make the path to your destination more difficult?
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.