Page 2 of 2

Re: Help a noob?

Posted: Sat Feb 26, 2011 12:07 am
by Odifma
ok 1 more noob question haha then il stop bothering most of you :) ok now i know alot of what im learning in the beginning is all basics. butttt seems to me like the examples they give for what i could "use" c++ for are stupid programs like calculating taxes or displaying input from 3 different people blah blah. so im assuming that this is all just to lay the basics right? im sure il use some of this stuff when i program an engine or w/e right? because none of this really seems like stuff id want to use c++ for haha just sort of useless info or little scripts i could write to show off to my friends "oh hey look i can have the computer ask you your name and tell you it can add 2+2" haha.. so i guess my question is, when do i start learning all the terms and what not to code an actual program? even if it is just pong.

EDIT : Oh and im learning how to show random numbers "like rolling a dice". oh joyyyyyyyy

Re: Help a noob?

Posted: Sat Feb 26, 2011 1:55 am
by k1net1k
well random dice roll will form the basis of battle systems for rpgs
adding 2+2 will work for trade systems and economy in game
etc

remember they are just teaching you how to do some basic function, its up to you to make that function applicable to your game or program. i mean change the name of the variables and suddenly its not a tax calculator

Re: Help a noob?

Posted: Sat Feb 26, 2011 2:03 am
by Odifma
very true haha. i mean i totally understand what their doing. but alot of it seems kind of useless. its a bit hard to explain what im talking about without you guys and or gals know what book im reading haha.. the book teaches me all those things but tells me to write a program to show how customer1, customer2, and customer3 have a total of *answer*. so while the basics are still there its kind of boring to do all that other stuff. bassicaly having a dos window popping up and teling me useless info "customer total is 35 blah blah" haha. but maybie its jsut that chapter haha.. decided to do some internet research though, looking at cplusplus.com and it has some nice tutorials that seem to get to the actuall writing of code for c++ which is what i want to learn haha my end goal is to be able to program a engine like most of you here :) i see all of your videos about the engines peoople made and its real inspiring :)

Re: Help a noob?

Posted: Sat Feb 26, 2011 8:20 am
by Firzen
Like some people already pointed out. You are learning the basics of the programming language.

What you learn is how to do maths in the program, what a class is, how to fetch input or generate random numbers. All that good stuff.

And once you know all that and you understand the basics, THEN you will start to write what you so deliberatelly call "real code".
Every program uses those basic things and build stuff with them.

Your pong game is basically an Update function that checks wether the ball hits a paddle or is outside of the playfield and on which side. So that is like a total of 4 if statements. And the step for each ball which adds the current speed to it.
If you write that you have a very basic pong working. Then you can enhance your update routine by having the ball bounce of with a bit of a change in direction depending on where it hits the pedal and so on. You build everything out of these basic things.

So what you do right now is real coding as well it is just not as complex. What I suppose you mean by "real coding" is the way in which your program forms from various classes and how the code should be designed. And I think that is the only real challenge for every developer out there that has the basics down, to get your design to work properly and nicely with all your classes working together perfectly.

Re: Help a noob?

Posted: Sat Feb 26, 2011 8:18 pm
by Odifma
Firzen wrote:Like some people already pointed out. You are learning the basics of the programming language.

What you learn is how to do maths in the program, what a class is, how to fetch input or generate random numbers. All that good stuff.

And once you know all that and you understand the basics, THEN you will start to write what you so deliberatelly call "real code".
Every program uses those basic things and build stuff with them.

Your pong game is basically an Update function that checks wether the ball hits a paddle or is outside of the playfield and on which side. So that is like a total of 4 if statements. And the step for each ball which adds the current speed to it.
If you write that you have a very basic pong working. Then you can enhance your update routine by having the ball bounce of with a bit of a change in direction depending on where it hits the pedal and so on. You build everything out of these basic things.

So what you do right now is real coding as well it is just not as complex. What I suppose you mean by "real coding" is the way in which your program forms from various classes and how the code should be designed. And I think that is the only real challenge for every developer out there that has the basics down, to get your design to work properly and nicely with all your classes working together perfectly.
thanks man, that made alot of sense :) i mean i understand its all fundamental stuff that lays hte foundation for coding later on i was just saying that i didnt get why they wanted me to display someones taxes added all together haha. thanks for the info though. well back to my c++ book haha

Re: Help a noob?

Posted: Sat Feb 26, 2011 8:45 pm
by Ginto8
Odifma wrote:thanks man, that made alot of sense :) i mean i understand its all fundamental stuff that lays hte foundation for coding later on i was just saying that i didnt get why they wanted me to display someones taxes added all together haha. thanks for the info though. well back to my c++ book haha
The reason they have you doing what seems to be a pointless exercise is because it is pointless to most people. But that's not the part that matters. The part that matters is that you're programming. The more you program, the better you get. It'll take a while before you start seeing the connections between the little parts, but you will have a "click" moment where you realize how the things connect. In fact, you'll probably have multiple "clicks", at different points in your learning career. Don't be discouraged that it takes a bit to get to the first click, cuz what i find is that each click is also a huge motivation booster, so once you get there, you'll get to the next one without as many issues (it may take longer, but you'll enjoy the trip more ;) )

Re: Help a noob?

Posted: Mon Feb 28, 2011 9:00 pm
by ParticleGames
I know I'm about a week late, but don't give up! When I learned c++, I took 1 month breaks every so often from coding itself to go back and master everything I learned. But then again, I was 12, so this may not be necessary. Find something that works and stick with it! :)

Re: Help a noob?

Posted: Wed Mar 02, 2011 12:42 am
by Odifma
ParticleGames wrote:I know I'm about a week late, but don't give up! When I learned c++, I took 1 month breaks every so often from coding itself to go back and master everything I learned. But then again, I was 12, so this may not be necessary. Find something that works and stick with it! :)
Thanks for the advice :) yea its just alot to take in, mainly cause im trying to learn it wayyy to fast haha.... i just feel like i should have learned this stuff when i was 18 or earlier. my family and friends always tell me to do something in computers but i alawys said eh. haa... but better late then ever right? haha i was playing some old school mega man legends 2 today and man it was inspiring. knowing that maybie i can program a game engine for something like that u know? or be a part of a team that makes a game like that. well obviously not oddshaped graphics like psone haha. but u guys get my meaning haha... yea i had to take a break from it this weekend too. i was on C++ overload haha...

Re: Help a noob?

Posted: Wed Mar 02, 2011 3:40 am
by Aleios
Just keep it up, i remember when i first started, i was getting really frustrated, and i thought, ok im going to skip all this crap about memory management. Oh how very dumb that was... I crashed my computer and i learned when it comes to the basics, whatever you do, DONT skip over just because it feels stupid or hard. Just keep at it and eventually it all makes sense. Oh and go as slow as you need/can. The people who take the time to analyze and learn are the ones that succeed.