Jump to content
  • Advertisement
Sign in to follow this  
overki11

Where do I start? (C++)

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

Hello. I've recently learned the basics of C++. I'd like to start making a game, but I just don't know where to start. I'd like to make a 2d game for a learning experience, but I don't know where to start. Should I use an engine? Should I make it myself? There's so much stuff I don't know. If anyone could help me by giving me a shove in the right direction, or giving me a list of stuff I need to know, It'd be helpful. Thanks.

Edited by overki11

Share this post


Link to post
Share on other sites
Advertisement

The FAQ is a great place to start:

http://www.gamedev.net/page/reference/faq.php/_/for-beginners-r1

 

It steers you away from C++ as a first choice, but it's your decision. If you go the C++ route, GutenTag has some good suggestions.

 

If you're ready to start programming games, also take a look at this article. It tells you which games to write and why:

http://www.gamedev.net/page/resources/_/technical/game-programming/your-first-step-to-game-development-starts-here-r2976

 

If you have absolutely no idea how to even start coding something like Pong, then you'll want to spend a little more time learning the language of your choice and start searching for tutorials on whichever libraries or engines you plan to use.

 

Welcome to the forums, and good luck!

- Eck

Share this post


Link to post
Share on other sites

I recommend you to focus on the object-oriented side of the language and make basic text-based games. You can try to create a RPG or something which involves a lot of abstractions, build an inventory, a quest system, leveling system and that kind of stuff. You will see that in your first game you will repeat yourself many times, think of better ways to optimize your program. After you've mastered object-oriented programming, dig into OpenGL, watch tutorials on YouTube. To get a good understanding of OpenGL, you need the basics of linear algebra (vectors, matrix, transformations, translations). 

 

Also, read this book in the meantime. 

Share this post


Link to post
Share on other sites

Well it really depends on what your goals are. Use some gamemaker tool if you really just wanna make a game.

 

Now if you're dead set in programming it thats fine, but dont go overboard, start with something simple, my first was tick tack toe, i learned a lot more than i figured i wouldve, the code was really shit but im proud of it still. for a first game definently don't do an rpg, most people seem to recommend pong as a good starting point and id second that.

 

Going off of the subject of being dead set on coding c++ is a monster, and is gonna make your brain hurt a lot, of course when i was in your boat i didn't listen to people either so that ill leave up to you. Should you choose c++ id say SDL or SFML as were previously mentioned are decent choices, im personally a fan of SFML, i found the API pretty easy to use for a beginner, their websites tutorials are pretty on point, though not too lengthy. SDL has some amazing tutorials from what ive heard.

 

All these choices really come down to what you want out of your game making experience. Good luck!

Share this post


Link to post
Share on other sites

cplusplus.com got me on track for using C++, I would recommend against starting with a 2d game initially. At least until you have a good grasp of the language.

 

If you're hellbent on doing so however, I would point you to any of the three major C++ libraries for game making.

 

SDL2

SFML

Allegro

 

Again, I wouldn't try a game until you're comfortable with writing basic C++ code without looking at tutorials or documentation

 

I disagree with not trying a game until he knows basic C++.

 

If you want to make a game just dive and do it. Be prepared to fail, making games is hard and you'll go through many iterations but making a game is very rewarding. You'll learn alot about C/C++ along the way. I think that writing anything else to just learn some C++, beyond basic guess a number etc, will ultimately bore you because you won't be working on what you actually want to be working on.

 

Get stuck in, find a few good websites like this one, ask lots of questions, read lots of articles and you'll be there in no time.

Share this post


Link to post
Share on other sites

If you want to do a 2D game (be warned, making a game isn't a child's play, and a 2D game is not the easiest task), you most definitively want to use SDL or a similar library. There are a few alternatives... but SDL is good, there's no reason why you couldn't/shouldn't use that one.

 

If you are a beginner who only just learned some C++, you will (almost certainly) fail -- utterly and miserably -- trying to create a window, handling input, and drawing a couple of sprites, let alone load an image from disk. Chances are that you will be demotivated afterwards. While interfacing with the operating system and reading/decoding a file format is not really all that hard once you grok it, it's tedious and unrewarding, and what you have to do is not always something that is immediately obvious to a beginner.

 

A library like SDL will abstract all that ugly stuff away and allows you to do the task by calling a few well-documented functions. This not only saves you a lot of time and allows you to get something done (that's important for morale!), but it's also a lot more fun overall.

 

You will find that making a program that works correctly (doesn't crash, doesn't leak, behaves as intended) is already enough of a challenge for a beginner. Dive into the ugly low-level stuff once you are a bit more comfortable with programming in general.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!