Jump to content

  • Log In with Google      Sign In   
  • Create Account


Can someone mentor me?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 tiresandplanes   Members   -  Reputation: 133

Like
0Likes
Like

Posted 12 January 2013 - 10:09 AM

I have never programmed before and chose C++ as my first language to start with.  So I'm learning to program and C++ at the same time. I chose C++ as my first language because I want to use it the most out of any programming  language and even though I know it's harder to do this, I felt that this was the right path for me. 

 

I was wondering if someone would mentor me. I am currently reading C++ Primer and some things I understand how to do, but not necessarily what the use for them are. I am about 100 pages in, It's starting to touch on vectors and iterators and arrays and pointers and even if I learn how to use them, I don't understand what they are used for. 

 

I'm basically looking for someone who will be able to explain to me the bigger picture of certain things (as it pertains to game making/programming in general). I've heard it's good to surround yourself with people (or a person) that is more experienced or an expert because you'll gradually get better just by being around them and talking to them.

 

Please don't recommend me learning a different higher-level language because I don't plan on changing to anything else.



Sponsor:

#2 zacaj   Members   -  Reputation: 643

Like
6Likes
Like

Posted 12 January 2013 - 10:42 AM

If you're having problems understanding where stuff is actually used, your best bet is to actually try to program something real and see where they end up getting used.  That said, I'm up for answering some questions.  Feel free to PM/email/tweet/whatever me.



#3 Servant of the Lord   Crossbones+   -  Reputation: 18242

Like
8Likes
Like

Posted 12 January 2013 - 11:02 AM

The idea of surrounding yourself with many experts is good, and that's really one of the strengths of forums.

By recruiting one 'mentor' you run the risk of accidentally getting a bad one, and sabotaging your knowledge with poor programming practices.

 

The experts are usually too busy to commit to mentoring, but happy to answer individual questions on forums, whereas the people most likely to want to mentor are the people who have gained some knowledge (maybe even alot of knowledge) and want to assure themselves that they understand the subject by answering questions. Which is fine! Answering questions help lock in the knowledge we gain - but answering questions in isolation harms both the answerer and the asker, since even more knowledgable people can't see and correct mistakes that the answerer is making, and locks in bad knowledge in the answerer while introducing bad knowledge to the asker. If that makes sense. mellow.png

 

Like any subject of knowledge, you can't accept the teacher's words as fact, but must question the teacher, and also research on your own to see what others say, or else you inherit not only the teacher's good knowledge, but also all the teacher's bad knowledge, and also the teacher's once-good-knowledge-but-now-outdated-knowledge.

 

As you yourself said, "it's good to surround yourself with people", but it's not good to surround yourself with a person unless that person is an industry-wide recognized expert, and even then search the answers out yourself as well.


Edited by Servant of the Lord, 12 January 2013 - 11:09 AM.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

[Fly with me on Twitter] [Google+] [My broken website]

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                            [Need web hosting? I personally like A Small Orange]
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal


#4 Dan Mayor   Crossbones+   -  Reputation: 1712

Like
0Likes
Like

Posted 12 January 2013 - 12:05 PM

As a bit of a side note, C++ is one of if not the most complex languages in the programming field.  I just wanted to comment on the statement that you'r not quite sure where things would actually fit in practical application yet.  From my experience and through watching associates who have learned (or attempted to learn) the language 100 pages is no where near enough to start making these conclusions yet.

 

Since C++ is so vast and open it leads to there being dozens if not hundreds of different ways that you can get to the same solution.  As such it normally requires an entire book (or two) just to get your feet wet and get started with the language.  However you should be starting to have some ideas as to what's what by now assuming that you have actually been working the tutorials and "assignments" of the book you are reading.  That is to say that most of the books I've read will teach you something, then demonstrate how to use it with code examples and ask you to code along.  Are you doing these code examples or are you just browsing through them and moving on?

 

I don't want to jump to conclusions but it sounds partially like maybe you are moving faster than you should be.  If your confusion is on things prior to where you are in your book (eg you didn't completely understand something but moved on anyway) your on a suicide path.  Go back, rework all of the examples, do the "suggested assignment's" if they offer them.  If your still confused meet Google and look up more reading information.

 

If you are partially through a section and it does not make sense just yet it may not be that bad just yet.  Some things such as dynamic collections (vector's, deques and so on) are pretty difficult to wrap your head around and can take a good 100 pages themselves to learn.  The key on these things is just to remember it is a collection of values.  The core things you should understand completely before attempting to learn these is variables, data types and arrays.  If you are not familiar with these go back and study until you are, when you come back it will make more sense.

 

To address the sudo question I noticed in your post (what is a vector used for).  It's used to store a collection of values where in you do not have a limited number of said values.  It is basically used interchangeably with array's.  Where you might use an array to store a list of product id's, you would use a vector to store a list of product id's that can grow and shrink as needed.  Example, you are making a simple catalog for 100 products and you will never ever add or remove products from this catalog.  You would use an array of integers.  In real life when you make a catalog you know that you may be adding or removing products as time goes on.  Instead of making a huge array and trying to manage all 1 million pieces of this array every time you add or remove a product you would choose a vector which can automatically increase it's number or elements as you add more to it (and "plug holes" as it where when you remove items).

 

To relate this to game development application get's a bit trickier (and I hope you have an understanding of classes and objects already to understand this answer).  A vector is commonly used in game development to hold a collection of the NPC objects of a level.  This is so when you create a level class and have it load a file, you can have it also load a collection of NPC's for that level.  If level 1 has 3 NPC's your Vector will have 3 elements.  If level 10 has 100 NPC's your vector would have 100 elements.  Using a standard array you would have to create it to be at least 100 elements to support level 10, in level 1 you are wasting 97 sections of memory on unused reservations for those NPC's that don't even exist.

 

(P.S. an array isn't the best way to describe a vector but I'm assuming that you did not learn about linked lists and I'm simply trying to relate to knowledge that I assume you already have, if you HAVE learned linked lists then that is actually what the vector is.  A linked list of elements that contain the variables as defined by the template type cast of the vector <thing here>.)


Edited by Dan Mayor, 12 January 2013 - 12:09 PM.

Digivance Game Studios Founder:

Dan Mayor - Dan@Digivance.com
 www.Digivance.com


#5 Indifferent   Members   -  Reputation: 576

Like
3Likes
Like

Posted 12 January 2013 - 03:22 PM

(P.S. an array isn't the best way to describe a vector but I'm assuming that you did not learn about linked lists and I'm simply trying to relate to knowledge that I assume you already have, if you HAVE learned linked lists then that is actually what the vector is.  A linked list of elements that contain the variables as defined by the template type cast of the vector <thing here>.)

 

Actually, an array is the better way of describing a vector as it's not at all related to a linked list. The memory that holds a vector's elements must be contiguous which is why a vector is suitable for fast random access as with an array. When the reserved space is no longer large enough, the vector will reallocate a larger chunk of memory as you'd do with a dynamic array that you wished to expand.



#6 tiresandplanes   Members   -  Reputation: 133

Like
0Likes
Like

Posted 13 January 2013 - 05:10 AM

Yeah, I've been doing the code questions. I guess the question I had about vectors didn't really make sense. I know how(the syntax) to make vectors and what they are by definition, but I didn't understand the use for them.You've cleared that up for me a bit, thanks. I think the book is just touching on these things and then it'll go deeper into it later on. Thanks for answering all my questions, everyone. [|:^D



#7 rip-off   Moderators   -  Reputation: 8068

Like
1Likes
Like

Posted 13 January 2013 - 03:11 PM

Have you been writing lots of programs while reading the book? Programming is a practical skill, the only way to get good at it is to practise.



#8 SaurabhTorne   Members   -  Reputation: 245

Like
0Likes
Like

Posted 14 January 2013 - 12:08 AM

Dont waste too much time understanding strings if game development is your objective. Just jump in along with a good 2d c++ game engine. With visual representation of code its easier to learn c++



#9 L. Spiro   Crossbones+   -  Reputation: 12978

Like
7Likes
Like

Posted 14 January 2013 - 12:28 AM

Feel free to PM/email/tweet/whatever me.
I don’t encourage this. Part of the merit to a site such as this is that it is a vast database of knowledge for anyone to search for answers.
I almost never answer questions in private channels because those answers can do so much more good if they can be viewed by thousands rather than just by one.

Better to make him post his questions in public even if you might be the only one to answer—at least your answer can help others in the future.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#10 xcacophonyx   Members   -  Reputation: 92

Like
0Likes
Like

Posted 15 January 2013 - 09:12 AM

I wish I could get a mentor. I'm new to this too and if you find someone to teach you game programming I wouldn't mind joining in for some three way action...haha. I also wanted to suggest that you not act so stubborn in sticking only with C++ as a programming language. Sure you could do just about everything with it, but other languages might be able to tackle a specific problem better. Programming concepts remain basically the same no matter what language you use. But I feel you, when you say that you understand concepts but don't understand how to use them in a practical situation. I'm sick of watching tutorial after tutorial on the web just to have learned the syntax of some language as the end result. If you want to partner up on some n00b projects  I'd be enthusiastic to work with you.   



#11 tiresandplanes   Members   -  Reputation: 133

Like
0Likes
Like

Posted 15 January 2013 - 11:08 AM

I am not really at any kind of level to collaborate at this point but possibly in the (hopefully) near future biggrin.png. I didn't mean only C++ forever, just that I want to learn C++ and learn programming using that language and didn't want people to recommend an easier language for me to try instead. Also to answer your question Rip-Off I've started programming a lot more to really get down the syntax and how things work better. I'm taking it slower and programming a lot more.


Edited by tiresandplanes, 15 January 2013 - 11:09 AM.


#12 solewalker   Members   -  Reputation: 546

Like
0Likes
Like

Posted 16 January 2013 - 02:35 AM

I made my first game which was tic-tac-toe in C, when I knew only if-else and loop. So its about doing something with what you learn. I am no expert but C++ is not all of game programming, you need to learn some graphics stuff to get the idea about what to do with what. If you know how to draw a rectangle in a certain position of the screen, and you know array, you can make a game like tetris, no OOP or vector required for this aid. Doing graphics stuff is pretty easy because there are libraries like SDL or SFML. I myself is a C++ programmer and learner so I would tell you to stick with it. Though its pain in the butt even to do simple stuffs with it.

Edited by solewalker, 16 January 2013 - 02:36 AM.


#13 tiresandplanes   Members   -  Reputation: 133

Like
0Likes
Like

Posted 16 January 2013 - 05:18 PM

I've only been programming for about 2 weeks so I am really at an early stage in my programming development. I do plan on learning SDL later on but I want to really grasp the C++ language before I get into learning libraries. I know C++ isn't all of game programming but that's the place I've chosen to start and plan to stick with it until I really understand the concepts so I can be a useful programmer when it comes to the more complicated stuff. I'd like to thank everyone for answering my questions and helping me out.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS