Sign in to follow this  
Tripple

C++ starter

Recommended Posts

Hello guys! im a (noob) programmer and i started learning c++ and i have been watching tuts and i have learned all the basic stuff but all the tuts i have watched all only use a console! i feel i have the basics down but i dont know how i would use c++ outside of a console window with just basic math and printing strings. so the question is is there any good tuts for C++ that is for beginners but also not on console but on a engine that is pure code? thanks

Share this post


Link to post
Share on other sites

For something more than the console, you can look at things like SFML. This gives you windows, graphics, input, and audio handling.

 

^^^  Not only is SFML an easy library, it will introduce you to what classes that you write should look like.  

Share this post


Link to post
Share on other sites

 

For something more than the console, you can look at things like SFML. This gives you windows, graphics, input, and audio handling.

 

^^^  Not only is SFML an easy library, it will introduce you to what classes that you write should look like.  

 

i have installed SFML to visual studio 2010 and got the example program working, now do u know how i should get started or any tut's to look at?

Share this post


Link to post
Share on other sites

do i have to re input the sfml path every time i make a new project? i give up and restart all the time.

 

Yes, every time you make a new project you have to add the links to the header files and libraries.  But that just means you'll get lots of practice.  smile.png

 

There are tons of examples that come with the library.  I would start by running those and seeing what looks interesting.

Share this post


Link to post
Share on other sites

 

do i have to re input the sfml path every time i make a new project? i give up and restart all the time.

 

I'm almost certain that you can create your own custom project templates with all paths set up, so that when you create a new project, you can use this template as the base, and you don't have to add the SFML paths manually.

 

Do a web search for "Creating Visual Studio Project Templates"

 

These links may help:

 

http://msdn.microsoft.com/en-us/magazine/cc188697.aspx

http://www.c-sharpcorner.com/UploadFile/370e35/create-your-own-project-template-in-visual-studio/

 

aw says you can not do it with C++ oh well ill just make a back up of a project file and copy it when i restart?

Edited by Tripple

Share this post


Link to post
Share on other sites

Somewhere in Visual Studio there's the well hidden property manager and from there you can find property sheets for your user. That's where I dump all paths to headers and libraries I use a lot (boost, etc.). In some Express versions it's hidden even more behind first having to change to some "expert view".

Share this post


Link to post
Share on other sites

hey guys i have 1 more question. so i started looking into sfml and i got it all set up then i noticed that people are using openGL with it? so from what i under stand sfml is a set of lib that creates windows and displays stuff and openGL is a graphics engine? im confused of what thies things are and how i would use them. also whould i use directX instead or does it not work with sfml?

Edited by Tripple

Share this post


Link to post
Share on other sites

hey guys i have 1 more question. so i started looking into sfml and i got it all set up then i noticed that people are using openGL with it? so from what i under stand sfml is a set of lib that creates windows and displays stuff and openGL is a graphics engine? im confused of what thies things are and how i would use them. also whould i use directX instead or does it not work with sfml?

SFML consists of five seperate libraries. You can use only the system and window libraries in case you want to use OpenGL yourself. But if you only want  2D by using the default SFML classes, you should use the graphics library, in this case you don't have to use OpenGL, so don't worry about it.

Share this post


Link to post
Share on other sites

i feel like u can learn C++ but then u get a engine or some lib and then bam! u know nothing again. because now all the sf::and keywords i don't know and there is not many tut's up to date for this and i don't know how i'm supposed to go through and learn everything on my own. mainly because when i learned c++ it was everything for console stuff and nothing else.

Edited by Tripple

Share this post


Link to post
Share on other sites

i feel like u can learn C++ but then u get a engine or some lib and then bam! u know nothing again. because now all the sf::and keywords i don't know and there is not many tut's up to date for this and i don't know how i'm supposed to go through and learn everything on my own.

 

My recommendation for that is once you THINK you know C++, go download a copy of the standard. The draft standard is easy to find, Wikipedia has links at the bottom.

 

Reading the standard is hard, but that is the actual language.  Most people are content to read books about the language or libraries and documentation, but they never spend the effort to know the actual language.  They take time to study about the thing, but never study the thing itself.

Share this post


Link to post
Share on other sites

 

i feel like u can learn C++ but then u get a engine or some lib and then bam! u know nothing again. because now all the sf::and keywords i don't know and there is not many tut's up to date for this and i don't know how i'm supposed to go through and learn everything on my own.

 

My recommendation for that is once you THINK you know C++, go download a copy of the standard. The draft standard is easy to find, Wikipedia has links at the bottom.

 

Reading the standard is hard, but that is the actual language.  Most people are content to read books about the language or libraries and documentation, but they never spend the effort to know the actual language.  They take time to study about the thing, but never study the thing itself.

 

i some what understand what you are saying. i have read 2 books on C++ both were C++ for beginners through game programming. and they were all on the standard library. should i keep looking for more basic C++ tut's on console to learn more? or keep trying to learn sfml and make games while i know very little C++. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf is this what you were talking about?

Edited by Tripple

Share this post


Link to post
Share on other sites

i have 1 very big question to ask. ok i am only 15 and been so into programming since i was 12 and i know this is what i love. but i am not a very good at teaching my self through books or video but i have tryed so hard and  i have learned so much but it never seems like i know enough. like i am always going to be a beginner. so should i just give up and wait till i go to college for game dev and learn there or keep going on like a snail and learning really slowly and feeling like i know nothing all the time?

Share this post


Link to post
Share on other sites

i have 1 very big question to ask. ok i am only 15 and been so into programming since i was 12 and i know this is what i love. but i am not a very good at teaching my self through books or video but i have tryed so hard and  i have learned so much but it never seems like i know enough. like i am always going to be a beginner. so should i just give up and wait till i go to college for game dev and learn there or keep going on like a snail and learning really slowly and feeling like i know nothing all the time?


I've been programming for 20 years now, i still learn new things almost every day and there is a metric crapton of stuff that i still don't know.

Keep your projects small and try to add a few challenges to each project you make, if you havn't made any graphical games yet i'd recommend starting by making a pong clone (it covers the basics without complicating things).

You may allready know enough to solve some problems and you will never know enough to solve all problems, as long as you keep moving forward you will eventually get to a point where you know enough for someone to pay you to write code (and when it comes to learning nothing beats working 40+ hours / week with other professionals) Edited by SimonForsman

Share this post


Link to post
Share on other sites
thank you so much to every one who replyed. everything was very use full. i will keep trying to learn. ill watch the tutorials and start by making a pong from scratch with just my mind and no code to coppy paste! ;)

Share this post


Link to post
Share on other sites

thank you so much to every one who replyed. everything was very use full. i will keep trying to learn. ill watch the tutorials and start by making a pong from scratch with just my mind and no code to coppy paste! ;)

I just thought I'd mention, that while copy/pasting is certainly discouraged, don't be afraid to reference things, especially in these early stages of programming. Look stuff up, look over other people's code and see how they do it, hell, even copy/paste and THEN play around with the code changing things to see what it does. In my experience, it's where most of the things I learn come from. If you try to always/only code from memory, you'll hinder your progress (in my humble and inexperienced opinion). But, any time I want to try to do something new, I search and reference for the best/recommended way to do it. Rather than reinvent the wheel, sometimes it's handy to look at someone else's wheel and improve/adapt/learn from what they've done. Afterward, you've learned something new, a new method, new command, or what-have-you. 

 

I'm only guessing, but I think most programmers, even after decades of programming, still constantly reference things and look things up. Programming entirely from memory might be a useful exercise to test your abilities/knowledge, but I would hazard a guess it's not the best way to do things in the long run.

Share this post


Link to post
Share on other sites
i said in my mind because. when i pictured a top programmer ex: people who first made things like game engines or even windows. they all did it from nothing at all no tutorials or anything and that is why i really like programming because you can create somthing that is completely yours and different from anything else. one of my dreams was to make my own engine completely from scratch no extra lib or anything but now i relize that most programmers now days like u said just look at what has allready been made and use that instead.

Share this post


Link to post
Share on other sites

I probably don't have the best perspective on this, as I'm rather new myself, but I'm willing to bet those people you're imagining didn't "do it all from nothing." Sure, there will always be the people on the cutting edge of technology (or art, or music, or anything), but typically they didn't just appear there one day out of thin air. They built their knowledge off what others had done before, and took it further and made something new with it. It would be like trying to write the 'Great American Novel', having never read a book yourself tongue.png

 

This is probably venturing into more of a philosophical discussion about the nature of creativity so I won't expand much more, and this is probably unsolicited advice, but at this point, you should focus on expanding your knowledge of programming, and that certainly includes what other programmers have figured out after decades of programming smile.png

 

Especially when we're talking about games. Games are so much more than the code that makes them. Even the most brilliant and industry-changing games are still probably like 95% standard coding practices and methods. You don't need to completely reinvent raycasting or player input methods to do something new and interesting with them.

 

But, I totally share your passion for making something new. The creative process is one of the things I love most about game programming. I'm completely not recommending that you stifle your creativity and dedicate yourself to making flappy-bird clones. I myself shy away from using game engines (though not libraries) as I feel it gives me more control over what I'm doing with the game (and also just to teach myself what is going on under the hood of the engines). But, you'll still want to learn the standard and recommended ways of doing things before (or at the very least, along side) doing your own thing, I think. Creativity doesn't exist in a bubble.

 

In essence, it's best to learn the rules before breaking them tongue.png

Edited by Misantes

Share this post


Link to post
Share on other sites

i have 1 very big question to ask. ok i am only 15 and been so into programming since i was 12 and i know this is what i love. but i am not a very good at teaching my self through books or video but i have tryed so hard and  i have learned so much but it never seems like i know enough. like i am always going to be a beginner. so should i just give up and wait till i go to college for game dev and learn there or keep going on like a snail and learning really slowly and feeling like i know nothing all the time?

 

C++ programming just takes a few years to get really comfortable working with it.  I would say it took me well over 5 years to get to a level where I can look at any code and understand it now.  It just takes time to learn.  Remember there are always many different ways to program code, some good, some bad.  I found that reading the Scott Meyer's books http://www.aristeia.com/books.html really helped me understand the nitty-gritty details of how the language works.  

Share this post


Link to post
Share on other sites

some times i get bored of failing and not learning anything new then quit for a week. and when i come back i forget everything i learned. what are some ways you learned and kept going and doing the same thing over and over again with out just giving up for a while.

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