Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 28 Nov 2004
Offline Last Active Jan 02 2015 01:12 PM

#4967978 "Must-Learn" Languages

Posted by scyfris on 09 August 2012 - 10:28 PM

I deal almost exlusively with C/C++ code, and I have done Java. I will say that learning C or C++ will expose you to core programming fundamentals (such as memory management, allocations on stack vs heap, object-oriented design, etc). I love Java for what it is, but I think if you are really looking to learning programming techniques which extend over all platforms, C or C++ would be a good choice for your projects. EVERYONE needs to know about pointers, and IMHO everyone needs to know about dynamic memory allocation and stack vs heap allocation. With C and C++, it is impossible to do any amount of coding for too long without running into memory leaks, stack/buffer overflows, segfaults, etc. These bugs are the bain of programming existance because they are very difficult to debug. Sometimes days can be wasted before tracking down a hard-to-find memory leak. That being said, the experience of having and fixing these bugs is something you will need if you want to be a serious programmer.

Learning at least one scripting language is good as well. Scripting languages are built to make programmers' and users' lives MUCH easier by allowing you to write scripts to perform menial tasks, or tasks in which programming Java or C++ would be overkill. Tasks that rely on using native system commands are good candidates. I would recommend Perl or Python since these two are highly documented. highly used languages. Also, knowing a scripting language is good if your looking for jobs in industry, or if your looking to make your life easier. From a learning perspective, these will show you how easy high-level interpreted languages can make your life. Learning C/C++ will make you appreciate these languages even more.

#4967836 Topics to master in C++ before advandce to next level

Posted by scyfris on 09 August 2012 - 10:39 AM

Followup question: where should I begin learning the more esoteric C++ stuff?

There are a few places. I would recommend checking out the C++ newsgroup comp.lang.c++.moderated (http://www.gotw.ca/resources/clcm.htm), there are always some crazy C++ topics going on in there, and I learn something everytime I read it.

Another set of books is the Essential C++ and Essential STL books, as they cover some basic things as well as overlooked things (such as the STL vector <bool> being specialized in its implementation (which is unlike the rest of the STL)).

Articles by Andrei Alexandrescu or Herb Sutter usually cover some advanced topics.

Also, if you are interested in esoteric template stuff, check out template metaprogramming examples implemented in C++. (http://www.codeproject.com/Articles/3743/A-gentle-introduction-to-Template-Metaprogramming)

it really worth to learn all new C++11 features in order before advancing into creating games or other complexed applications?

IMHO no. In fact, relying on C++ 11 features may prevent you from writing good cross-platform code as it is only supported by the newest compilers, and even then it seems implementations vary widely compared to implementation of older C++ features. Also, I haven't see much code that uses C++11 features. Honestly, you're better off not using it until you really have a lot of experience in programming and game creation. I would even turn to third party libraries such as Boost first which have a lot of C++11 functionality, but at the additional benefit that it is more portable.

BTW, I have been programming in C++ for 6+ years, and I have never needed C++11 type functionality. It has some really usefuly features, and I am getting into using them now mainly for specialized applications, but it certainly is not nessecary. I would never use it in open source software i would release to the publice. I would recommend getting in the habit of using smart pointers and the such, but unfortunately a lot of real production code doeesn't use these (at least that I've seen).

That's my opinion on C++ 11, but I welcome any opposing views!

#4967833 Cone Tracing and Path Tracing - differences.

Posted by scyfris on 09 August 2012 - 10:15 AM

That being said, I still wouldn't recommend implementing this paper if you are new to this field, although it would be interesting to implement the octree-only part as you'll learn a lot about how all these data structures are fitting together within the GPU. If you decide to do that, please let us know how it went :-)

#4967535 Topics to master in C++ before advandce to next level

Posted by scyfris on 08 August 2012 - 03:13 PM

The best to REALLY learn a language is to just dive in, study other people's code (check out some open source game engines, or even games), and start programmin your own game. Even if you have to start from a "Hello, World" example and build games from there, JUST WRITE GAMES ( which also means you are writing code). IMHO, game programming is one of the best ways to learn various programming paradigms in general. Programming a complete (albeit simple) game engine (don't start off there) will make you use many patterns in design which can be translated to ANY language, but more importantly you will gain an understanding about how these patterns are designed using the language of your choice (in your case, C++). I would also add http://www.cplusplus.com/ is a great resource for exploring C++ language features as well as various STL and C standard libraries. Also, if you are really wanting to target C++, I would suggest learning and using templates early on as they are a very powerful feature of C++ which C does not have. Many libraries (in particular Boost and QT) will take advantage of templates in their designs (STL stands for Standard Template Library, and templates are the basis behind their design, so even if you are just using templates and not designing class or function templates yourself, it still comes in handy to know what they do and how they work).

Also as a side note, OpenGL's interface and API is in C, not C++. Although C++ may not be a strict superset of C, they play very well together, and you can certainly call C library functions from within your own C++ code.