Can i go straight to game programming with C++

Started by
19 comments, last by JustChris 14 years, 2 months ago
I'm working on my fourth commercial game, and I do that "boring crap" on a daily basis. If you don't want to do "boring crap", steer well clear of game programming, because there's a lot of it. Don't worry too much about whether you *can* do it, spend some time deciding if you even want to. TBH, it doesn't sound like you do.
Advertisement
Quote:Original post by Ariste
So try making a simple game. Take the skills you're learning and apply them to what you like. Make a Guess-The-Number game, or a text-based adventure game, or whatever you feel is interesting and feasible given your level of ability.

^This. I remember doing this sort of thing in QBasic as a 15-year-old, it was very rewarding. Especially the text-based adventure games.
When I was a kid I tried for years to make a game. I learned C, OpenGL, SDL, etc. but generally I just failed at making a playable game; I could do lots of petty FX and terrain engines, but I couldn't put it together. Things would break, I wouldn't understand why. I couldn't fit the thing together. I actually got bored and gave up programming.

Then - long story short - I wound up doing some web and application programming.

And after a few years of that, when I took another crack at making a game, I puked one out in a week. (It is... Semi-playable.)

In hindsight, everything I've learned up to this point is important to game programming. Its just programming. If you can write a word processor, you can write a game. Its an application to fit a specification. Yeah, it probably uses DirectX instead of Winforms but its still just an application, with all kinds of collections, arrays, I\O crap behind it. Same games even have a relational database on the back-end and most have integrated scripting.

If you can't get excited about all that, you will not enjoy writing games.
Quote:Original post by milosss
I dunno, i just don't think that writing a program which will bring up some numbers will help me get closer to making a game.


Then, are you already able to write a program that outputs numbers?

Step 2: Write all even/uneven numbers.
Step 3: Write all those numbers squared.
Step 4: Write factorials of 1..10 iteratively
Step 5: Write factorials of 1..10 recursively
...
Step X: Write some amount of random numbers, but bubble sorted
Step X+1: Write some amount of random numbers, but qsorted
Step X+2: Write some amount of random numbers, but bucket sorted
...
Step Y: Write pixels, which happen to be numbers under the hood.


Of course not every step is needed, but at first you must get a feeling to interpret numbers as scores, positions, flowers, cakes, marshmellows, anything. Even slime, which btw was hip in the 90s.
Can i go straight to writing novels with Japanese?

Do you think that a beginner like me can go straight to learning about novels insted of all the boring crap which has pretty much (as for me) nothing to do with novel writing?
Well, anything is possible but is it something that is possible for anybody who wants to learn it like that?
I dunno, i just don't think that writing a sentence which describes my breakfast will help me get closer to writing a novel.

Can i go straight to playing a symphony with Violin?

Do you think that a beginner like me can go straight to learning about playing a symphony insted of all the boring crap which has pretty much (as for me) nothing to do with symphonies?
Well, anything is possible but is it something that is possible for anybody who wants to learn it like that?
I dunno, i just don't think that playing a scale will help me get closer to playing a symphony.

Can i go straight to being in the X Games with a Skateboard?

Do you think that a beginner like me can go straight to learning about sweet tricks insted of all the boring crap which has pretty much (as for me) nothing to do with sweet tricks?
Well, anything is possible but is it something that is possible for anybody who wants to learn it like that?
I dunno, i just don't think that balancing a skateboard will help me get closer to doing sweet tricks.

Can i go straight to a fields medal with Mathematics?

Do you think that a beginner like me can go straight to learning about fields-medal math insted of all the boring crap which has pretty much (as for me) nothing to do with winning a fields medal?
Well, anything is possible but is it something that is possible for anybody who wants to learn it like that?
I dunno, i just don't think that adding up some numbers will help me get closer to winning a fields medal.

Can i go straight to being filthy rich with investing?

Do you think that a beginner like me can go straight to learning about getting filthy rich insted of all the boring crap which has pretty much (as for me) nothing to do with being filthy rich?
Well, anything is possible but is it something that is possible for anybody who wants to learn it like that?
I dunno, i just don't think that reading a finance chart filled with some numbers will help me get closer to being filthy rich.

etc.
Do you work in the real-world? That "boring crap" has taught me a lot in my field. I work with clients ranging from the health-care industry, to manufacturing, publishing, etc. and I have benefited from them all. From database programming, XML, EDI, (list another 1000 things), etc. That "boring crap", as you will soon learn should you keep this career, is going to be your bread and butter for a while.

Game programming takes an in-depth knowledge of math, AI, audio, graphics, IO, etc. so if you have trouble doing the simplest of tasks then you're in for a world of frustration. Like others have mentioned; there is no magic bean that will spit you out the next greatest MMORPG. It's takes years of dedication, blood, sweat, and tears. You are going to hit roadblocks when something blows up in your code. Are you dedicated enough to spend an hour, five hours, three days, etc. researching and resolving the issue?

If you do not have the heart you are not going to succeed... 99% of the programmers on here, programmers I know personally, etc. have all gotten to where they are by having their heart set on it. If you are not willing to live and breath it; then it's not for you. If you don't get excited about something that you just wrote and are proud of; then it's not for you. If you don't look forward about working on the next task; then it's not for you. You have to take the good with the bad. There are some days where I feel "oh here we go again... more of this %insert project name%", but I have a lot more days where I feel "F**k yeah! Let's do this!".

So I pose one question to you. Looking deep in your heart, is it for you?

If you have 1 ounce of doubt then it's not for you. No passion = No heart = failure.
Quote: Do you think that a beginner like me can go straight to learning about game programming insted of all the boring crap which has pretty much (as for me) nothing to do with game programming?


Every single thing is related for game programming.
Printing numbers/strings in console=useful as hell for debugging, and testing separate sections of your engine to see if they work.

Writing TCP/UDP sockets=networking/making multiplayer game.

Math, logics, and every single other thing can be applied to games. So no, you cannot skip the boring stuff. You'll use it every single day in game devving as part of making what you really want to do. Eventually it'll become something of a routine you'll do every day, but making that simple number printing won't be the goal but merely a few 5% or less of the subsystem of a game you'll be testing.

If you want a quick way from going "I never/barely programmed in my life" to "I made a game" use Game Maker.

Also, I have to agree with Steve132, it's how you sound to people already making games.
Quote:Original post by Steve132
Can i go straight to writing novels with Japanese?
Japanese people would answer: yes.

Quote:Can i go straight to playing a symphony with Violin?
As long as it is a modern symphony exploring cacophony, probably yes.

Quote:Can i go straight to being in the X Games with a Skateboard?
Absolutely - think of all the subscriptions you would get on youtube. People love seeing others get hurt in most horrible ways.

Quote:Can i go straight to a fields medal with Mathematics?
Strangely enough - yes. Math is peculiar in that its fundamentals do not strictly require training. Some concepts, as rare as they might be these days, are truly merely a matter of genius. In practice however, most awards these days are result of teamwork and excruciating proofs.

Quote:Can i go straight to being filthy rich with investing?
Yes. Inherit 20 billion dollars, invest 10 billion, lose all of it - you are filthy rich.


It is always important to put things into context. Tom is right: anything is possible.
Perhaps, as a beginner, the OP is having a difficult time understanding how the mundane database programming found in a lot of "beginner C++" material is applicable to games. I confess to (a) being bored dealing with student names, gpas, class hours or account numbers, credit card numbers, account balances for weeks at a time particularly when (b) I was having a hard time determining how I would carry over the information I was being taught to a game. Not everybody learns the same way. Sometimes banging your head against the wall writing databases is not going to be the best way for somebody to learn the concepts. I know that for me personally, no matter how many dozens of times I read about pointers, polymorphism, inheritance, streams, etc. and copied the code for, say, a pet store database into my DE, I truly had no idea of what they were talking about until I actually started trying to write games.

Certainly there is some complete beginner material out there oriented toward games (I wish I had Dawson's book when I started, for example), but there are far more general C++ introductions out there than game-oriented ones.

To the OP: try writing some games. Tic-Tac-Toe for example, or look up old games like Hunt the Wumpus, Super Star Trek, and Colossal Cave Adventure and try to port them to C++. Atariarchives has a nice collection of fairly detailed articles on many old BASIC games that you can use as pseudo-design documents for similar games. When you come across a programming problem you don't know how to handle in C++, that's an opportunity to do an internet search or come to the forums and learn about how to do what you want to do with the game. Sometimes people have already tried porting these games and made their source code available which can help you get a grasp of how they can be written in C++. Alternatively, try and tackle the game in the C++ Workshop 1 on this site and use the source code offered by contributors in the thread as a reference to solve problems when you get stuck.

There are a lot of fun little games that can be written for the console in a weekend. When you've done enough of those that you're getting bored, then move on to graphics or whatever. Just realize that learning to program professional-quality games starting as a complete beginner is not something that can be done in a couple months (outside of simply copying and pasting other peoples' code). If you are that much more interested in a finished game than learning programming, perhaps you should take a look at publicly available game engines and development kits?
Quote:Original post by milosss
Do you think that a beginner like me can go straight to learning about game programming insted of all the boring crap which has pretty much (as for me) nothing to do with game programming?


No.

--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet

This topic is closed to new replies.

Advertisement