Sign in to follow this  

I know C++...

This topic is 4559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know C++ and I want to be a game programmer so I'm guessing I have to learn Win32, right? If so, what do I learn after that? I want to learn something that I will use later on like Direct3D or OpenGL, but I'm not sure which is better to learn and which one more companies require you to know. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Win32 is definitely a good step in the right direction. However most games will only use a small subset of Win32 functionality, mainly the WinMain() function and some sort of windows procedure function, commonly WndProc(). Once you get the main game loop out of Win32 you'll have all you really need for a lot of games. That's not to say you shouldn't learn all you can about Win32, as it does have a lot to give you, and it's always best to know more then not. As far as what API you should learn, a lot of pc and all xbox games are made with directX, but a lot of pc games are also made using OpenGL. They both are good to know, but as far as what companies look for is really up in the air. If a company is strictly Xbox then they will want DirectX more, but it's always good to know both. They will both get the job done, the only real difference being small syntactical ones. If you know the basics behind one, the other should come rather easily. Hope that helps, good luck.

Share this post


Link to post
Share on other sites
Win32 is always good to have as background, look at:

- How to create windows
- Play a bit with the GDI (so you know how it works)
- Learn how windows uses messages
- Look a bit at multithreading
(The ppl that use C# would say some of the above is redundant)

I can recommend SDL as a next stepping stone. I don't think big companies use it, but it will give you the best experience in game programming in the least amount of time.

After that you can look into DirectX or OpenGL.

Hope that helps

[EDIT]Oh, and the forum FAQ is also a good place to start[/EDIT]

Share this post


Link to post
Share on other sites
Thanks everyone. You have been a great help. I decide to learn Win32 and then learn DirectX and later I'll move on to OpenGL.

I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


There is no point... It is a waste of time really...

Share this post


Link to post
Share on other sites
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


Are you a big company?

Share this post


Link to post
Share on other sites
Quote:
Original post by Raduprv
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


Are you a big company?


I'm going to be one. :D

Share this post


Link to post
Share on other sites
Quote:
Original post by Vladk10000
DirectX and later I'll move on to OpenGL.


Once you begin DirectX, any look at OpenGL will be one of disgust. ;)

</self fantatical bias>


Share this post


Link to post
Share on other sites
What's really important is that you understand your 3D fundamentals such as matrices and vector math. OpenGL and Direct3D are just fancy ways of passing the actual calculation of such things off to special hardware. When it comes down to it, DirectX and OpenGL are just 2 common syntaxes for expressing the underlying operations. If you understand what's actually happening behind the scenes, you shouldn't have any problem getting up to speed on either API in a reasonable amount of time. At digipen, we write a software 3D T&L engine that processes all the way from the initial model and matrix data all the way through each individual pixel.

In my experience and from other people, OpenGL seems to be the easiest to get started with though, for the simple fact that simply getting Direct3D up and running is fairly complicated. OpenGL is open, portable, and has been around several years more than Direct3D so it is more mature. It has been proven to scale well to limited environments such as now-antiquated workstations, to graphics super-computers and even the upcoming Playstation 3 (which will support a scaled back version of OpenGL called OpenGL ES.)

Most companies don't care a whole lot about which API(s) you know unless they're hiring you to be the graphics guru. Knowing the fundamentals is more key. They're not likely going to ask "Show us how to do X in Direct3D/OpenGL" but more likely "Derive a 4x4 homogenous matrix that translates a vector 2 units in the positive X direction and 5 units in the Z direction, then rotates 90 degrees about the Y axis." They'll probably ask something more complex, but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice.

Also, before you delve into Games, make sure you really do have a firm grasp of C++. There are a lot of people who read "C++ in 21 days" and think the book was 1000 pages and that there can't possibly be any more to learn. Wrong. If you don't have at least one good reference book, such as Stroustrup's "The C++ programming Language", then you don't know C++. In addition to C++ syntax and general use, you should also be familiar with recursive algorithms, the C++ standard library, design patterns, data structures(lists, stackes, queues, hash tables and *TREES* for example) and memory managment/managers, among other things.

Do make sure you undertand the fundamentals, as for the API, I personally recomend OpenGL.

Good luck.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravyne
What's really important is that you understand your 3D fundamentals such as matrices and vector math. OpenGL and Direct3D are just fancy ways of passing the actual calculation of such things off to special hardware. When it comes down to it, DirectX and OpenGL are just 2 common syntaxes for expressing the underlying operations. If you understand what's actually happening behind the scenes, you shouldn't have any problem getting up to speed on either API in a reasonable amount of time. At digipen, we write a software 3D T&L engine that processes all the way from the initial model and matrix data all the way through each individual pixel.

In my experience and from other people, OpenGL seems to be the easiest to get started with though, for the simple fact that simply getting Direct3D up and running is fairly complicated. OpenGL is open, portable, and has been around several years more than Direct3D so it is more mature. It has been proven to scale well to limited environments such as now-antiquated workstations, to graphics super-computers and even the upcoming Playstation 3 (which will support a scaled back version of OpenGL called OpenGL ES.)

Most companies don't care a whole lot about which API(s) you know unless they're hiring you to be the graphics guru. Knowing the fundamentals is more key. They're not likely going to ask "Show us how to do X in Direct3D/OpenGL" but more likely "Derive a 4x4 homogenous matrix that translates a vector 2 units in the positive X direction and 5 units in the Z direction, then rotates 90 degrees about the Y axis." They'll probably ask something more complex, but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice.

Also, before you delve into Games, make sure you really do have a firm grasp of C++. They're are a lot of people who read "C++ in 21 days" and think that the book was 1000 pages and they're can't possibly be any more to learn. Wrong. If you don't have at least one good reference book, such as Stroustrup's "The C++ programming Language", then you don't know C++. In addition to C++ syntax and general use, you should also be familiar with the C++ standard library, design patterns and data structures, among other things.

Do make sure you undertand the fundamentals, as for the API, I personally recomend OpenGL.

Good luck.


Wow thanks, that was very helpful. :)

Share this post


Link to post
Share on other sites
No problem. I appended a little more to the last paragraph when I went back to fix some grammatical errors, although I noticed another :( anyhow, didn't add much, just a few more examples of what else to be familiar with.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravyne
In my experience and from other people, OpenGL seems to be the easiest to get started with though, for the simple fact that simply getting Direct3D up and running is fairly complicated.


In fact DirectX9 initialization is much simpler than openGL... I guess you never coded anything with DirectX9, right? DirectX complexity is nothing more than a myth from people who used DirectX7 or previous versions, or never used DirectX at all [wink]...

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravyne
Most companies don't care a whole lot about which API(s) you know unless they're hiring you to be the graphics guru. Knowing the fundamentals is more key. They're not likely going to ask "Show us how to do X in Direct3D/OpenGL" but more likely "Derive a 4x4 homogenous matrix that translates a vector 2 units in the positive X direction and 5 units in the Z direction, then rotates 90 degrees about the Y axis." They'll probably ask something more complex, but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice.


Which is a good reason to forget openGL because most tutorials (Nehe included) will teach you to use "glRotatef()" and "glTranslatef()", instead of creating transformation matrix... (like you normaly do in DirectX for example) [lol][lol][lol][lol][lol]

Share this post


Link to post
Share on other sites
It isn't really important to know exactly how to create a translation matrix, what is important is that you know how to combine transformation matricies to give you the transformation you want and how that transformation can then be applied to verticies, normals etc.

Quote:
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


What you need to use is the right tool for the job and as you're a beginner the job is creating some simple (ish) games to introduce you to game develop and the right tool for this is SDL (not that this is the only tool, Allegro would be another good choice). Anyway SDL is used in the linux port of UT 2K3 (and several other linux ports of big name games) and it was used because the makers of UT 2K3 decided it was the right tool for the job.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


Euh, GarageGames is not a big big company, but they are growing steadily. And if I am not mistaken, their game engines use SDL to some extend.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravyne
but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice


Why would a company want to see me do linear algebra / matrix translations on paper? Once you have fast math functions, it's way more important how you use them, not that you can do them manually (on paper or not).

A more reasonable question employers would ask would be something like, how would you implement object x with functionality y. Something that would require use of vector math, matrix translations, cross products, etc.

And if graphics position, something like "How would you implement effect x?" that required per-vertex math...

Share this post


Link to post
Share on other sites
Quote:
Original post by Bulma
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


There is no point... It is a waste of time really...

Would you care to back up such a statement with any points at all?

Share this post


Link to post
Share on other sites
Quote:
Original post by Chris81
Quote:
Original post by Ravyne
but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice


Why would a company want to see me do linear algebra / matrix translations on paper? Once you have fast math functions, it's way more important how you use them, not that you can do them manually (on paper or not).
I've seen it where you had to write functionality to do this sort of thing. I think that makes sense because anyone can memorize a few API calls without actually having any idea how they work. Again, it depends upon what your intended work will be and such.

Share this post


Link to post
Share on other sites
Quote:
Original post by Vladk10000What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


???????

UT2004.

FYI, the main benefit of SDL is that it is cross platform, not it's speed.

Share this post


Link to post
Share on other sites
Quote:
Original post by Brandon N
Quote:
Original post by Bulma
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


There is no point... It is a waste of time really...

Would you care to back up such a statement with any points at all?


Of course...
SDL provides nothing more than for example DirectX... Its only purpose is easier porting to other platforms. Unless Vladk10000 is going to port something, which I doubt, this is beginners thread after all, what can SDL do good to him?
Of course if he has LOTS of time, he can learn everything: DirectX, openGL, SDL, MFC, .NET, Python, java, asm, Cobol[lol], etc...
Life is short, learn something what can you use now, not something that maybe you`ll use one day... [wink]

Share this post


Link to post
Share on other sites
Quote:
Original post by Bulma
Quote:
Original post by Brandon N
Quote:
Original post by Bulma
Quote:
Original post by Vladk10000
I have another question. What's the point of learning SDL? I know it's fast, but big companies don't use it and you don't benefit from it except if you make a game and start selling it.


There is no point... It is a waste of time really...

Would you care to back up such a statement with any points at all?


Of course...
SDL provides nothing more than for example DirectX... Its only purpose is easier porting to other platforms. Unless Vladk10000 is going to port something, which I doubt, this is beginners thread after all, what can SDL do good to him?
Of course if he has LOTS of time, he can learn everything: DirectX, openGL, SDL, MFC, .NET, Python, java, asm, Cobol[lol], etc...
Life is short, learn something what can you use now, not something that maybe you`ll use one day... [wink]


It also allows you to create a window in two lines of code (three if you count declaring an SDL_Surface). The main benefit for newbies is that it's EASY, not that it's cross-platform... Plus you can use OpenGL with it, and you don't have to worry about all that Win32 crap for that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Chris81
Quote:
Original post by Ravyne
but the idea is that they want you actually DO IT (on paper) rather than recite code-listings from the API of choice


Why would a company want to see me do linear algebra / matrix translations on paper? Once you have fast math functions, it's way more important how you use them, not that you can do them manually (on paper or not).

A more reasonable question employers would ask would be something like, how would you implement object x with functionality y. Something that would require use of vector math, matrix translations, cross products, etc.

And if graphics position, something like "How would you implement effect x?" that required per-vertex math...


That would be true if all you used matrices and vectors for was graphics, but thats not the case. Matrices and Vectors show up in every facet of game programming. They are used in Audio, Physics, GUIs, and even the representation of the objects internally. If there's one thing you SHOULD be able to do is understand Linear Algebra. I do Physics and Graphics every day and I am buried up to my elbows in matrices :). If you don't know how to do Linear Algebra on paper, you're not going to be able to make heads or tails of the debugger representing a matrix or a vector.

Share this post


Link to post
Share on other sites

This topic is 4559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this