Jump to content
  • Advertisement
Sign in to follow this  
BUnzaga

One small step in Java, one giant leap towards C++

This topic is 3411 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

As I am ending my second year of school, I have searched around a bit to see what most game companies are looking for in programming canidates. The main thing that stuck out was somene fluent in c/c++. My school has been teaching us via Java, so I know it pretty well. I haven't jumped into the 3d aspects of Java, but I have made my own basic 2d engine which takes in keyboard and mouse input, plays sounds, uses a double buffer for displaying images, multi-threads for streaming in animation sequences, etc. It isn't super fancy, but its ok. With it I made a tetris clone, and shared it with a few classmates which made their finals with it, etc. I also know javascript quite well, as it pertains to the DX Studio engine, but not in an HTML environment. So now I am on my quest to self-learn c/c++ and although I know how to use google, and will be doing my own research, I thought I would stop here and see if there was anyone who could give me a friendly nudge in the right direction. I have MS Visual Studio 2008 via the MSDNAA, but all I have done is open MS Visual C++ and click on new project, then realize I had no idea what the heck anything did, and figured I should start trying to locate some 'game oriented' tutorials on how to program with c++. With Java, I have also made a simple memory card game where you have to match different cards, a mock video store system, and a tile map engine which just loads a tile map based off of a multi-dimensional arrays (with different tiers for large objects like trees, etc). With DX Studio I have made all kinds of games and proof of concept games, and I have written several tutorials on the engine, etc. What I am getting at, is I am not a noobie at game programming, I just need some info on how to program with c++. Thanks in advance and sorry in advance, I know some of you might get pissed because I am posting this, but I figured someone who just went through this might be able to help streamline the learning process.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by BLiTZWiNG
You sound more than knowledgable enough to pick up C++ without a hassle. What kind of nudge are you looking for?


Seconded. Learning your second language will not nearly be as arduous as your first, and it only continues to get easier; the vast majority of programming languages operate by the same basic principles that were useful to you in Java. You might want to Google for "C++ for Java programmers" to help catch you up on specific changes (and to be honest, there's a few of them in C++; search the forums here for "undefined behavior" [wink]), but you won't be starting from square one.

Share this post


Link to post
Share on other sites
Hey thanks guys, I have been searching for info on my own too, so here are a few things that I found, perhaps to help anyone else that might stumble accross this in the future:


http://www.relisoft.com/book/lang/scopes/1global.html
Clicky
http://msdn.microsoft.com/en-us/visualc/default.aspx
Clicky
http://www.gamedev.net/reference/list.asp?categoryid=20#214
Clicky

I guess just any links that you might have found useful, primarily related to someone new to C++ syntax or file structure.

Share this post


Link to post
Share on other sites
Try these for a start. I'm sure there are better ones out there that I don't know of.

http://www.cplusplus.com/doc/tutorial/
http://www.cprogramming.com/tutorial.html

The Microsoft docs are very thorough but can be a little dry.

Share this post


Link to post
Share on other sites
I'd suggest picking up a book and working through it. C++ has a lot of little idiosyncrasies from the legacy of C so much so that there are many language concepts that exist on the low level but which should in practice be avoided in favor of standard library options for most cases. These cases may not be readily apparent without a comprehensive guide even if you are a good programmer in another language using std::vector instead of built in arrays and std::string instead of char * are two such basic examples.

This is not to say that you should avoid learning how to use the base language features by -any- means, just that you have to approach C++ in a few steps. First, learn the core language (variables, arrays, types, pointers, functions, classes, templates and more), then learn about the STL (which is part of the language, but referred to separately often) and other standard library features. Then finally read some advice from experienced C++ programmers detailing when it is most appropriate to use which structures.

After this you should have a solid base of knowledge which you can grow with your own experience.

Much of this will come more naturally because you come from Java, I am not suggesting it will take a terribly long time to learn about the specific syntax of similar ideas, just suggesting you should start from the ground and work your way up to make sure your assumptions don't shoot you in the foot.

Share this post


Link to post
Share on other sites
I second blitzwing's suggestion of http://www.cplusplus.com/doc/tutorial/
I went through that having already learned VB6, and found most of it very easy to read through seeing as you already understand the concepts, and you mainly just need the syntax etc. The extra OOP stuff that isn't there in VB6 was the only part that took a bit more reading seeing as it was new to me, but coming from java should make that even easier. That tutorial also serves as a good reference for the language to come back to if you want to check something in the future. The site also has an excellent reference for the string class, STL, etc- http://www.cplusplus.com/reference/

cheers,
metal

Share this post


Link to post
Share on other sites
I think the reason behind companies wanting "fluent in c/c++" is less of a language thing and more of a programming thing. It's really easy to pick up a language once you understand the principles of programming. Sure, you might be slightly slower in the first few weeks but that is expected in any job. Basically, when you hear "fluent in language __" it just means "able to program in a paradigm that __ uses".

Share this post


Link to post
Share on other sites
I don't think you will have any problem learning it.
You will probably be a very good C++ programmer when you've learned it since you started out with Java instead of C (as some schools do). I still see too many C++ programmers always using chars and arrays..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!