Where do I start? (C++)

Started by
10 comments, last by Anri 8 years, 7 months ago

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.

Advertisement

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

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

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

Start with hangman, or higher/lower, or some other simple text-only game

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.

I believe an RPG is a poor choice for one of your first games. You'll struggle to get things working and quickly get overwhelmed and possibly give up on the notion of learning how to program. Start WAAAAAY smaller and build your skill set up so that you can one day work up to something complex. Of course, it really depends on what you mean by "I know the basics of C++".

Here is a pretty decent post I wrote about a quest system:

http://www.gamedev.net/topic/652095-help-on-how-to-implement-stories-and-quests-on-an-rpg/

If you look at this post and your eyes start to glaze over because of the complexity, you aren't ready for an RPG yet. :)

- Eck

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

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!


Here is a pretty decent post I wrote about a quest system:
http://www.gamedev.net/topic/652095-help-on-how-to-implement-stories-and-quests-on-an-rpg/

Loved the article man, very well thought out.

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.

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.

This topic is closed to new replies.

Advertisement