• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
stein102

Beginning C++

8 posts in this topic

I am a fairly competent Java programmer wanting to transition into C++. I find myself back at the beginner stage wondering "Where do I go from here?" My question is: What is the best path I can take to becoming a competent C++ programmer?

0

Share this post


Link to post
Share on other sites

Practice! No amount of reading can make up for the time it takes just coding in that language before you master it. Make sure to check out other people's code to see how they are using the language, but most of all, just code!

 

You'll also find there are other things you have to learn besides just the language, such as makefiles/project building, code organization, etc.

1

Share this post


Link to post
Share on other sites

Begin by learning the differences between pointers, references and instances of classes/objects.  Then move onto learning how templates work, and then go to learn the standard template library.  Once you have those things under your belt, start writing simple programs like a tic-tac-toe game.  Run it and measure it to see if you have any memory leaks.

0

Share this post


Link to post
Share on other sites

The interesting thing is that the transition from Java to C++ is smooth. There is still some funkiness that makes C++ stands out but the basic concepts early on in the beginning are identical if not similar. Since you are competent in Java, then the object oriented concepts in C++ should be easier to understand. It might sounds scary when you learn the object oriented concepts in C++ but it is the nature of C++. Stick with it and you will enjoy what it has to offer.

 

#include in C++ is the equivalent of importing statements in Java

 

cout << in C++ performs the equivalent of System.out.println in Java 

 

cin >> in C++ performs the equivalent of the Scanner object in Java

 

fstream in C++ performs the similar function of FileInputStream object in Java

 

the object oriented stuff in C++ is definitely similar in Java along with some new features that is not included in Java. 

 

C++ also introduced a feature called "friends" which you should also take a look at. 

 

There is also using namespace std, something C++ and C# and I think other languages also might have.

 

For the most part, whenever you transition to a new language there is still plenty of new stuff to learn even by leveraging the concepts from the previous language you have learned. I will let you find the other mysteries during your journey.

 

Start by doing what you have been doing to be competent in Java: read some and code a lot. That is when the understanding really comes. Start with the basics of C++. It is still necessary but the early concepts are easy to grasp since you have experience with Java. Then start working on the object-oriented material like what other members pointed out.

 

Good luck!

Edited by warnexus
0

Share this post


Link to post
Share on other sites

Any books I should get? Or should I just read online tutorials?

 

Also, any project suggestions?

0

Share this post


Link to post
Share on other sites
One thing I think really helps is zero tolerance for quality problems from the start. It seems like you spend more time up front, but it comes back many-fold because you avoid massive and demoralizing debug sessions later when you have written 3000 new lines of code and have no idea where the bugs are. Even if you wouldn't save any time, it'd still be worth it because you end up understanding more. You'll have some degree of trust in your code and feel good about that instead of feeling like you are walking on quicksand. You'll learn faster to not write those bugs in the first place.

Turn all warnings on in the compiler, and tell it to treat warnings as errors, so your code won't compile as long as there's any warning or error. Of course, when you do get a warning, don't just try to mindlessly suppress it, but figure out what it is and why you are seeing it. If it turns out to be a real problem that could lead into trouble, you fix it. If not, only then you suppress it.

Also, often run the program under a memory checker like Valgrind with all memory leak checks etc. turned on. Again, if anything comes up, immediately stop adding new code and new features. Even if it seems to work, treat the program as "no good" until you have completely fixed the problem and get a clean bill from the checker.

I've been involved in teaching C and C++. We require the above (zero compiler warnings, zero detected memory issues) for any returned assignment work, starting from the very first assignment. Compiler warning = fail, memory issues = massive point deduction.
0

Share this post


Link to post
Share on other sites

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  
Followers 0