• 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
InD_Games

Starting to learn C++ and game programming, what should I learn?

16 posts in this topic

Hi!

I have been planning to start learning C++ with a goal to make my own 2.5D platformer someday. However, I'm not quite sure what should I learn, and in which order.

First, I probably should learn basic C++ and make console applications. Im currently in this phase, and I know some basic things ( how to use classes, control structures etc. ).

After that, should I learn WinAPI? If yes, could someone give me link to good tutorial or to really comprehensive book?

Then I should probably choose between OpenGL and DirectX. Which one is better in terms of speed? Also I am planning to develop to consoles aswell, does that make any difference?
0

Share this post


Link to post
Share on other sites
what you should do is learn both DirectX and OpenGl. If you are you are programming on windows then DirectX is Faster. As for console development PS3 only supports OpenGL and Xbox360 only supports DirectX, however the chances of you getting to program legitimately for consoles is very slim since in order to do so you must get a Dev kit (which are extremely expensive). The only way you could program for consoles is if they were modded or you used XNA and C# for Xbox360, however I don't suggest you learn C# since its the worst language I've ever tried. So my final advice is learn WinAPI then learn OpenGL and Directx so you can shift platforms if you need to.
0

Share this post


Link to post
Share on other sites
[quote name='ic0de' timestamp='1295815700' post='4763590']
what you should do is learn both DirectX and OpenGl. If you are you are programming on windows then DirectX is Faster. As for console development PS3 only supports OpenGL and Xbox360 only supports DirectX, however the chances of you getting to program legitimately for consoles is very slim since in order to do so you must get a Dev kit (which are extremely expensive). The only way you could program for consoles is if they were modded or you used XNA and C# for Xbox360, however I don't suggest you learn C# since its the worst language I've ever tried. So my final advice is learn WinAPI then learn OpenGL and Directx so you can shift platforms if you need to.
[/quote]

Yeah I tried C# aswell but it just didnt fit my needs. However, doesn't MS accept really good and polished games to XBLA without paying anything ( except that 30% sales royalty ). Because I understood that for example Braid was released in XBLA and Jonathan Blow didn't buy an kit etc.
0

Share this post


Link to post
Share on other sites
IME there's not much difference between OpenGL and D3D in terms of performance. It really depends on how your prgram uses the API. Your decision should be more influenced by which coding style you're most comfortable with right now (procedural vs OO), and what platforms you intend running on. The coding style is actually very important. If one style looks completely alien to you you'll effectively be struggling with two new things (and two lots of new concepts) at the same time, and that can hurt.

Be aware that many Windows OpenGL drivers are of rather poor quality, and you might end up spending more time fighting the driver than you spend doing anything productive. Finally, OpenGL can be [i]much[/i] easier to get started with (especially if you use the old immediate mode) but difficulties come in later, whereas D3D is almost the exact opposite (you need to start planning your vertex buffer strategy pretty much from the outset, for example).

I second the recommendation that ultimately you should learn both. Each has a different perspective on things (OpenGL tends to abstract the details of the hardware a lot, D3D shoves them in your face) and knowing both can enrich your own body of knowledge.
1

Share this post


Link to post
Share on other sites
IMHO you should probably go with OpenGL.
well im not really that much into directX but...
- you can port to almost every platform except the xbox360
- window setup code is MUCH easier (just use SDL/GLUT whatever)
- if you are going to do a 2.5D (??) platformer than you probably dont need to worry that much about the driver

anyway i think the choice between OGL and DX is not that important as i found like only 5% of my code actually using the API

i dont know wether its a good idea to think about consoles already if youve just started to learn C++...
by the way you may want to have a look at smartphone developement too ;)
0

Share this post


Link to post
Share on other sites
Writing games takes practise. You practise by writing small games. I would recommend that once you are comfortable with C++, you use a library such as SDL to write some 2D games. You will learn a lot about how to design systems by doing so, and besides you'll have a couple of games you can show off. The mistakes you make writing your first few games will serve you well later on.

[quote]
[color=#1C2837][size=2] I don't suggest you learn C# since its the worst language I've ever tried.[/quote][/size][/color]
[color=#1C2837][size=2]There is a subjective opinion if ever I saw one. Many, many developers disagree with you. C# is an excellent language by most common criteria. Have you any [b]objective [/b]criticisms to make? If not, I suggest you do not dissuade people from using it, particularly impressionable beginners.[/size][/color]
1

Share this post


Link to post
Share on other sites
Thanks for answers everyone!

Still I'd like to know answers for these questions;

XBLA doesn't require Dev Kit if the game is good enough and you can convince MS that the game will be profitable ( how else indie developers would get their game to XBLA?), am I correct?

How well do I have to learn WinAPI before I continue to graphical programming? Or should I learn WinAPI and DX/OpenGL at the same time?

Is there any kind of free/ really cheap for personal use game engine, that I would be able to make 2D/2.5D games which are a bit more complex ( I was thinking about similiar features as Braids time-manipulation ) or should I learn to program game engine myself? Of course I wont be starting my game anytime soon since I have to learn first, and after that it will take a long time before it will be even playable.

Should I learn to use UML or pseudocode? They just seem so boring and useless, but I have no idea yet how hard game developing can be, so please could someone give me any opinions on this?

As for C#, I just didn't personally like it, and my future dream-job is in game business so C++ would probably be better choice considering that as well.
0

Share this post


Link to post
Share on other sites
Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

C++ can be extremely overwhelming for a beginner, and it tends to force you into more low level concepts that step more into the field of Engine or Framework development than Game development itself, if you are however bent on learning C++ and want to develop for consoles as well as windows you really shouldn't "decide" between OpenGL and DirectX, rather you should aim to understand that while they do have a few differences, some of them quite radical, a game or engine should be able to run with either of them.

This last objective I've mentioned is called API Agnostic Engine, in these types of engine, you create something called a Bridge between your application and the APIs. A bridge basically translate the specifics of an API such as DirectX or OpenGL into a common interface so the rest of your application does not need to know the specifics of either of them.


Once again, these issues usually presented by C++ may go too deep for a beginner, I would insist on a more abstracted framework like the ones I've mentioned above.

1

Share this post


Link to post
Share on other sites
[quote name='InD_Games' timestamp='1295870878' post='4763847']How well do I have to learn WinAPI before I continue to graphical programming? Or should I learn WinAPI and DX/OpenGL at the same time?[/quote]

You really don't need to know much of the Windows API to get started. Just enough to create and show a window and handle a basic message loop; chapter 1 of any Windows programming book in other words.
0

Share this post


Link to post
Share on other sites
[quote name='NEXUSKill' timestamp='1295887817' post='4763966']
Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

[/quote]

I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.
1

Share this post


Link to post
Share on other sites
Start yourself by writing first small 2D games in C++ using SDL
then after practice move towards OpenGL and D3D
0

Share this post


Link to post
Share on other sites
[quote name='AverageJoeSSU' timestamp='1296059615' post='4765118']
[quote name='NEXUSKill' timestamp='1295887817' post='4763966']
Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

[/quote]

I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.
[/quote]

Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a [u]great[/u] game idea, but it really pisses me off that I can't start my game anytime soon :)
0

Share this post


Link to post
Share on other sites
[quote name='InD_Games' timestamp='1296068524' post='4765188']
[quote name='AverageJoeSSU' timestamp='1296059615' post='4765118']
[quote name='NEXUSKill' timestamp='1295887817' post='4763966']
Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

[/quote]

I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.
[/quote]

Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a [u]great[/u] game idea, but it really pisses me off that I can't start my game anytime soon :)
[/quote]

You cant use c++ with XNA/Unity/Actionscript, but you can use C# with Unity.(btw Unity is really easy to use and you can get some really impressive result fast)
If you want to go with c++ i suggest you stick with SDL but if you never programmed before its gonna be hard.
SDL and XNA isnt the same thing, SDL wont run on the xbox360 and dont support 3D(correct me if am wrong)
0

Share this post


Link to post
Share on other sites
[quote name='Jeffreyp' timestamp='1296072803' post='4765236']
[quote name='InD_Games' timestamp='1296068524' post='4765188']
[quote name='AverageJoeSSU' timestamp='1296059615' post='4765118']
[quote name='NEXUSKill' timestamp='1295887817' post='4763966']
Ok first step is as you are, learn to code, C++ is a good language for it, but as jump starting for beginners oriented to game development it wouldn't be my first choice.

I would advice you to begin with a more game oriented framework such as Flash ActionScript, Unity or XNA, once you have the basics of object oriented game programming you can migrate to other languages with more ease.

[/quote]

I agree, and I cannot stress enough how important it is to do this. These environments are controlled environments, ie. it is more difficult to cause a problem.

Unity, XNA, all provide you with a foundation for making games, a community to ask questions, and tutorials galore at your disposal. This may not be the exact technology you want to use with your game (i actually think they could be very easily you just dont know that yet, especially unity), but it is a great foundation to help you learn the basics of coding in games.

Couple this with learning C++ on the side, and you would be very surprised how fast the 2 will meet together. You will learn what classes make up a framework, what parts of a framework you REALLY like, (ie automatic asset loading from a folder on your computer) and see how you would use them in making a game. I cannot say how important this kind of knowledge is when coding a game engine of any kind.
[/quote]

Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a [u]great[/u] game idea, but it really pisses me off that I can't start my game anytime soon :)
[/quote]

You cant use c++ with XNA/Unity/Actionscript, but you can use C# with Unity.(btw Unity is really easy to use and you can get some really impressive result fast)
If you want to go with c++ i suggest you stick with SDL but if you never programmed before its gonna be hard.
SDL and XNA isnt the same thing, SDL wont run on the xbox360 and dont support 3D(correct me if am wrong)
[/quote]

Well I am always ready for challange :) And I have no intention to release any game that I make with SDL. I will use it only to learn and to expand my knowledge.
0

Share this post


Link to post
Share on other sites
[quote name='InD_Games' timestamp='1296068524' post='4765188']
Okay, thanks for both of you. However, I really don't like C# and I dont want it to confuse me, so can I use XNA, Unity or Flash ActionScript (never heard before) with C++? If not, can I learn to use SDL instead of those? Is SDL and XNA etc. even the same thing?

PS. I have a [u]great[/u] game idea, but it really pisses me off that I can't start my game anytime soon :)
[/quote]

Who said anything about C#?

Forget about languages at this point, you shouldnt be basing what technology you want to use based upon what languages you know, you barely know any ;).

Also, Learning C++ and making a game engine in C++ and making a GAME in C++ are all COMPLETELY different and require a lot of xp to even do!

you earn that xp by mucking around with something like Unity.

Unity is extremely easy to learn, and actually fun, the programming languages are boiled down to basic scripting (something you should be starting with for games anyways).

Now like i said, if you learn C++ AND make a game in unity (which you can do with minimal c++ knowledge), then some day the lightbulb will go off and you will understand what you need to do to make a game engine based in C++.

-J

Two last important things, I laugh every time i hear somebody complain about a language they dont like. I used to HATE Java with a passion, and now I have a full time job helping develop the Java libraries. So the language i used to despise is actually keeping me employed.

The reality is we are in a time in technology where people are learning to make products modular. With modularity comes different scopes and with different scopes comes different requirements and with that comes... you guessed it! different languages! My opinion is that yes learning one language is important and it should always be your home base, but if you want to make a game nowadays, you will be able to encounter quicker success if you don't set a mental limitation like that. And also my opinion, C# is a great language.
0

Share this post


Link to post
Share on other sites
Sorry to hijack your thread abit,

But what would you guys suggest for someone like me who has done Java and OpenGL in java, who wishes to learn C++ and gain experience? Maybe even great a game that would be used in a portfolio?

I'm learning C++ and want to work on a game that will not only help me learn the language, but be useful when finding a job.
0

Share this post


Link to post
Share on other sites
[quote name='JaFFaCaKe' timestamp='1296141209' post='4765653']
Sorry to hijack your thread abit,

But what would you guys suggest for someone like me who has done Java and OpenGL in java, who wishes to learn C++ and gain experience? Maybe even great a game that would be used in a portfolio?

I'm learning C++ and want to work on a game that will not only help me learn the language, but be useful when finding a job.
[/quote]

I would do the same thing i mentioned earlier, except you would catch on quicker since you have a little more experience.
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