Advertisement

Anyone willing to mentor?

Started by February 01, 2012 01:17 AM
13 comments, last by way2lazy2care 12 years, 7 months ago

At least , some general guidelines for a begginer to start would be usefull:
1- use MS VS 2005
2- learn how to compile a dynamic library and use it in a different module
3- pay attention to managing memory, (allocating and freeing)
4- learn pointers

Good start up would be a ToDo for you. As to a beginner I would give you following ToDo, that if gets finished, you will have gained experience: here:

Make a library that implements following object "CAlgebra" with following 5 functions:

void Add3dVectors(float* A,float* B, float* res); // writes result vector to res pointer
void Multiply3dVectorByScalar(float* A,float s, float* res); // writes result vector to res pointer
float Dot3dVectors(float* A,float* B); // returns dot product of two vectors
void NormalizeVector(float* A, float* res); // writes the result to res pointer
float Length(float* A); //returns length of a vector

Make a library that implements the class and use it in a different module (exe).

1- adding two vectors is adding their components together respectively, result is vector
2- multiplying a vector by number means multyplying every component by the number, result is vector
3- doting two vectors is multiplying their components respectively and sumed together then, result is a number
4- normalizing a vector means to have the same vector but with length 1, vector is normalized if x^2+y^2+z^2=1, you can normalize a vector by dividing every componet by length of the vector, length of a vector is computed as sqrt(x^2+y^2+z^2)


That is some terrible advice. Someone is just learning C++, and you're asking them to write a library which includes vector math. It's like telling someone who just read a book about "how to fly a plane" to go practice on an F-15.

They probably don't know how to write a proper class. They probably have no idea what a library is. They probably don't have any idea what a pointer is. And, they may have no idea what a vector is.

Not to mention those function parameters are a mystery unto itself. I assume you expect an array size 3 of floats passed as a "vector", and if so, that's even worse.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Also you can check out the Scratch website which doesn't have age limits and probably more suitable for your age.
If you want a more structured approach the Kodu website lets you collect badges which could also help you learn more about programming.

Badges

Also, if you could find "C++: A Dialog: Programming with the C++ Standard Library" at your library I'd recommend reading that since it's a book that basically has a master programmer mentoring someone completely new to programming.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Advertisement

That is some terrible advice. Someone is just learning C++, and you're asking them to write a library which includes vector math. It's like telling someone who just read a book about "how to fly a plane" to go practice on an F-15.

I wouldn't go that far. The vector math described is pretty simple except the dot product. I don't really see anything in there that would be close to the metaphor you use.

They probably don't know how to write a proper class. They probably have no idea what a library is. They probably don't have any idea what a pointer is. And, they may have no idea what a vector is. [/quote]
The OP already stated that they were reading through "Begginning C++ Through Game Programming". If they don't know how to write a proper class after having read that, I'd imagine there are more menacing problems than having to do vector math.

Not to mention those function parameters are a mystery unto itself. I assume you expect an array size 3 of floats passed as a "vector", and if so, that's even worse.
[/quote]
He wasn't giving it as a solid implementation of a vector math class. He was just giving an example to teach concepts. Passing arrays and pointers, reference passing vs value passing, and creating a library are solid things to move to after having worked through a beginner C++ textbook. Running through his examples, then converting the examples to work with a Vector3 struct would be a good experiment that would broaden your knowledge quite a bit fairly rapidly.

[quote name='BeerNutts' timestamp='1328652228' post='4910647']
That is some terrible advice. Someone is just learning C++, and you're asking them to write a library which includes vector math. It's like telling someone who just read a book about "how to fly a plane" to go practice on an F-15.

I wouldn't go that far. The vector math described is pretty simple except the dot product. I don't really see anything in there that would be close to the metaphor you use.

They probably don't know how to write a proper class. They probably have no idea what a library is. They probably don't have any idea what a pointer is. And, they may have no idea what a vector is. [/quote]
The OP already stated that they were reading through "Begginning C++ Through Game Programming". If they don't know how to write a proper class after having read that, I'd imagine there are more menacing problems than having to do vector math.

Not to mention those function parameters are a mystery unto itself. I assume you expect an array size 3 of floats passed as a "vector", and if so, that's even worse.
[/quote]
He wasn't giving it as a solid implementation of a vector math class. He was just giving an example to teach concepts. Passing arrays and pointers, reference passing vs value passing, and creating a library are solid things to move to after having worked through a beginner C++ textbook. Running through his examples, then converting the examples to work with a Vector3 struct would be a good experiment that would broaden your knowledge quite a bit fairly rapidly.
[/quote]

I think you've forgotten what it's like to be a beginner, not just to C or C++, but to programming. Going through a book and it's exercises helps, but there's going to be a lot of uncertainty going forward. Re-hashing much of what the book goes over, to form a solid background would be better.

And, In no way would I have used pointers like that for a BRAND NEW BEGINNER. Again, reading 1 book for your 1st introduction to programming, pointers will still be a mystery.

That's my opinion. Let them learn slowly, giving someone a difficult problem has a high chance they will get VERY frustrated and give up. Some amount of frustration is going to happen, but not so much they feel overwhelmed.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)


And, In no way would I have used pointers like that for a BRAND NEW BEGINNER. Again, reading 1 book for your 1st introduction to programming, pointers will still be a mystery.

I would seriously question the validity of a beginner C++ text book that didn't explain pointers well.

This topic is closed to new replies.

Advertisement