• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Need help regarding "should I start learning c++"

 
Ranch Hand
Posts: 99
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Collective Brain,

I'm in a big dilemma and I need help (advices/suggestions anything). I'm a beginner programmer and have been working on Java past 6 months. I'm comfortable with the language but haven't become a pro at it. I'm planning on learning a second language and my interest is in game development and also because C++ always intrigued me. So I'm planning on learning C++. My problem is I'm not sure if I should start learning C++ in my spare time or should I wait for another 6 months or a year so as I become proficient(or more experienced) in Java. But again when I think of a year ahead I feel that I would regret that why I didn't start a year ago. Please help me out. What do you suggest from your own experience.

Thanks and regards,
Mohan.
 
Marshal
Posts: 80093
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Learn C; it uses a different paradigm (procedural programming).
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are feeling thrilled/excited/tingly/squeeeee about C++, then don't wait! Spare an hour everyday,
and satisfy the craving.

That said, if what really thrills/excites/tingles you is in fact *game development*, then as somebody who's had a long time interest in graphics programming
and has dipped hands into stuff like directX and openGL, I suggest the following path:

  • Learn java Swing framework which provides a relatively easy path to familiarize yourself with 2D graphics , coordinate geometry,
    and basic graphics operations like translation/rotations/scaling.
    There are many languages/techniques/frameworks for game development, but whether newbie or veteran, you just can't escape
    the geometry, trigonometry and matrix algebra that underpins the entire field.


  • Still using java swing, write simple 2D games to familiarize with frame rates, motion, clipping, and collision detection


  • Learn javafx framework and graduate to 3D concepts like 3D transformations, cameras, lights,
    perspectives, loading/saving vertex meshes, and rigid body physics.


  • Game development is only part programming; the other more difficult part is *graphics design*.
    Design of textures, sprites, meshes, bump maps, etc.
    You'd need to familiarize with drawing and graphics tools like the free Blender and Gimp, or commercial ones like 3D studio max
    and photoshop.
    These models can then be loaded and rendered using javafx and incorporated into simple 3D games.


  • At this point, you would have become comfortable with 3D primitives. Now the focus can switch to performance optimization techniques, and this is where concepts like
    shaders, GPU rendering, OpenGL and DirectX come in.
    These technologies are accessible from java itself through frameworks like JavaGL, JOGL, LWJGL, etc so you can either familiarize with them using java itself (good enough
    for most games), or switch to the more difficult C/C++ (required for professional game development).


  • C/C++ are in picture here because all games involve a game engine, and complex games require really performant engines.
    C/C++ give the best performance and provide lot of control over memory allocation. So you'd have to become familiar with pointers, memory management, and in case of directx,
    stuff like DCOM pointers and reference counting.
    Getting to this level of C/C++ takes time, so I'd say start right now and put in some time everyday while also parallelly learning all the above stuff


  • Finally, once you've become familiar with all this, you'd have probably written a few small 2D and 3D games and their tiny game engines. So the general principles would be
    familiar to you.
    It's a good idea to next try out some open source game engines and dig into their code, to learn how the professionals do it.


  •  
    Aki Mohan
    Ranch Hand
    Posts: 99
    Eclipse IDE Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Campbell Ritchie wrote:Learn C; it uses a different paradigm (procedural programming).



    Sorry, I didn't get you.
     
    Aki Mohan
    Ranch Hand
    Posts: 99
    Eclipse IDE Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Karthik, thank you for such an insight. I think I'll start learning C++ instead of digging into "if it's the right time".

    Regards,
    Mohan
     
    Ranch Hand
    Posts: 69
    2
    Netbeans IDE C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Please, please learn C++ following the C++11 revision.

    It's difficult to explain to new C++ users, but over time it will become obvious. There is a clear dividing line between C and C++. While it is legal to use C in C++, most of the time this is highly frowned upon and produces the "C/C++" problem (which has given C++ a bad rap for memory leaks and other issues). Using modern C++, it is borderline impossible to write a memory leak, as dynamic memory is automatically managed through RAII techniques.

    It's definitely worth taking the time to learn...although it took me, personally about 4 years to become a bit more than proficient with it. Try not to expect instant gratification.
     
    Campbell Ritchie
    Marshal
    Posts: 80093
    413
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Is C++11 a .NET version?
     
    Luke Leber
    Ranch Hand
    Posts: 69
    2
    Netbeans IDE C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    C++11 is the latest official C++ ISO standard. It's a dream to work with (in my opinion) with tons of new features including a revamped memory and threading model, thread-safe smart pointers, atomics, new static analysis assertions, expanded template system, and the whole nine yards.

    http://en.m.wikipedia.org/wiki/C%2B%2B11

    Shameless self-promotion (example code):
    https://bitbucket.org/DarkHeart/midnight-engine
     
    Aki Mohan
    Ranch Hand
    Posts: 99
    Eclipse IDE Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Luke. Do you suggest this book
    http://www.amazon.com/exec/obidos/ASIN/0133439852/deitelassociatin
    ?

    Or can you suggest any other book?

    Thanks,
    Aakash
     
    Luke Leber
    Ranch Hand
    Posts: 69
    2
    Netbeans IDE C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Aki, I cannot personally recommend any C++ books, as I did not learn from books or formal education. The internet has proven time and time again to be the best aid for my learning style.

    As far as books go, here's a fairly reputable link (in my opinion) http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

    The only one on the list that I've played with is from Herb Sutter ( http://www.amazon.com/dp/0201615622/?tag=stackoverfl08-20 ) -- an excellent book which provided a series of slaps in the face (in a good way) and showed that I wasn't nearly as brilliant as I thought I was. I definitely would not recommend this book until you feel that you've reached a peak in your studies, but eventually I suggest that you definitely add this one to your shelf.

    * Also, I just recalled this page: http://www.seebs.net/c/c_tcn4e.html

    Stay far away from books by Schlidt.
     
    Aki Mohan
    Ranch Hand
    Posts: 99
    Eclipse IDE Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Luke, I appreciate for your help. Also let me know how can I contact you if I have some questions or doubts. Do you mind if I message you here in coderanch.

    Thanks again,
    Aakash
     
    Luke Leber
    Ranch Hand
    Posts: 69
    2
    Netbeans IDE C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Feel free. However I only visit this site every few days normally. To get quicker answers you might consider the forums at cplusplus.com

    I'm also a member there.
     
    And then we all jump out and yell "surprise! we got you this tiny ad!"
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic