Jump to content

  • Log In with Google      Sign In   
  • Create Account

Starting to learn C++ and game programming, what should I learn?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 InD_Games   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 January 2011 - 02:33 PM

Hi!

I have been planning to start learning C++ with a goal to make my own 2.5D platformer someday. However, I'm not quite sure what should I learn, and in which order.

First, I probably should learn basic C++ and make console applications. Im currently in this phase, and I know some basic things ( how to use classes, control structures etc. ).

After that, should I learn WinAPI? If yes, could someone give me link to good tutorial or to really comprehensive book?

Then I should probably choose between OpenGL and DirectX. Which one is better in terms of speed? Also I am planning to develop to consoles aswell, does that make any difference?

Sponsor:

#2 ic0de   Members   -  Reputation: 909

Like
0Likes
Like

Posted 23 January 2011 - 02:48 PM

what you should do is learn both DirectX and OpenGl. If you are you are programming on windows then DirectX is Faster. As for console development PS3 only supports OpenGL and Xbox360 only supports DirectX, however the chances of you getting to program legitimately for consoles is very slim since in order to do so you must get a Dev kit (which are extremely expensive). The only way you could program for consoles is if they were modded or you used XNA and C# for Xbox360, however I don't suggest you learn C# since its the worst language I've ever tried. So my final advice is learn WinAPI then learn OpenGL and Directx so you can shift platforms if you need to.

you know you program too much when you start ending sentences with semicolons;


#3 InD_Games   Members   -  Reputation: 100

Like
0Likes
Like

Posted 23 January 2011 - 02:57 PM

what you should do is learn both DirectX and OpenGl. If you are you are programming on windows then DirectX is Faster. As for console development PS3 only supports OpenGL and Xbox360 only supports DirectX, however the chances of you getting to program legitimately for consoles is very slim since in order to do so you must get a Dev kit (which are extremely expensive). The only way you could program for consoles is if they were modded or you used XNA and C# for Xbox360, however I don't suggest you learn C# since its the worst language I've ever tried. So my final advice is learn WinAPI then learn OpenGL and Directx so you can shift platforms if you need to.


Yeah I tried C# aswell but it just didnt fit my needs. However, doesn't MS accept really good and polished games to XBLA without paying anything ( except that 30% sales royalty ). Because I understood that for example Braid was released in XBLA and Jonathan Blow didn't buy an kit etc.

#4 mhagain   Crossbones+   -  Reputation: 8278

Like
1Likes
Like

Posted 23 January 2011 - 03:11 PM

IME there's not much difference between OpenGL and D3D in terms of performance. It really depends on how your prgram uses the API. Your decision should be more influenced by which coding style you're most comfortable with right now (procedural vs OO), and what platforms you intend running on. The coding style is actually very important. If one style looks completely alien to you you'll effectively be struggling with two new things (and two lots of new concepts) at the same time, and that can hurt.

Be aware that many Windows OpenGL drivers are of rather poor quality, and you might end up spending more time fighting the driver than you spend doing anything productive. Finally, OpenGL can be much easier to get started with (especially if you use the old immediate mode) but difficulties come in later, whereas D3D is almost the exact opposite (you need to start planning your vertex buffer strategy pretty much from the outset, for example).

I second the recommendation that ultimately you should learn both. Each has a different perspective on things (OpenGL tends to abstract the details of the hardware a lot, D3D shoves them in your face) and knowing both can enrich your own body of knowledge.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#5 blubberbert   Members   -  Reputation: 236

Like
0Likes
Like

Posted 23 January 2011 - 03:40 PM

IMHO you should probably go with OpenGL.
well im not really that much into directX but...
- you can port to almost every platform except the xbox360
- window setup code is MUCH easier (just use SDL/GLUT whatever)
- if you are going to do a 2.5D (??) platformer than you probably dont need to worry that much about the driver

anyway i think the choice between OGL and DX is not that important as i found like only 5% of my code actually using the API

i dont know wether its a good idea to think about consoles already if youve just started to learn C++...
by the way you may want to have a look at smartphone developement too ;)
------------------------------
Join the revolution and get a free donut!

#6 rip-off   Moderators   -  Reputation: 8727

Like
1Likes
Like

Posted 23 January 2011 - 03:42 PM

Writing games takes practise. You practise by writing small games. I would recommend that once you are comfortable with C++, you use a library such as SDL to write some 2D games. You will learn a lot about how to design systems by doing so, and besides you'll have a couple of games you can show off. The mistakes you make writing your first few games will serve you well later on.

I don't suggest you learn C# since its the worst language I've ever tried.


There is a subjective opinion if ever I saw one. Many, many developers disagree with you. C# is an excellent language by most common criteria. Have you any objective criticisms to make? If not, I suggest you do not dissuade people from using it, particularly impressionable beginners.

#7 InD_Games   Members   -  Reputation: 100

Like
0Likes
Like

Posted 24 January 2011 - 06:07 AM

Thanks for answers everyone!

Still I'd like to know answers for these questions;

XBLA doesn't require Dev Kit if the game is good enough and you can convince MS that the game will be profitable ( how else indie developers would get their game to XBLA?), am I correct?

How well do I have to learn WinAPI before I continue to graphical programming? Or should I learn WinAPI and DX/OpenGL at the same time?

Is there any kind of free/ really cheap for personal use game engine, that I would be able to make 2D/2.5D games which are a bit more complex ( I was thinking about similiar features as Braids time-manipulation ) or should I learn to program game engine myself? Of course I wont be starting my game anytime soon since I have to learn first, and after that it will take a long time before it will be even playable.

Should I learn to use UML or pseudocode? They just seem so boring and useless, but I have no idea yet how hard game developing can be, so please could someone give me any opinions on this?

As for C#, I just didn't personally like it, and my future dream-job is in game business so C++ would probably be better choice considering that as well.

#8 NEXUSKill   Members   -  Reputation: 466

Like
1Likes
Like

Posted 24 January 2011 - 10:50 AM

Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

C++ can be extremely overwhelming for a beginner, and it tends to force you into more low level concepts that step more into the field of Engine or Framework development than Game development itself, if you are however bent on learning C++ and want to develop for consoles as well as windows you really shouldn't "decide" between OpenGL and DirectX, rather you should aim to understand that while they do have a few differences, some of them quite radical, a game or engine should be able to run with either of them.

This last objective I've mentioned is called API Agnostic Engine, in these types of engine, you create something called a Bridge between your application and the APIs. A bridge basically translate the specifics of an API such as DirectX or OpenGL into a common interface so the rest of your application does not need to know the specifics of either of them.


Once again, these issues usually presented by C++ may go too deep for a beginner, I would insist on a more abstracted framework like the ones I've mentioned above.


Game making is godlike

LinkedIn profile: http://ar.linkedin.com/pub/andres-ricardo-chamarra/2a/28a/272



#9 mhagain   Crossbones+   -  Reputation: 8278

Like
0Likes
Like

Posted 24 January 2011 - 11:24 AM

How well do I have to learn WinAPI before I continue to graphical programming? Or should I learn WinAPI and DX/OpenGL at the same time?


You really don't need to know much of the Windows API to get started. Just enough to create and show a window and handle a basic message loop; chapter 1 of any Windows programming book in other words.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#10 AverageJoeSSU   Members   -  Reputation: 516

Like
1Likes
Like

Posted 26 January 2011 - 10:33 AM

Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.


I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.

------------------------------

redwoodpixel.com


#11 ammar26   Members   -  Reputation: 106

Like
0Likes
Like

Posted 26 January 2011 - 11:21 AM

Start yourself by writing first small 2D games in C++ using SDL
then after practice move towards OpenGL and D3D

#12 InD_Games   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 January 2011 - 01:02 PM


Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.


I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.


Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a great game idea, but it really pisses me off that I can't start my game anytime soon :)

#13 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 26 January 2011 - 02:13 PM



Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.


I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.


Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a great game idea, but it really pisses me off that I can't start my game anytime soon :)


You cant use c++ with XNA/Unity/Actionscript, but you can use C# with Unity.(btw Unity is really easy to use and you can get some really impressive result fast)
If you want to go with c++ i suggest you stick with SDL but if you never programmed before its gonna be hard.
SDL and XNA isnt the same thing, SDL wont run on the xbox360 and dont support 3D(correct me if am wrong)

#14 InD_Games   Members   -  Reputation: 100

Like
0Likes
Like

Posted 26 January 2011 - 03:31 PM




Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.


I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.


Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a great game idea, but it really pisses me off that I can't start my game anytime soon :)


You cant use c++ with XNA/Unity/Actionscript, but you can use C# with Unity.(btw Unity is really easy to use and you can get some really impressive result fast)
If you want to go with c++ i suggest you stick with SDL but if you never programmed before its gonna be hard.
SDL and XNA isnt the same thing, SDL wont run on the xbox360 and dont support 3D(correct me if am wrong)


Well I am always ready for challange :) And I have no intention to release any game that I make with SDL. I will use it only to learn and to expand my knowledge.

#15 AverageJoeSSU   Members   -  Reputation: 516

Like
0Likes
Like

Posted 26 January 2011 - 03:39 PM

Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a great game idea, but it really pisses me off that I can't start my game anytime soon :)


Who said anything about C#?

Forget about languages at this point, you shouldnt be basing what technology you want to use based upon what languages you know, you barely know any ;).

Also, Learning C++ and making a game engine in C++ and making a GAME in C++ are all COMPLETELY different and require a lot of xp to even do!

you earn that xp by mucking around with something like Unity.

Unity is extremely easy to learn, and actually fun, the programming languages are boiled down to basic scripting (something you should be starting with for games anyways).

Now like i said, if you learn C++ AND make a game in unity (which you can do with minimal c++ knowledge), then some day the lightbulb will go off and you will understand what you need to do to make a game engine based in C++.

-J

Two last important things, I laugh every time i hear somebody complain about a language they dont like. I used to HATE Java with a passion, and now I have a full time job helping develop the Java libraries. So the language i used to despise is actually keeping me employed.

The reality is we are in a time in technology where people are learning to make products modular. With modularity comes different scopes and with different scopes comes different requirements and with that comes... you guessed it! different languages! My opinion is that yes learning one language is important and it should always be your home base, but if you want to make a game nowadays, you will be able to encounter quicker success if you don't set a mental limitation like that. And also my opinion, C# is a great language.

------------------------------

redwoodpixel.com


#16 JaFFaCaKe   Members   -  Reputation: 100

Like
0Likes
Like

Posted 27 January 2011 - 09:13 AM

Sorry to hijack your thread abit,

But what would you guys suggest for someone like me who has done Java and OpenGL in java, who wishes to learn C++ and gain experience? Maybe even great a game that would be used in a portfolio?

I'm learning C++ and want to work on a game that will not only help me learn the language, but be useful when finding a job.

#17 AverageJoeSSU   Members   -  Reputation: 516

Like
0Likes
Like

Posted 27 January 2011 - 11:34 AM

Sorry to hijack your thread abit,

But what would you guys suggest for someone like me who has done Java and OpenGL in java, who wishes to learn C++ and gain experience? Maybe even great a game that would be used in a portfolio?

I'm learning C++ and want to work on a game that will not only help me learn the language, but be useful when finding a job.


I would do the same thing i mentioned earlier, except you would catch on quicker since you have a little more experience.

------------------------------

redwoodpixel.com





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS